On 13/12/2020 14:17, Michael wrote:
Pre-UEFI /boot on a single partition/filesystem used to be formatted as ext2,
primarily because /boot is a small fs in size, is written to only occasionally
and unless it happened to crash while writing to it not much benefit would be
had by adding the journal of ext3/ext4, while adding a fs overhead for the
journal and making write operations last longer.
...
So, for Linux on conventional installations (Legacy BIOS + separate /boot fs +
spinning disk setups) ext2 is a valid fs choice.  When /boot is part of the /
block device, then the fs type for /boot would necessarily be whatever is
chosen for the / partition, as long as the boot manager has the corresponding
driver to be able to load it.

Well, I don't dispute the validity of ext2 as a choice. Or any other filesystem that the bootloader can read really - that's a perfectly valid statement.

I was merely 'going further' as a suggestion purely in the sense that in this day and age there's hardly any reason to not be using a journaled filesystem even for /boot.

As you say, /boot is written to rarely so the overhead of a journal is negligible and for all intents and purposes can be ignored completely. Disk space itself these days is really not a concern at all (unless on a really really archaic machine) - let alone for a small boot partition - so that too can be ignored as a contributing factor. Data integrity, on the other hand, is far more critical. I have had ext2 fail on me during a system crash when updating a kernel back in the days a number of times, so I personally did away with ext2 as a /boot filesystem about 15y ago. Not surprisingly most distros will default to ext3/4 for /boot as well. But ultimately, we are free to decide ourselves.

Unfortunately, sometimes guides put the EFI partition mount point to be
a directory within the /boot directory (e.g. /boot/efi) which itself can
be the mount point for the boot partition. This can lead to people
formatting both as vfat or indeed using the EFI partition itself in lieu
of a separate /boot partition. I am not suggesting this is what happened
in your case, but I have seen it happen.

If /boot/efi is a directory (it should be according to the UEFI spec) then as
far as I know directories cannot be formatted with a fs.

Well.. naturally, this isn't what I meant :)

But you can have your boot fs (e.g. vfat/ext[2/3/4]) mounted under "/boot" and your EFS partition (vfat) mounted under "/boot/efi". The actual EFI directory that you speak of would then be under "/boot/efi/EFI". I used this as an example but, naturally, one can use any mount point that suits and it doesn't have to be under /boot.

For the sake of the example, perhaps a better choice of naming would have been "/boot/efs".

> NOTE:  The UEFI firmware can boot natively linux kernel images without
> chainloading some 3rd party Boot Manager's .EFI executable like GRUB, rEFInd, > syslinux, etc., as long as the EFI stub support has been enabled in the linux > kernel and 'root=PARTUUID=...' has been added in the built-in kernel command
> line entry.

Absolutely! I actually love this aspect about UEFI. It's a brilliant idea, but for some reason I always found it somewhat fiddly. Perhaps the lack of being able to alter the kernel command line prior to booting has put me off. Though I have to admit, I too am susceptible to "old habits die hard" and have always stuck to chainloading GRUB and never really thought much about it :)

> Gentoo is thankfully flexible enough to allow you to make your own choices on > configuring your system. Whatever works for you best is a valid choice to
> make.:-)

This! When people ask why I go through all the pain of using Gentoo and literally seeing myself getting older in the mirror while waiting for packages to compile (or portage to finish resolving dependencies) I always give this as my first argument - you can do whatever you want with this distro, it's that flexible... And we all love Gentoo for it

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to