On 13/12/2020 03:07, the...@sys-concept.com wrote:
if you have UEFI system most likely your "boot" partition is some form
of "vfat"

I strongly disagree with this statement. Most Linux distributions, including Gentoo, advise (or outright default to) having your /boot partition either separate, or having /boot as part of your root filesystem. And this is very sensible indeed.

Personally, I would even go further by saying that /boot should be journaled (e.g. ext4). Most distros do that by default.

A UEFI set-up only requires the EFI system partition to be vfat. It does not require the kernel or the ramdisk to be on it. GRUB2 can be configured to install only its own EFI-related files on the EFI system partition, then reading the kernel and the grub config file from your /boot partition:

# grub-install --efi-directory=/path/to/efi --boot-directory=/boot/efi /dev/[nvme...|sd...]

You do not need CSM enabled for this.

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.

Now if you use a different boot loader (e.g. rEFInd) it is up to that bootloader to have relevant support for the filesystem that your /boot partition is using.

> fsck.fat 4.1 (2017-01-24) open: no such file or directory
>
> There is a similar related bug filed about it (but I don't know why is
> it marked resolved)
> https://bugs.gentoo.org/306119

I don't think this issue is related wrt the root cause. But force-checking for filesystem errors certainly revealed the issue for your case: you don't have the fsck.fat binary in your initramfs. As a result, the filesystem checking process fails, the boot process is interrupted prematurely, and you're dropped into a shell to investigate. This is normal behaviour when an error occurs before the boot process switches to the real root.

One option is to disable filesystem checking for vfat - like you did, another is to make sure that the mkfs.fat binary is included in the ramdisk image. I am not sure how the latter would be best achieved with genkernel, perhaps others can advise on this.

- Victor

Reply via email to