You are not logged in.

#1 2022-08-31 15:04:41

ratcheer
Member
Registered: 2011-10-09
Posts: 924

[Solved] Systemd boot failure

I am attempting to convert my Arch Linux host from grub2 to systemd boot. When I reboot, it fails as follows.

ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

What do I need to do to fix this?

Last edited by ratcheer (2022-08-31 21:38:33)

Offline

#2 2022-08-31 15:06:48

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved] Systemd boot failure

That usually means that you specified the wrong root partition.

Offline

#3 2022-08-31 15:59:49

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

I specified my Arch Linux / partition. Is that the wrong one?

Offline

#4 2022-08-31 16:01:52

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved] Systemd boot failure

That would be the correct one. Post your config and your partition setup.

Offline

#5 2022-08-31 16:22:44

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

I’ll try. It will be difficult, since the system won’t boot. I’ll try to get it within a chroot session.

Offline

#6 2022-08-31 18:44:23

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

Hmmm. I am unable to get Arch-chroot to succeed. I have never had this problem, before.

Booted to an Arch usbstick, I mounted the root partition to /mnt  the boot partition to /mnt/boot, and ran swapon to the swap partition.

arch-chroot then fails, saying

chroot: failed to run command /bin/bash: No such file or directory.

At this point, I’d kind of like to just go back to grub2. And I’m having to type all of this on a damned iPad.

Last edited by ratcheer (2022-08-31 18:45:21)

Offline

#7 2022-08-31 18:57:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,263

Re: [Solved] Systemd boot failure

Reads like either your HW is dying or you mount the wrong partition. Output of

lsblk -f
fdisk -l

? https://wiki.archlinux.org/title/List_o … n_services

Offline

#8 2022-08-31 19:02:44

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved] Systemd boot failure

What, exactly, is on that filesystem you mounted?

Going back to grub won't help anything.

Last edited by Scimmia (2022-08-31 19:03:27)

Offline

#9 2022-08-31 19:23:27

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

It is the same partition I have been booting to all along with grub2. It is a btrfs filesystem on an nvme SSD. I can see all of my root stuff on the mounted partition, I just cannot chroot to it.

I have an old notebook PC booted up now, so at least it will be easier to type replies. I'll try to respond to post #7 in a minute.

Offline

#10 2022-08-31 19:47:16

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

fdisk -l
Disk /dev/nvme0n1: 931.51 GB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDBRPG0010BNC-WRSM
Units: sectors of 1 * 512 = 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9B083E54-AD82-4DBE-A219-5F2385A27B07

Device          Start            End         Sectors            Size              Type
/dev/nvme0n1p1  2048  526335       524288          256M            EFI System
/dev/nvme0n1p2  526336  34000767  33554432   16G              Linux sawp
/dev/nvme0n1p3  34000768  1953525134 1919444367 915.3G Linux root (x86-64)
lsblk -f
NAME           FSTYPE           FSVER                LABEL                  UUID
nvme0n1
    nvme0n1p1  vfat               FAT32                                               5CA0-297F                               185.9M            26%        /mnt/boot
    nvme0n1p2  swap             1                                                       0ffc47dc-98dc-42a2-b421-48d553f0477fc                      [SWAP]
    nvme0n1p3  btrfs                                          arch_os                20db1fe2-60a4-4eb7-87ac-1953a55dda16 895.8G 2%  /mnt

All hand typed. Whew!

Offline

#11 2022-08-31 19:54:24

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

And here is /mnt/boot/loader/entries/arch.conf:

title    Arch Linux
linux  /vmlinuz-linux
initrd  /amd-ucode.img
initrd  /initramfs-linux.img
options root="LABEL=arch_os" rw

Offline

#12 2022-08-31 21:15:10

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

Ok, I think I figured out what the problem is, but I don't know how to configure for it.

The actual Arch root is on a btrfs subvolume of the nvme0n1p3 partition. That is why systemd boot cannot find the files it needs. How do I specify a btrfs subvolume to systemd boot?

Offline

#13 2022-08-31 21:33:48

Jackseller
Member
Registered: 2020-08-03
Posts: 19

Re: [Solved] Systemd boot failure

I remember having the same problem when I did some tests with btrfs.

You need to add

rootflags=subvol=@

in options

Offline

#14 2022-08-31 21:38:05

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] Systemd boot failure

Thanks. I used rootflags=subvolid=460, and that works, too.

Thanks

Offline

Board footer

Powered by FluxBB