Using ZFS makes this all a lot simpler.
ZFS is the "crypto solves this" of filesystems. Adding out of tree ZFS to the boot mix sounds hella complicated.
Linux boot partitions and how to set them up
31–40 of 184 posts
Re: Linux boot partitions and how to set them up
#32There are many years since I no longer create partitions on any SSD or HDD, because I believe that this serves no useful purpose and it just wastes a part of the SSD/HDD. I format directly the raw unpartitioned SSD/HDD with a file system that uses 100% of the capacity, with no wasted sectors. At least on Linux and FreeBSD, there is no need of partitions. For booting the computers, I either boot them from Ethernet or…
> 100% of the capacity, with no wasted sectors.
You will never have that. SSDs have a large amount of reserved space, and even on HDDs, there are some reserved tracks for defect management.
Re: Linux boot partitions and how to set them up
#33"The Boot partition will also have to carry an emtpy "efi" directory that can be used as the inner mount point, and serves no other purpose." You could substitute Boot for Root in this sentence and flip it around on Poettering.
The root partition already contains a set of empty directories, and Lennart has been working on reducing those where possible (see usr-merge).
Re: Linux boot partitions and how to set them up
#34Using ZFS makes this all a lot simpler.
Re: Linux boot partitions and how to set them up
#35Re: Linux boot partitions and how to set them up
#36I've been on systemd-boot for a long while now. For a while I was just hand maintaining vmlinuzs & loader entries, copying & editing stuff on /boot/efi. Easy but inelegant & I'd forget the very simple steps.
I've been copy pasting (well, its in my ansible now) /etc/kernel/postinst.d/ hooks from stackoverflow, which writes these files, & that greatly simplified life. It's a jank hurdle & I wish my os would actually support this wonderful easy to use tool. Systemd-boot is so much less obtuse, such a breath or fresh air, after years of grub (and many of uboot as well, but that's a different sector).
I made the jump ~two years ago to a single partition, just the ESP partition. Theres a warning abiut not being able to set permissions properly but its worked fine & been so much more pleasant to operate. Very strongly recommend. It just worked for me on Debian, no real fiddling.
https://github.com/filakhtov/kernel-postinst-d/blob/master/9...
Re: Linux boot partitions and how to set them up
#37I'm not sold on using automount to reduce the time spent with the filesystems mounted. Unless I've missed something, having a filesystem mounted doesn't make it any more susceptible to damage; being "mounted" just means that the kernel populates its data structures in memory and adds it to the VFS, it doesn't incur any ongoing r/w access. What risks corruption is writing data... which this doesn't stop, because the m…
Re: Linux boot partitions and how to set them up
#38As growing the size of an existing ESP is problematic (for example, because there’s no space available immediately after the ESP, or because some low-quality firmware reacts badly to the ESP changing size) Code 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…
Because that's everyone? What computer are you using that has really high quality firmware?
Re: Linux boot partitions and how to set them up
#39Instead, I would prefer a different approach. An approach that can be seen in Windows and macOS, that is: no user serviceable parts inside. It would work like this:
* Keep two partitions.
* ESP contains a simple program (let’s call it stub), whose only job is to call the real boot loader on /boot.
* The stub is simple (minimum user interaction) and doesn’t need updating very often. It has drivers/support software for storage media and some reasonable file systems (VFAT, Ext4). It may also support some simple form of disk encryption if desired.
* The real bootloader (as well as any kernels) live on the separate /boot partition. The bootloader can do all the fancy things it wants, it can display a fancy wallpaper, support mouse input, and so on.
* The ESP is not auto-mounted, might not even be listed in /etc/fstab.
* Whenever the stub is updated (which would happen rarely, since it’s meant to be simple and minimum), some post-install scripts would mount ESP in any location they please (be it /run/{uuid.uuid4()}), copy over the new stub, and immediately unmount it.
Simpler, safer, will make it harder for rogue software or `rm -rf /*` to mess up the booting of the system, and will not require any changes to existing partition tables.
Re: Linux boot partitions and how to set them up
#40How to make one boot partition to rule them all (debian, secure boot disabled for UEFI due to weird bug with how files are laid out with removable flag): 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" mo…
Why do you still need the legacy BIOS boot logic?