noauto option ignored in /etc/fstab?
Josef Wolf
jw at raven.inka.de
Fri Dec 1 08:43:16 UTC 2017
On Fri, Dec 01, 2017 at 09:09:36AM +0100, Xen wrote:
> Josef Wolf schreef op 01-12-2017 8:50:
> >I have the following line in /etc/fstab:
> > UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
> >The noauto option should prevent the fs to be mounted during boot.
> >Any ideas what causes this FS to be mounted during boot?
>
> It's most likely that systemd pulls in this target in some way.
>
> Here are the services that require boot.mount on my system:
>
> "unattended-upgrades.service"->"boot.mount" [color="green"];
> "unattended-upgrades.service"->"boot.mount" [color="black"];
>
> "local-fs.target"->"boot.mount" [color="green"];
> "local-fs.target"->"boot.mount" [color="black"];
>
> Local-fs.target should derive from fstab.
I can see that there may be many reasons to pull boot.mount.
But boot.mount should pass the -a option to mount, which in turn should
honor the noauto keyword.
> But unattended-upgrades may pull this mount in regardless.
For many years, I have the following two lines in apt.conf:
$ grep boot /etc/apt/*
/etc/apt/apt.conf:DPkg::Pre-Invoke {"/bin/mount -o remount,exec /tmp; /bin/mount /boot";};
/etc/apt/apt.conf:DPkg::Post-Invoke {"/bin/mount -o remount /tmp; /bin/umount /boot";};
$
This worked great for many years. But it will fail when the noauto keyword is ignored.
--
Josef Wolf
jw at raven.inka.de
More information about the ubuntu-users
mailing list