You are not logged in.
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
rebootUpdate 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
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
Offline
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