Lennart Pöttering continued to publish ideas for reworking components for Linux booting and addressed the issue of boot partition duplication. Concerns have been raised about using two disk partitions with different file systems for organizing the initial boot — the /boot/efi partition based on the VFAT file system containing EFI firmware components (EFI System Partition), and the /boot partition based on ext4, btrfs, or xfs, where Linux kernel and initrd images, as well as bootloader settings, are stored.
The situation is exacerbated by the fact that the EFI partition is shared among all systems, while the boot partition with the kernel and initrd is created separately for each installed Linux distribution, leading to the need for additional partitions when installing multiple distributions in the system. Furthermore, the necessity to support different file systems complicates the bootloader, and the use of nested partitioning hinders the implementation of automatic mounting (the /boot/efi partition can only be mounted after mounting the /boot partition).
Lennart suggested that whenever possible, only one boot partition should be used, and on EFI systems, the kernel and initrd images should be placed by default in the VFAT partition /efi. On systems without EFI, or if an EFI partition already exists at the time of installation (while another OS is also in use) and there is insufficient free space, a separate /boot partition of type XBOOTLDR can be utilized (the /efi partition in the partition table has type ESP). It is proposed to create ESP and XBOOTLDR partitions in separate directories (separate mounting of /efi and /boot instead of nested mounting of /boot/efi), making them auto-detectable and automountable through identification by type XBOOTLDR in the partition table (without specifying the partition in /etc/fstab).
The /boot partition will be common for all Linux distributions installed on the computer, while the files specific to each distribution will be organized at the subdirectory level (each installed distribution has its own subdirectory). In accordance with established practice and UEFI specifications, only the VFAT file system is used in the EFI components section. To standardize and simplify the bootloader by eliminating complications linked to supporting various file systems, it is proposed to use VFAT as the file system for the /boot partition as well, significantly simplifying the implementation of components working on the bootloader side that access data in the /boot and /efi partitions. This unification will equally support both partitions (/boot and /efi) for booting kernel and initrd images.
Source: opennet.ru
