Lennart Pottering proposed to modernize the breakdown of boot partitions

Lennart Pottering went on to post ideas for reworking Linux boot components and addressed the issue of duplicate boot partitions. Dissatisfaction was caused by the use of two disk partitions with different FS for organizing the initial boot, which are mounted nested - the /boot/efi partition based on the VFAT FS with EFI firmware components (EFI System Partition) and the /boot partition based on the ext4, btrfs or xfs FS, on which hosts Linux kernel and initrd images, as well as bootloader settings.

The situation is aggravated by the fact that the EFI partition is common for all systems, and the boot partition with the kernel and initrd is created separately for each installed Linux distribution, which leads to the need to create extra partitions when installing several distributions on the system. In turn, the need to support different FS leads to the complication of the bootloader, and the use of nested partitioning hinders the implementation of automatic mounting (the /boot/efi partition can only be mounted after the /boot partition is mounted).

Lennart suggested using only one boot partition whenever possible, and on systems with EFI, by default, place the kernel and initrd images in the /efi VFAT partition. On systems without EFI, or if an EFI partition already exists during installation (another OS is being used in parallel) and there is not enough free space on it, you can use a separate /boot partition with type XBOOTLDR (the /efi partition in the partition table has type ESP). It is proposed to create ESP and XBOOTLDR partitions in separate directories (separate /efi and /boot mounts instead of nested /boot/efi mounts), make them auto-detect and auto-mount via identification by XBOOTLDR type in the partition table (without prescribing a partition in /etc/fstab).

The /boot partition will be common to all Linux distributions installed on the computer, and distribution-specific files will be separated at the subdirectory level (each installed distribution has its own subdirectory). In accordance with the established practice and requirements of the UEFI specification, only the VFAT file system is used in the EFI component partition. To unify and rid the bootloader of the complications associated with supporting different file systems, it is proposed to use VFAT as a file system for the /boot partition, which will greatly simplify the implementation of components working on the bootloader side that access data in the /boot and /efi partitions. The unification will allow both partitions (/boot and /efi) to be equally supported for loading kernel and initrd images.

Source: opennet.ru

Add a comment