0

I just installed Ubuntu 18.04 and I didn't use the default partition structure (ugh.. whole disk in one partition?). My partition table looks like this:

  • /dev/sda1 - /boot/efi
  • /dev/sda2 - swap
  • /dev/sda3 - /boot
  • /dev/sda4 - /
  • /dev/sda5 - /home

My fstab specifies that /boot should be noauto. However, I reboot and it is mounted. This is always a security risk. Why would mount still automount this device?

1

The 'noauto' option is interpreted by mount to not mount the entry implicitly. This has the consequence that it will not be mounted on boot on SysVInit systems.

Systemd does not interpret "automatic" to mean it can not mount it on-demand. Systemd only interprets 'noauto' to mean that it should not be a dependency of local-fs.target but if its a dependency of something else it will mount it. This is includes fsck, automount and mountpoints below the mountpoint.

You probably either have a mountpoint that is not noauto beneath the noauto mountpoint or the x-systemd.automount option is in the fstab entry.

  • Actually, there is nothing in my fstab that mentions systemd anything. So, what I hear you saying is that this is another case of systemd breaking well understood, standard operations. I'm still curious how to get my /boot to not automount. – Tom Green Dec 21 '18 at 16:06
  • @TomGreen So I edited it to be more accurate and also realize what it probably is. /boot/efi would ALSO have to be noauto in order for systemd not to mount it indefinitely. I feel you aren't giving systemd enough credit. It is smart enough to know for example whether it should do an online or offline fsck to maintain your wishes. Also having noauto just disable the dependency graph would have weird side effects. If a mountpoint is in fstab its implicitly an auto mount. So I suppose you could interpret it strictly and just make everything fail in this situation. XD – jdwolf Dec 21 '18 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.