You are not logged in.

#1 2012-08-15 15:19:58

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

[SOLVED] systemd & separate /boot causing boot failure

I'm working on moving to systemd, and I'm having a boot issue. I don't think my setup is particularly peculiar, but essentially: I have 2 disks, sda and sdb. sda contains some windows partitions, and /dev/sda4 is my data/homedir partition. /dev/sdb holds my arch install:

/dev/sda4 - /home (btrfs) (no label)
/dev/sdb1 - /boot (ext2) label=arch-boot
/dev/sdb2 - swap label=arch-swap
/dev/sdb3 - / (btrfs) label=arch-root

I have the expected entries in /etc/fstab:

UUID=XXXX / btrfs default 0 1
UUID=XXXX /boot ext2 defaults 0 1
UUID=XXXX /home btrfs defaults,relatime,ssd 0 1
UUID=XXXX swap swap defaults 0 0

This worked fine under initscripts (again, nothing hugely weird here), but under systemd what effectively happens is the various devices seem to be automounted by systemd, as well as being mounted via fstab. So, during boot I get mounts:

/dev/sdb3 on /media/arch-root type btrfs
/dev/sdb1 on /media/arch-boot type ext4
/dev/sda4 on /media/usbhd-sda4

as well as the "fstab versions":

/dev/sdb3 on / type btrfs
/dev/sda4 on /home type btrfs

Notably, the "fstab version" of /boot is missing. During boot, the 'boot.mount' unit fails, with:

mount: /dev/sdb1 is already mounted or /boot busy
mount: /dev/sdb1 is already mounted on /media/arch-boot

And bootup stops. Manually invoking "mount /boot" fails with the same error. I see the "automount" unit:

$ systemctl|grep boot.mount
boot.mount                          load failed failed       /boot
media-arch\x2dboot.mount    load active mounted /media/arch-boot

So, I can then issue:

$ systemctl stop 'media-arch\x2dboot.mount'
$ systemctl start 'boot.mount'

Which does successfully unmount the "automount" version, and mount the "fstab version", and I can then exit the emergency shell and boot normally. However, I am unable to issue, say "systemctl disable 'media-arch\x2dboot.mount'"; I simply get a complaint of "Failed to issue method call: No such file or directory." This probably makes sense, and comes down to a misunderstanding on my part between units, services, targets, etc.

I'm assuming it's *not* expected that we just allow all devices to be automounted (i.e. just remove my /boot entry from fstab)? How can I mark these entries as "do not automatically create mount points under /media"? Or, alternatively, make sure the fstab entries are loaded first, obviating the need for the automount? I'm guessing I'm missing something obvious here as I doubt this is a strange setup, but unfortunately I haven't had much google success when my search criteria are "systemd" and "/boot"...

Last edited by nogoma (2012-08-16 14:10:34)


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#2 2012-08-16 14:11:24

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: [SOLVED] systemd & separate /boot causing boot failure

So, this was actually not systemd related, as I discovered when I booted under initscripts again. Essentially, I had an overly general rule in /etc/udev/rules.d that was causing the automount behavior; restricting the matching devices to my non-boot disks fixed the issue.


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

Board footer

Powered by FluxBB