You are not logged in.

#1 2025-12-04 01:58:35

rth
Member
Registered: 2025-04-05
Posts: 4

systemd-boot luks btrfs "Failed to start Switch Root"

Trying to install Arch on a fully encrypted btrfs partition with subvolumes

If I luksOpen encrypted partition, mount it on /mnt and arch-chroot to /mnt, I can mount the rest of the partitions with mount -a.
The disc structure from chroot

NAME          UUID
loop0         
sda           
├─sda1        0842-A9B5
│ └─ventoy    2025-11-01-09-48-56-00
└─sda2        223C-F3F8
nvme0n1       
├─nvme0n1p1   8651-AA50
└─nvme0n1p2   f831b395-e528-4e49-b703-fffec7b593b9
  └─creptdata 21e83ec2-96a8-451f-9533-bc932d14f570

 

All configuration files

> /etc/fstab:
  # Static information about the filesystems.
  # See fstab(5) for details.
  
  # <file system> <dir> <type> <options> <dump> <pass>
  # /dev/mapper/cryptodata
  UUID=21e83ec2-96a8-451f-9533-bc932d14f570	/         	btrfs     	rw,relatime,compress=zstd:3,ssd,space_cache=v2,subvol=@system	0 0
  
  # /dev/mapper/cryptodata
  UUID=21e83ec2-96a8-451f-9533-bc932d14f570	/home     	btrfs     	rw,relatime,compress=zstd:3,ssd,space_cache=v2,subvol=@home	0 0
  
  # /dev/nvme0n1p1
  UUID=8651-AA50                    		/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2
  
  


> /etc/crypttab:
  # Configuration for encrypted block devices.
  # See crypttab(5) for details.
  
  # NOTE: Do not list your root (/) partition here, it must be set up
  #       beforehand by the initramfs (/etc/mkinitcpio.conf).
  
  # <name>       <device>                                     <password>              <options>
  # home         UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37    /etc/mypassword1
  # data1        /dev/sda3                                    /etc/mypassword2
  # data2        /dev/sda5                                    /etc/cryptfs.key
  # swap         /dev/sdx4                                    /dev/urandom            swap,cipher=aes-cbc-essiv:sha256,size=256
  # vol          /dev/sdb7                                    none
  cryptodata     UUID=f831b395-e528-4e49-b703-fffec7b593b9    none                    luks


> /etc/mkinitcpio.conf:
  MODULES=()  
  BINARIES=(btrfs)
  FILES=()  
  HOOKS=(base udev systemd autodetect microcode modconf kms keyboard keymap sd-vconsole sd-encrypt btrfs block filesystems fsck)
  


> /boot/loader/loader.conf:
  default arch.conf
  timeout 4
  console-mode max
  editor no


> /boot/loader/entries/arch.conf:
  title Arch Linux
  linux vmlinuz-linux
  initrd initramfs-linux.img
  optionas rd.luks.name=f831b395-e528-4e49-b703-fffec7b593b9=cryptodata root=/dev/mapper/cryptodata rootflags=subvol=@system

During the boot it asks password for the encrypted volume
Passwd request

It seems open luks but ends with error
Fail too start Switch Root

Offline

#2 2025-12-04 02:22:00

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

Re: systemd-boot luks btrfs "Failed to start Switch Root"

Online

#3 2025-12-05 01:32:31

rth
Member
Registered: 2025-04-05
Posts: 4

Re: systemd-boot luks btrfs "Failed to start Switch Root"

Thanks, with a bit of magic I got into emergency shell.

First, it seems the root was decrypted and mounted first time
disc decrypted

However, then it cannot find an OS /sysroot, haven why?!
error message

Last edited by rth (2025-12-05 01:40:35)

Offline

#4 2025-12-05 01:43:09

rth
Member
Registered: 2025-04-05
Posts: 4

Re: systemd-boot luks btrfs "Failed to start Switch Root"

well, I see  why

$ ls /sysroot
@system @home

It mounted root of btrfs, not the @system subvolume.

Last edited by rth (2025-12-05 01:51:08)

Offline

#5 2025-12-06 02:07:29

rth
Member
Registered: 2025-04-05
Posts: 4

Re: systemd-boot luks btrfs "Failed to start Switch Root"

Oh, 3 days of fighting with the system to find a typo

it should be options not optionas! Where were my eye and hands (0_0)

Offline

Board footer

Powered by FluxBB