diff --git a/.gitignore b/.gitignore index ee93d75..2adeaec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ src/work/* src/image/* +*.iso \ No newline at end of file diff --git a/src/CONFIG.sh b/src/CONFIG.sh index 1324426..f5df519 100755 --- a/src/CONFIG.sh +++ b/src/CONFIG.sh @@ -27,7 +27,7 @@ RELEASE="focal" # $ARCH is the target processor architecture. # For old 32 bit x86 systems use i386. # For newer 64-bit x86 systems (also known as x64, x86_64, Intel 64, and AMD64) use amd64. -ARCH="amd64" +ARCH="" # the name of your distro and ISO OS_NAME="" diff --git a/src/COPY_OVER_TO_CHROOT/CLEANUP.sh b/src/COPY_OVER_TO_CHROOT/CLEANUP.sh index d34377e..f215cd2 100755 --- a/src/COPY_OVER_TO_CHROOT/CLEANUP.sh +++ b/src/COPY_OVER_TO_CHROOT/CLEANUP.sh @@ -1,20 +1,15 @@ -# If we installed software, be sure to run -rm /var/lib/dbus/machine-id - - -# Before exiting the chroot, remove the diversion: -# Earlier this guide asked you to make a backup copy of /sbin/initctl. -# If the following command does not restore this file, then restore from the backup copy you made. apt-get update && apt-get upgrade apt-get autoremove --purge -y apt-get autoclean -y apt-get clean +rm /var/lib/dbus/machine-id rm -rf /tmp/* rm /etc/resolv.conf +rm /sbin/initctl +rm -rf /usr/src/* # Should be OK to clean this. + +dpkg-divert --rename --remove /sbin/initctl # Remove old kernels # dpkg -l 'linux-*' | sed '/^ii/!d;/hwe/d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt -y purge; update-grub - -rm /sbin/initctl -dpkg-divert --rename --remove /sbin/initctl diff --git a/src/COPY_OVER_TO_CHROOT/start.sh b/src/COPY_OVER_TO_CHROOT/start.sh index bb6af46..d4c04cb 100755 --- a/src/COPY_OVER_TO_CHROOT/start.sh +++ b/src/COPY_OVER_TO_CHROOT/start.sh @@ -8,6 +8,7 @@ function main() { + sleep 2 # Used so we can see stub messages clear; start_menu_mesage; read -p "--> : " ANSR diff --git a/src/NOTES/Useful_Commands.txt b/src/NOTES/Useful_Commands.txt index 5445c97..26dda61 100644 --- a/src/NOTES/Useful_Commands.txt +++ b/src/NOTES/Useful_Commands.txt @@ -1,3 +1,6 @@ +# Find which directories are consuming a lot of space. +du -hd 1 # -h means human readable; -d is depth + ## Removes all packages but the ones specified and its dependencies # !~nubuntu-minimal aptitude markauto '~i !~nlinux-image-generic !~nubuntu-minimal !~nubuntu-standard !~ncasper !~nlupin-casper !~naptitude !~napt-get !~napt' diff --git a/src/start.sh b/src/start.sh index 1ab0d92..fbe6a53 100755 --- a/src/start.sh +++ b/src/start.sh @@ -9,7 +9,8 @@ function main() { clear; - if [[ $(sanity_check) -eq 1 ]]; then echo "\nExiting..."; return; fi + sanity_check + if [[ $? -eq 1 ]]; then echo "\nExiting..."; return; fi start_menu_mesage; read -p "--> : " ANSR