Linux boot partitions and how to set them up
0pointer.net
Linux boot partitions and how to set them up
1–10 of 184 posts
Re: Linux boot partitions and how to set them up
#2/boot (and ESP) management always feels hacky at best.
Re: Linux boot partitions and how to set them up
#3Re: Linux boot partitions and how to set them up
#4Re: Linux boot partitions and how to set them up
#5Great to see Lennart back working on what systemd does best: streamlining and cleaning existing grubby (pun intended) parts of Linux. /boot (and ESP) management always feels hacky at best.
Re: Linux boot partitions and how to set them up
#6 parted -s "${diskpath}" mklabel gpt
parted -s "${diskpath}" mkpart primary 1MiB 2MiB
parted -s "${diskpath}" set 1 bios_grub on
parted -s "${diskpath}" mkpart primary 2Mib 202MiB
parted -s "${diskpath}" set 2 esp on
sleep 1
mkfs.fat -F 32 -n "boot" "${diskpath}2"
mount "/dev/disk/by-label/boot" "/boot"
grub-install --target=i386-pc "${diskpath}"
grub-install --target=x86_64-efi --efi-directory=/boot --removable --no-uefi-secure-boot
grub-mkconfig > "/boot/grub/grub.cfg"
This makes two partitions, one for GRUB to inject legacy BIOS boot code into and one for the ESP. ESP gets mounted to /boot, grub gets setup to support both. Only bug is Debian complains about symlinking .bak files for initrd, no biggie.(This is part of a larger Debian imaging script I made)
Re: Linux boot partitions and how to set them up
#7You could substitute Boot for Root in this sentence and flip it around on Poettering.
Re: Linux boot partitions and how to set them up
#8Using ZFS makes this all a lot simpler.
The main partition can be whatever, but that's not typically available until after the kernel & initramfs are loaded. (As it is typically initramfs that does the prompt for the password, to decrypt it.)
Re: Linux boot partitions and how to set them up
#9Using ZFS makes this all a lot simpler.
Adding out of tree ZFS to the boot mix sounds hella complicated.
Re: Linux boot partitions and how to set them up
#10Code quality of the firmware in typical systems is known to not always be great. When relying on the file system driver included in the firmware it’s hence a good idea to limit use to operations that have a better chance to be correctly implemented.
Remind me again why I should cater to people who insist on writing and running terrible code.