[systemd-devel] bootctl: default mount point for the ESP partition.
Tomasz Torcz
tomek at pipebreaker.pl
Tue Sep 1 11:08:31 PDT 2015
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
…
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.
--
Tomasz Torcz "Funeral in the morning, IDE hacking
xmpp: zdzichubg at chrome.pl in the afternoon and evening." - Alan Cox
More information about the systemd-devel
mailing list