FS#54958 - [systemd] systemd 234 Fails to start Switch Root
Attached to Project:
Arch Linux
Opened by Eric Siegel (nticompass) - Friday, 28 July 2017, 15:04 GMT
Last edited by Christian Hesse (eworm) - Monday, 07 August 2017, 05:55 GMT
Opened by Eric Siegel (nticompass) - Friday, 28 July 2017, 15:04 GMT
Last edited by Christian Hesse (eworm) - Monday, 07 August 2017, 05:55 GMT
|
Details
I updated to systemd 234.11-1 (also systemd-sysvcompat) last
night.
When I powered my system on this morning, I saw the following: Failed to start Switch Root See systemctl status initrd.switch-root.service for details (Or something like that. I'm typing that from memory, I forget the *exact* error.) I could not run 'systemctl' (or any command) as there is no console, the system just hangs there. I had to use a Fedora USB (just what I happened to have lying around) to chroot into my Arch Linux system and downgrade to systemd 233.75-3 (as well as downgrading systemd-sysvcompat... I forgot about libsystemd, so I didn't downgrade that). I tried to run 'systemctl status initrd.switch-root.service' from the chroot, but it wouldn't let me and I couldn't find anything in 'journalctl'. Downgrading to systemd 233.75-3 allowed the system to boot up correctly. |
This task depends upon
Closed by Christian Hesse (eworm)
Monday, 07 August 2017, 05:55 GMT
Reason for closing: Fixed
Additional comments about closing: systemd 234.11-6
Monday, 07 August 2017, 05:55 GMT
Reason for closing: Fixed
Additional comments about closing: systemd 234.11-6
At the very least post configs.
I run Archlinux on a cloud provided kvm instance with following very non-standard setup which looks like it does because it was migrated from Xen.
/boot resides with most of the rest of root on /dev/sda which unlike the rest of system is not LVM.
/etc/fstab:
proc /proc proc defaults 0 0
/dev/sda / ext3 defaults,noatime 0 1
/dev/sdb none swap sw 0 0
/dev/mapper/vg-lvvar /var ext3 defaults,noatime 0 2
/dev/mapper/vg-lvtmp /tmp ext3 defaults,noatime 0 2
/dev/mapper/vg-lvhome /home ext3 defaults,noatime 0 2
/dev/mapper/vg-lvsrv /srv ext3 defaults,noatime 0 2
/dev/mapper/vg-lvbck /data/backup ext3 defaults,noatime 0 2
/dev/mapper/vg-lvusr /usr ext3 defaults,noatime 0 0
/dev/mapper/vg-lvopt /opt ext3 defaults,noatime 0
/etc/mkinicpio.conf:
grep -v ^# /etc/mkinitcpio.conf
MODULES=""
BINARIES=""
FILES=""
HOOKS="systemd autodetect modconf fsck block sd-lvm2 filesystems usr"
/etc/defaults/grub:grep -v ^# /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="console=ttyS0,19200n8"
GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
GRUB_TERMINAL_INPUT=console
GRUB_TERMINAL_OUTPUT=console
GRUB_GFXMODE=text
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_DISABLE_LINUX_UUID=true
GRUB_DISABLE_RECOVERY=true
bug 54825. Debugging messages indicate that btrfs volumes were mounted.Here's some info that could possibly be useful:
Drive Setup:
/dev/sda (500GB HDD)
- /dev/sda1 4.38G swap
- /dev/sda2 461.39G LVM
/dev/sdb Windows 10 installation
/dev/sdc (128GB SSD)
- /dev/sdc1 fat32 ESP (/boot/efi)
- /dev/sdc2 ext2 /boot
- /dev/sdc3 LVM (lvmcache)
- /dev/sdc4 bcache0 cache
- /dev/sdc5 Windows cache
- /dev/sdc6 ext4 /
Inside the LVM are 4 lvs: /usr, /var, /opt, /home. All are ext4 and all (except /home) are cached using lvmcache. /home is actually using bcache, long story, but for some reason I had issues booting with /home using lvmcache. Either way, this works and boots fine with systemd 233.75-3.
Here is my /etc/mkinitcpio.conf:
MODULES="i915"
HOOKS="base systemd sd-plymouth autodetect block sd-lvm2 bcache filesystems keyboard fsck"
COMPRESSION="xz"
And if it's needed, my /etc/fstab: https://pastebin.com/raw/dSZNQRtA
My mkinitcpio.conf has
```
MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm"
HOOKS="base systemd autodetect modconf block sd-encrycrypt sd-vconsole sd-shutdown filesystems btrfs keyboard fsck"
COMPRESSION="lzma"
```
As an aside, despite having the base hook, I never get a rescue shell when boot fails. But that's off topic; maybe someone could point me in the right direction for that, though.
It looks like `/usr/bin/systemctl --no-block switch-root /sysroot` is the failing command
Please check what mount options were applied to /sysroot if you obtain a shell.
After attempting to boot using systemd 234.11-5 (which fails), then downgrading to 233 and booting, I find the directory structure /sysroot/usr has been created, and is recreated if I rename or delete /sysroot and then reattempt booting using systemd 234.
I redirected journald to the console, where I could see that systemctl "Sent message type=method_call ... member=SwitchRoot ... " and then an error stating that "'sysroot' does not appear to be an OS tree. os-release file is missing." and no method_return message.
"os-release file is missing" does it mean /etc/os-release but I thought systemd should boot with an empty /etc and populate it from /usr/share/factory/
Closest I can find to that error message.