[systemd-devel] /home Fails to Mount During Boot

Florian Scandella flo at chilicode.com
Sun Jul 28 07:37:45 PDT 2013


I've had the same problem, even worse i had a btrfs raid as root so the
ramdisk wouldn't boot at all. The only changes i made to the previous
working state were a new stable version of the kernel (arch linux 3.10.2
-> 3.10.3) and rebuilding the initrd (and i guess including the new udev
rules). The boot was a bit unstable bevore, 1 out of 10 times it couln't
mount the sysroot - but a reboot usualy fixed it (it was stable some
time ago, i don't remember when this behaviour got introduced).

I've changed my fstab entries to UUID like suggested and now the boot
works, but with a little hitch: I get dropped to the rescue shell in
early boot because systemd fails to mount the root fs. The rescue shell
immediatly exits and the boot continues without failures.

Jul 28 18:01:39 localhost kernel: Linux version 3.10.3-1-ARCH
(tobias at T-POWA-LX) (gcc version 4.8.1 (GCC) ) #1 SMP PREEMPT Fri Jul 26
11:26:59 CEST 2013
Jul 28 18:01:39 localhost kernel: Command line:
BOOT_IMAGE=/vmlinuz-linux root=UUID=654e2356-3c7b-46f5-af12-60f410bce725
ro rootflags=subvol=__active/base
[snip]
Jul 28 18:01:42 localhost systemd[1]: Mounting /sysroot...
Jul 28 18:01:42 localhost kernel: raid6: sse2x1    4462 MB/s
Jul 28 18:01:42 localhost kernel: raid6: sse2x2    6786 MB/s
Jul 28 18:01:42 localhost kernel: raid6: sse2x4    8015 MB/s
Jul 28 18:01:42 localhost kernel: raid6: using algorithm sse2x4 (8015 MB/s)
Jul 28 18:01:42 localhost kernel: raid6: using intx1 recovery algorithm
Jul 28 18:01:42 localhost kernel: xor: measuring software checksum speed
Jul 28 18:01:42 localhost kernel:    prefetch64-sse: 13790.400 MB/sec
Jul 28 18:01:42 localhost kernel:    generic_sse: 13068.000 MB/sec
Jul 28 18:01:42 localhost kernel: xor: using function: prefetch64-sse
(13790.400 MB/sec)
Jul 28 18:01:42 localhost kernel: bio: create slab <bio-1> at 1
Jul 28 18:01:42 localhost kernel: Btrfs loaded
Jul 28 18:01:42 localhost kernel: device label base2 devid 1 transid
216042 /dev/sdc3
Jul 28 18:01:42 localhost kernel: btrfs: disk space caching is enabled
Jul 28 18:01:42 localhost kernel: btrfs: failed to read the system array
on sdc3
Jul 28 18:01:42 localhost mount[99]: mount: wrong fs type, bad option,
bad superblock on /dev/sdc3,
Jul 28 18:01:42 localhost mount[99]: missing codepage or helper program,
or other error
Jul 28 18:01:42 localhost mount[99]: In some cases useful info is found
in syslog - try
Jul 28 18:01:42 localhost mount[99]: dmesg | tail or so.
Jul 28 18:01:42 localhost systemd[1]: sysroot.mount mount process
exited, code=exited status=32
Jul 28 18:01:42 localhost systemd[1]: Failed to mount /sysroot.
Jul 28 18:01:42 localhost systemd[1]: Dependency failed for Initrd Root
File System.
Jul 28 18:01:42 localhost systemd[1]: Dependency failed for Reload
Configuration from the Real Root.
Jul 28 18:01:42 localhost systemd[1]: Triggering OnFailure= dependencies
of initrd-parse-etc.service.
Jul 28 18:01:42 localhost systemd[1]: Triggering OnFailure= dependencies
of initrd-root-fs.target.
Jul 28 18:01:42 localhost systemd[1]: Unit sysroot.mount entered failed
state.
Jul 28 18:01:42 localhost systemd[1]: Stopped target Initrd File Systems.
Jul 28 18:01:42 localhost systemd[1]: Stopping system.slice.
Jul 28 18:01:42 localhost systemd[1]: Removed slice system.slice.
Jul 28 18:01:42 localhost systemd[1]: Stopping -.slice.
Jul 28 18:01:42 localhost systemd[1]: Removed slice -.slice.
Jul 28 18:01:42 localhost systemd[1]: Stopping System Initialization.
Jul 28 18:01:42 localhost systemd[1]: Stopping udev Coldplug all Devices...
Jul 28 18:01:42 localhost systemd-journal[52]: Journal stopped
Jul 28 18:01:42 localhost systemd-journal[130]: Runtime journal is using
1.8M (max 399.4M, leaving 599.1M of free 3.8G, current limit 399.4M).
Jul 28 18:01:42 localhost systemd-journal[130]: Runtime journal is using
1.8M (max 399.4M, leaving 599.1M of free 3.8G, current limit 399.4M).
Jul 28 18:01:42 localhost kernel: btrfs: open_ctree failed
Jul 28 18:01:42 localhost systemd[1]: Starting Emergency Shell...
Jul 28 18:01:42 localhost systemd[1]: Started Emergency Shell.
Jul 28 18:01:42 localhost systemd[1]: Starting Emergency Mode.
Jul 28 18:01:42 localhost systemd[1]: Reached target Emergency Mode.
Jul 28 18:01:42 localhost systemd[1]: Starting Journal Service...
Jul 28 18:01:42 localhost systemd-journald[52]: Received SIGTERM
Jul 28 18:01:42 localhost systemd[1]: Stopped udev Kernel Device Manager.
Jul 28 18:01:42 localhost systemd[1]: Stopping udev Kernel Socket.
Jul 28 18:01:42 localhost systemd[1]: Closed udev Kernel Socket.
Jul 28 18:01:42 localhost systemd[1]: Stopping udev Control Socket.
Jul 28 18:01:42 localhost systemd[1]: Closed udev Control Socket.
Jul 28 18:01:42 localhost systemd[1]: Starting Journal Service...
Jul 28 18:01:42 localhost systemd[1]: Started Journal Service.
Jul 28 18:01:42 localhost systemd[1]: Startup finished in 1.498s
(kernel) + 0 (initrd) + 3.451s (userspace) = 4.949s.
Jul 28 18:01:42 localhost systemd-journal[130]: Journal started
Jul 28 18:01:42 localhost systemd[127]: Failed at step EXEC spawning
/bin/plymouth: No such file or directory
Jul 28 18:01:42 localhost systemd[135]: Failed at step EXEC spawning
/sbin/sulogin: No such file or directory
Jul 28 18:01:42 localhost systemd[1]: Cannot add dependency job for unit
local-fs.target, ignoring: Unit local-fs.target failed to load: No such
file or directory.
Jul 28 18:01:42 localhost systemd[1]: Cannot add dependency job for unit
swap.target, ignoring: Unit swap.target failed to load: No such file or
directory. See sys
Jul 28 18:01:42 localhost systemd[1]: Cannot add dependency job for unit
timers.target, ignoring: Unit timers.target failed to load: No such file
or directory. See
Jul 28 18:01:42 localhost systemd[1]: Cannot add dependency job for unit
paths.target, ignoring: Unit paths.target failed to load: No such file
or directory. See s
Jul 28 18:01:42 localhost systemd[1]: Cannot add dependency job for unit
slices.target, ignoring: Unit slices.target failed to load: No such file
or directory. See
Jul 28 18:01:42 localhost systemd[1]: Mounting /sysroot...
Jul 28 18:01:42 localhost systemd[1]: Stopping Emergency Mode.
Jul 28 18:01:42 localhost systemd[1]: Stopped target Emergency Mode.
Jul 28 18:01:42 localhost systemd[1]: Stopping Emergency Shell...


from there it continues normally.


On 28/07/13 03:31, Kay Sievers wrote:
> On Sun, Jul 28, 2013 at 3:28 AM, Kay Sievers <kay at vrfy.org> wrote:
>
>>> Is the use of /dev/sd* in the fstab racey in some way?
>> Btrfs multi-device volumes need all be known to the kernel before
>> mount can succeed.
>>
>> Which one of the device is given to mount does not matter, they all
>> result in the same volume to be mounted.
>>
>> If you reference one of the volumes directly in fstab, the other
>> needed volume needs to be already known to the kernel or it will fail.
>> So yes, it is racy, it depends on discovery order.
> The above should both read *devices* not *volumes*.
>
>> Using the volume's UUID will make systemd check if the volume is ready
>> for mount, and only after all devices are known to the kernel, the
>> kernel will signify ready and we attempt to mount.
> The checking will make the device known to the kernel's btrfs code.
>
> Kay
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel



More information about the systemd-devel mailing list