Split off creating/formatting EFI partition into 'partition.sh'

This commit is contained in:
2025-12-24 16:35:53 -05:00
parent 3e4eeb7d37
commit 30b3b58336
2 changed files with 23 additions and 19 deletions

View File

@@ -122,26 +122,9 @@ if [[ "${ID}" == 'debian' ]]; then
fi fi
if [[ ! "${*}" = *--no-part* ]]; then if [[ ! "${*}" = *--no-part* ]]; then
mkdosfs \ "${baseDir}/partition.sh" --efi
-F 32 \
-s 1 \
-n EFI \
${DISK}${PART1}
fi fi
mkdir \
-p \
/boot/efi
printf \
"/dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}${PART1}) /boot/efi vfat defaults 0 0\n" | \
tee --append /etc/fstab &> /dev/null
sleep 5
mount \
/boot/efi
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
"${baseDir}/debian.sh" --purge-os-prober "${baseDir}/debian.sh" --purge-os-prober
fi fi

View File

@@ -59,4 +59,25 @@ sgdisk \
-n3:0:0 \ -n3:0:0 \
-t3:BF00 \ -t3:BF00 \
-c3:${ID} \ -c3:${ID} \
${DISK} ${disk}
if [[ "${*}" == *--efi* ]]; then
mkdosfs \
-F 32 \
-s 1 \
-n EFI \
${disk}${part1}
mkdir \
-p \
/boot/efi
printf \
"/dev/disk/by-uuid/$(blkid -s UUID -o value ${disk}${part1}) /boot/efi vfat defaults 0 0\n" | \
tee --append /etc/fstab &> /dev/null
sleep 5
mount \
/boot/efi
fi