You are not logged in.

#1 2025-06-01 22:58:12

BrunoVicious
Member
Registered: 2025-06-01
Posts: 8

I'm experiencing issues with system init hooks.

I'm experiencing issues with system init hooks. Using BusyBox init works fine—I get a login prompt without any problems. However, when I modify mkinitcpio.conf to include system init hooks following this guide https://wiki.archlinux.org/title/Mkinitcpio, I keep encountering a "Failed to start Switch Root" error on boot. I don't get an emergency shell either.

For context, my setup includes LUKS encryption and Btrfs. Restoring BusyBox init resolves the issue. Does anyone know why I keep getting this error?

Ultra-Simple Boot Configuration (This works)

LUKS_UUID=$(blkid -s UUID -o value /dev/nvme0n1p2)

cat > /etc/mkinitcpio.conf << 'EOF'
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base udev autodetect microcode keyboard keymap consolefont modconf block encrypt filesystems fsck)
EOF

mkinitcpio -P

bootctl install

cat > /boot/loader/loader.conf << 'EOF'
default arch.conf
timeout 10
editor yes
EOF

cat > /boot/loader/entries/arch.conf << EOF
title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options cryptdevice=UUID=$LUKS_UUID:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=@ rw
EOF


passwd
exit
umount -R /mnt
cryptsetup close cryptroot
reboot

Update mkinitcpio to use systemd hooks (I get Failed to start Switch Root)

cp /etc/mkinitcpio.conf /etc/mkinitcpio.conf.backup

cat > /etc/mkinitcpio.conf << 'EOF'
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)
EOF

mkinitcpio -P

LUKS_UUID=$(sudo blkid -s UUID -o value /dev/nvme0n1p2)

cat > /boot/loader/entries/arch.conf << EOF
title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options rd.luks.name=$LUKS_UUID=cryptroot root=/dev/mapper/cryptroot rootflags=subvol=@ rw quiet
EOF

reboot (edited)

Offline

#2 2025-06-02 07:46:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,278

Re: I'm experiencing issues with system init hooks.

Just a guess, but you skipped the keymap and I guess you issue a password to open your luks container?
Is your keyboard US-QWERTY or your password qwerty-safe (12345)?

Other than that, try to provide more context - in doubt link photos of the boot messages (please don't embed huge images)
And certainly remove the quiet parameter, instead rather see https://wiki.archlinux.org/title/Genera … l_messages

Online

#3 2025-06-02 17:11:56

BrunoVicious
Member
Registered: 2025-06-01
Posts: 8

Re: I'm experiencing issues with system init hooks.

I think I fixed it. I added Modules=(btrfs) and ran mkinitcpio -P and it started working. Keymap wasn't the issue. I replaced keymap with sd-vconsole.

Offline

Board footer

Powered by FluxBB