noauto option ignored in /etc/fstab?
Tom H
tomh0665 at gmail.com
Fri Dec 1 15:14:18 UTC 2017
On Fri, Dec 1, 2017 at 5:36 AM, Josef Wolf <jw at raven.inka.de> wrote:
> On Fri, Dec 01, 2017 at 05:12:58AM -0500, Tom H wrote:
>> On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <jw at raven.inka.de> wrote:
>>>
>>> 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.
>>>
>>> That worked great in every distro I have touched in the last 20 years.
>>>
>>> But since I reinstalled this box with 16.04 LTS, this FS is mounted
>>> during boot.
>>>
>>> Any ideas what causes this FS to be mounted during boot?
>>
>> Is this an EFI system?
>>
>> If it is, you'll have to set "/boot/efi" as "noauto" too.
>
> Before the reinstall, I had 14.04 with EFI and everything worked fine.
>
> The the disk failed. I reinstalled 16.04 WITHOUT EFI.
>
> Thus, no. There's no /boot/efi anymore on this system.
Here's the output from my laptop before and after adding "noauto" to
the "/boot" line in "/etc/fstab" ("/boot" is my EFI partition). It
works. You must have misconfigured something or hit a bug.
# findmnt /boot
TARGET SOURCE FSTYPE OPTIONS
/boot /dev/sda1 vfat
rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
# find /run/systemd -name "*boot*"
/run/systemd/generator/boot.mount
/run/systemd/generator/local-fs.target.requires/boot.mount
# egrep -v '^$|^#' /run/systemd/generator/boot.mount
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target
Requires=systemd-fsck at dev-disk-by\x2duuid-B27F\x2d50A4.service
After=systemd-fsck at dev-disk-by\x2duuid-B27F\x2d50A4.service
[Mount]
Where=/boot
What=/dev/disk/by-uuid/B27F-50A4
Type=vfat
Options=umask=0077
# diff -u /run/systemd/generator/local-fs.target.requires/boot.mount
/run/systemd/generator/boot.mount
# vi /etc/fstab
# grep boot /etc/fstab
UUID=B27F-50A4 /boot vfat noauto,umask=0077 0 1
# reboot
...
# findmnt /boot
# find /run/systemd -name "*boot*"
/run/systemd/generator/boot.mount
# egrep -v '^$|^#' /run/systemd/generator/boot.mount
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target
Requires=systemd-fsck at dev-disk-by\x2duuid-B27F\x2d50A4.service
After=systemd-fsck at dev-disk-by\x2duuid-B27F\x2d50A4.service
[Mount]
Where=/boot
What=/dev/disk/by-uuid/B27F-50A4
Type=vfat
Options=noauto,umask=0077
# findmnt /boot
#
More information about the ubuntu-users
mailing list