LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   EFI System Partition: Using it as /boot versus /boot/efi (https://www.linuxquestions.org/questions/linux-general-1/efi-system-partition-using-it-as-boot-versus-boot-efi-4175693182/)

MirceaKitsune 04-05-2021 06:06 PM

EFI System Partition: Using it as /boot versus /boot/efi
 
This is a more generic Linux question. As I have an EFI motherboard with Secure Boot I need an ESP partition: I have one mounted as /boot/efi and it works fine on this installation. But I was wondering; Is there any disadvantage to making the entirety of /boot my ESP? That way I can make better use of the 4GB I assign to it, having it store grub and the kernel images too... they're all loaded temporarily as part of the boot process so it makes sense to use this one little partition for everything! As long as it's fat32 there shouldn't be anything breaking the configuration right? Especially on a machine where I don't plan to dual-boot, only one OS installed on the main drive so there would be no kernel image conflicts.

Just in case though I wanted to ask for opinions: Does anyone else place the entirety of /boot on the EFI partition instead of just /boot/efi? Does it work well for you, do you find it more optimal this way? As a bonus question; Is exfat (fat64) a newer and better partition format to use, or is it still a good idea to stick to fat32 exclusively for the ESP else the BIOS might complain?

Emerson 04-05-2021 06:16 PM

UEFI firmware doesn't care where you mount it if at all. I mount my ESP partition to /boot and there is no special mount for /boot/efi. I keep my EFI stub kernels on ESP partition.

Code:

~ # file /boot/EFI/Boot/*
/boot/EFI/Boot/gentoo.efi:    Linux kernel x86 boot executable bzImage, version 5.11.6-gentoo (root@zeus) #1 SMP Wed Mar 17 12:09:13 CDT 2021, RO-rootFS, swap_dev 0x4, Normal VGA
/boot/EFI/Boot/oldgentoo.efi: Linux kernel x86 boot executable bzImage, version 5.10.11-gentoo (root@zeus) #1 SMP Thu Jan 28 19:29:32 CST 2021, RO-rootFS, swap_dev 0x4, Normal VGA

As you can see I currently have two kernels there, older one serves as backup. I can choose it when I hit F11 for firmware boot menu after powering up.

colorpurple21859 04-05-2021 07:01 PM

You can't use symlinks on a fat partition, there will be problems if your distro uses symlinks in /boot.

MirceaKitsune 04-06-2021 10:22 AM

Quote:

Originally Posted by colorpurple21859 (Post 6237579)
You can't use symlinks on a fat partition, there will be problems if your distro uses symlinks in /boot.

That's a good observation: Symlinks are indeed be impossible to use on FAT. This seems to pose a potential issue on some distributions but not others; openSUSE for example does symlink the kernel and initrd files across /boot, however Arch / Manjaro does not and the /boot directory is free of any symbolic links.

hazel 04-06-2021 11:07 AM

Another problem that some people have run into is that the UEFI software requires a fairly small ESP; I've forgotten the exact size but there is a limit to what the program can read, rather like the limit old BIOS's used to have. Many people like to keep old kernels in /boot just in case, not to mention kernel config files and system maps and stuff belonging to GRUB, and this could lead to overcrowding.


All times are GMT -5. The time now is 10:58 PM.