17 Commits

Author SHA1 Message Date
2ebb72620b Put 'wifiName' variable used by 'nmcli' command inside double quotes 2026-01-11 19:06:34 -05:00
25afed7541 Fixed mismatched variable names 2026-01-11 19:04:57 -05:00
b8b5918feb Add 'sudo' to list of packages to install via mmdebstrap 2026-01-11 19:01:07 -05:00
fd177fa071 Have 'zpool export' export only the newly created pool instead of all pools 2026-01-02 10:49:35 -05:00
aaa209a056 Use 'umount -nR' regardless of OS 2026-01-02 10:48:39 -05:00
38dc3ab73a Added missing mount of efivars 2026-01-02 10:43:28 -05:00
3c8719450d Added spacing between mount commands 2026-01-02 10:42:58 -05:00
e8c745a307 Removed '-R' flag from umount command 2026-01-02 10:16:04 -05:00
00324dfb5d Changed mounting script from 'rbind.sh' to 'mount.sh' 2026-01-02 10:13:31 -05:00
e03ff714a7 Added new 'mount.sh' script to align with ZFSBootMenu documentation 2026-01-02 10:12:54 -05:00
6e1670ac6a Adjust newlines 2026-01-02 10:07:51 -05:00
3e233de780 Changed maximum SWAP size from 32GiB to 16GiB 2026-01-02 08:45:01 -05:00
b57734ddbb Added 'ca-certificates' to the list of packages mmdebstrap installes for Debian 2026-01-02 08:40:07 -05:00
e78d63fee7 Removed options that are no longer relevant due to script flow and moved 'WiFi Setup' to bottom 2026-01-01 13:16:09 -05:00
ee2967c522 Changed unneeded 'elif' statements to simple individual 'if' statements 2026-01-01 13:13:07 -05:00
023c12cb8e Removed options that are no longer relevant due to script flow and moved 'WiFi Setup' to bottom 2026-01-01 13:09:23 -05:00
d1bbf9889b Added check to see if '/usr/bin/os-prober' exists before trying to purge it 2026-01-01 13:08:31 -05:00
8 changed files with 55 additions and 29 deletions

View File

@@ -35,6 +35,7 @@ fi
if [[ "${1}" == '--mmdebstrap' ]]; then if [[ "${1}" == '--mmdebstrap' ]]; then
packages=(\ packages=(\
ca-certificates \
console-setup \ console-setup \
cryptsetup \ cryptsetup \
curl \ curl \
@@ -53,6 +54,7 @@ openssh-{client,server} \
popularity-contest \ popularity-contest \
printer-driver-all \ printer-driver-all \
rsync \ rsync \
sudo \
systemd-timesyncd \ systemd-timesyncd \
tasksel \ tasksel \
zfs-initramfs \ zfs-initramfs \

View File

@@ -45,8 +45,10 @@ fi
"${baseDir}/partition.sh" --efi "${baseDir}/partition.sh" --efi
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
if [[ -e '/usr/bin/os-prober' ]]; then
"${baseDir}/debian.sh" --purge-os-prober "${baseDir}/debian.sh" --purge-os-prober
fi fi
fi
if [[ "${ID}" == 'elementary' ]]; then if [[ "${ID}" == 'elementary' ]]; then
"${baseDir}/elementary.sh" --desktop "${baseDir}/elementary.sh" --desktop

14
menu.sh
View File

@@ -26,10 +26,10 @@ while [[ ! "${option}" == 'Exit' ]]; do
################# #################
EOF EOF
select option in 'List' 'Configure' 'Pre Install' 'Install' 'WiFi Setup' 'Post Install' 'Finalize' 'Exit' select option in 'List' 'Configure' 'Install' 'Finalize' 'WiFi Setup' 'Exit'
do do
case "${option}" in case "${option}" in
'List'|'Configure'|'Pre Install'|'Install'|'WiFi Setup'|'Post Install'|'Finalize'|'Exit') 'List'|'Configure'|'Install'|'Finalize'|'WiFi Setup'|'Exit')
break break
;; ;;
*) *)
@@ -44,16 +44,12 @@ EOF
"${baseDir}/list.sh" "${baseDir}/list.sh"
elif [[ "${option}" == 'Configure' ]]; then elif [[ "${option}" == 'Configure' ]]; then
"${baseDir}/configure.sh" "${baseDir}/configure.sh"
elif [[ "${option}" == 'Pre Install' ]]; then
"${baseDir}/pre-inst.sh"
elif [[ "${option}" == 'Install' ]]; then elif [[ "${option}" == 'Install' ]]; then
"${baseDir}/install.sh" "${baseDir}/pre-inst.sh"
elif [[ "${option}" == 'WiFi Setup' ]]; then
"${baseDir}/wifi.sh"
elif [[ "${option}" == 'Post Install' ]]; then
"${baseDir}/post-inst.sh"
elif [[ "${option}" == 'Finalize' ]]; then elif [[ "${option}" == 'Finalize' ]]; then
"${baseDir}/finalize.sh" "${baseDir}/finalize.sh"
elif [[ "${option}" == 'WiFi Setup' ]]; then
"${baseDir}/wifi.sh"
fi fi
printf '\033[?47h\033[2J\033[H' printf '\033[?47h\033[2J\033[H'

