[systemd-devel] bootctl: default mount point for the ESP partition.

Kay Sievers kay at vrfy.org
Tue Sep 1 11:23:02 PDT 2015


On Tue, Sep 1, 2015 at 8:08 PM, Tomasz Torcz <tomek at pipebreaker.pl> wrote:
> On Tue, Sep 01, 2015 at 05:47:57PM +0100, Simon McVittie wrote:
>> On 01/09/15 17:21, Goffredo Baroncelli wrote:
>> > I discovered that bootctl assume as default mount point for the ESP
>> > partition the /boot directory. Instead it seems to me that the most part
>> > of distributions prefers /boot/efi.
>>
>> For some context, the reasoning for /boot/efi is:
>>
>> In some distributions (presumably including the (Fedora-based?) ones
>> where this feature was developed), /boot is traditionally treated as
>> mutable and unpackaged, like /var; so the packages include the kernel in
>> /usr or /lib or something, and copy it into /boot. The cost of this is
>> one extra copy of the kernel on-disk, which used to be a significant
>> amount of space, although on modern disks it doesn't really matter.
>
>   Not in Fedora:
> $ rpm -ql kernel-core
> /boot/.vmlinuz-4.2.0-0.rc7.git2.1.fc24.x86_64.hmac
> /boot/System.map-4.2.0-0.rc7.git2.1.fc24.x86_64
> /boot/config-4.2.0-0.rc7.git2.1.fc24.x86_64
> /boot/initramfs-4.2.0-0.rc7.git2.1.fc24.x86_64.img
> /boot/vmlinuz-4.2.0-0.rc7.git2.1.fc24.x86_64

They are %ghost files only. All actual content is in /usr where it belongs.

>   We even go as far as to provide dummy initramfs file (seen above).
> It is replaced by proper initramfs generated during kernel install.
> Existence of dummy file in package let RPM remove the generated initramfs
> during package remove.
>
>
>> AIUI, /boot/efi also makes it a bit easier to have the ESP remain
>> unmounted or read-only when not in active use, which is good for its own
>> robustness; a system crash corrupting an unmounted partition is less
>> likely than corrupting a mounted filesystem.
>
>   That's why systemd's generator creates automount unit (with timeout)
> for /boot.

Right, the ESP at /boot is never mounted unless it is accessed.

Kay


More information about the systemd-devel mailing list