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

@@ -59,4 +59,25 @@ sgdisk \
-n3:0:0 \
-t3:BF00 \
-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