You are not logged in.

#1 2014-11-05 02:03:22

agent509
Member
Registered: 2010-11-26
Posts: 28

[Solved] /boot (on a USB) auto-mounts, and won't unmount

I just completed an encrypted system using a remote LUKS header install (https://wiki.archlinux.org/index.php/Dm … UKS_header)

/boot is contained on a usb partition. I added noauto to the fstab options, but /boot still automounts on startup anyways.

Furthermore, if I try to unmount /boot manually, it says it has unmounted properly, but yet stays mounted. I have to run umount -f /boot to get it to actually unmount.

Here is the relevant line from fstab:

/dev/sdb1          /boot            vfat           rw,noauto,realtime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro      0 2

Thanks for any help.

Last edited by agent509 (2014-11-05 05:19:30)

Offline

#2 2014-11-05 03:20:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

What happens if you actually stop the boot.mount systemd unit?

Offline

#3 2014-11-05 03:48:40

agent509
Member
Registered: 2010-11-26
Posts: 28

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

nothing changes. I still cannot unmount /boot without umount --force

Offline

#4 2014-11-05 04:03:27

agent509
Member
Registered: 2010-11-26
Posts: 28

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

Update: playing around with systemctl, I think I may have discovered something. Upon logging in after bootup, boot.mount is inactive. After cd'ing into /boot, it becomes active. I'm still really new to this, but it seems to me that maybe for some reason the system automatically attempts to mount the usb at /boot whenever I try to cd to it. I also found that if I attempted to cd to /boot after removing the usb, that the system became hung until I plugged the usb back in.

thoughts?

Offline

#5 2014-11-05 05:05:21

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

Are you using UEFI and gummiboot?  I think if you use that combination and mount the ESP at /boot it will create an automount unit for that.  When this happens, if you unmount, it will remount upon next access to that directory.  Is there a boot.automount unit that is running?

Offline

#6 2014-11-05 05:09:14

agent509
Member
Registered: 2010-11-26
Posts: 28

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

Yes I am, and yes that seems to be what's happening. Why does that combination result in an automount unit for /boot and how can I stop it from creating one?

Offline

#7 2014-11-05 05:12:17

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

You could just mask the unit I guess.  I don't really know, as I have never actually tried to disable this.  I think it is quite handy actually... though my ESP is not removable.  Try...

systemctl mask boot.automount 

Edit: Honestly, I was under the impression that having an entry in /etc/fstab for /boot would actually override these automagic settings.  So I am not entirely sure if what you are seeing is what is supposed to happen.

Last edited by WonderWoofy (2014-11-05 05:13:36)

Offline

#8 2014-11-05 05:15:27

agent509
Member
Registered: 2010-11-26
Posts: 28

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

it does seem that it could be quite useful... I just wish there were a way to keep it from hanging up the system if I accidentally try to access /boot when the drive isn't plugged in. Do you know if there is a way to do that? If not, I suppose I'll just leave it as is, as it's not too much of a pain. Thanks for your help!

Offline

#9 2014-11-05 05:17:56

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

Masking the unit will make a symlink from /etc/systemd/system/boot.automount to /dev/null.  Since the unit files in /etc/ take ultimate priority, even if the generator makes the automount file, it will be in /run/systemd and will thus be overridden.  This should stop it.

Offline

#10 2014-11-05 05:19:14

agent509
Member
Registered: 2010-11-26
Posts: 28

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

Alright, thanks again for the help!

Offline

#11 2014-11-05 05:22:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] /boot (on a USB) auto-mounts, and won't unmount

No problem.

Offline

Board footer

Powered by FluxBB