28
mount.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -euo pipefail
mount \
--types proc \
proc \
/mnt/proc
mount \
--types sysfs \
sys \
/mnt/sys
mount \
--bind \
/dev \
/mnt/dev
mount \
--types devpts \
pts \
/mnt/dev/pts
mount \
--types efivarfs \
efivarfs \
/mnt/sys/firmware/efi/efivars

View File

@@ -46,8 +46,8 @@ if [[ "${1}" == '--disk' ]]; then
if [[ "${enableSwap}" == "yes" ]]; then if [[ "${enableSwap}" == "yes" ]]; then
swapSize="$(((($(vmstat -sS M | grep 'total memory' | sed 's/ M total memory//') / 1024) + 1) * 2))" swapSize="$(((($(vmstat -sS M | grep 'total memory' | sed 's/ M total memory//') / 1024) + 1) * 2))"
if [[ "${swapSize#}" -gt '32' ]]; then if [[ "${swapSize#}" -gt '16' ]]; then
swapSize='32' swapSize='16'
fi fi
sgdisk \ sgdisk \
@@ -62,7 +62,9 @@ if [[ "${1}" == '--disk' ]]; then
-t3:BF00 \ -t3:BF00 \
-c3:${ID} \ -c3:${ID} \
${disk} ${disk}
elif [[ "${1}" == '--efi' ]]; then fi
if [[ "${1}" == '--efi' ]]; then
if [[ ! "${disk}" == **/dev/disk/by-id/** ]]; then if [[ ! "${disk}" == **/dev/disk/by-id/** ]]; then
if [[ "${disk}" == **/dev/nvme** ]]; then if [[ "${disk}" == **/dev/nvme** ]]; then
part1='p1' part1='p1'

View File

@@ -84,7 +84,7 @@ elif [[ "${ID}" == 'debian' ]]; then
"${baseDir}/debian.sh" --sources "${baseDir}/debian.sh" --sources
fi fi
"${baseDir}/rbind.sh" "${baseDir}/mount.sh"
"${baseDir}/host-id.sh" "${baseDir}/host-id.sh"

View File

@@ -35,9 +35,9 @@ nmcli radio wifi on
nmcli device wifi list nmcli device wifi list
printf "Enter the SSID of the WiFi network you wish to connect to:\n" printf "Enter the SSID of the WiFi network you wish to connect to:\n"
read -r WIFI_NAME read -r wifiName
nmcli --ask device wifi connect ${wifiName} nmcli --ask device wifi connect "${wifiName}"
cat << EOF cat << EOF

16
zfs.sh
View File

@@ -30,14 +30,14 @@ if [[ "${1}" == '--format' ]]; then
while [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]] || [[ -z "${zpoolPassword}" ]] || [[ "${#zpoolPassword}" -lt '8' ]]; do while [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]] || [[ -z "${zpoolPassword}" ]] || [[ "${#zpoolPassword}" -lt '8' ]]; do
printf \ printf \
"\nEnter a password to encrypt your root pool (minimum 8 characters):\n" "Enter a password to encrypt your root pool (minimum 8 characters):\n"
read \ read \
-r \ -r \
-s \ -s \
zpoolPassword zpoolPassword
printf \ printf \
"\nVerify the password to encrypt your root pool:\n" "Verify the password to encrypt your root pool:\n"
read \ read \
-r \ -r \
-s \ -s \
@@ -45,13 +45,13 @@ if [[ "${1}" == '--format' ]]; then
if [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]]; then if [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]]; then
printf \ printf \
"ERROR:\tPasswords do not match!\n" "ERROR:\tPasswords do not match!\n\n"
elif [[ -z "${zpoolPassword}" ]]; then elif [[ -z "${zpoolPassword}" ]]; then
printf \ printf \
"ERROR:\tPassword is empty!\n" "ERROR:\tPassword is empty!\n\n"
elif [[ "${#zpoolPassword}" -lt '8' ]]; then elif [[ "${#zpoolPassword}" -lt '8' ]]; then
printf \ printf \
"ERROR:\tPassword is too short!\n" "ERROR:\tPassword is too short!\n\n"
fi fi
done done
@@ -222,17 +222,13 @@ if [[ "${1}" == '--key' ]]; then
fi fi
if [[ "${1}" == '--unmount' ]]; then if [[ "${1}" == '--unmount' ]]; then
mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | xargs -I {} umount -Rlf {}
if [[ "${ID}" == 'fedora' ]]; then
umount \ umount \
-nR \ -nR \
/mnt /mnt
fi
zpool \ zpool \
export \ export \
-a ${hostname,,}
fi fi
if [[ "${1}" == '--host-id' ]]; then if [[ "${1}" == '--host-id' ]]; then