Skip to content

Could not find the root partition #64

Open
@lucas-mior

Description

@lucas-mior

I've read #52 and #60, tried a lot of things but could not get refind-btrfs to work.
The output:

$ sudo refind-btrfs                    
Initializing the block devices using lsblk.
Initializing the physical partition table for device '/dev/nvme1n1' using lsblk.
Initializing the live partition table for device '/dev/nvme1n1' using findmnt.
Initializing the physical partition table for device '/dev/nvme0n1' using lsblk.
Initializing the live partition table for device '/dev/nvme0n1' using findmnt.
Found the ESP mounted at '/boot' on '/dev/nvme1n1p1'.
ERROR (refind_btrfs.state_management.conditions/conditions.py/check_filtered_block_devices): Could not find the root partition!

/etc/fstab relevant lines:

/dev/mapper/croot1   /                   btrfs noatime,commit=120,compress=zstd:1,discard=async,subvol=/@                  0 0
LABEL=BOOT           /boot               vfat  nofail,noatime,fmask=0133,dmask=0022                                        0 2

/boot/EFI/refind/refind.conf menu entry:

menuentry "Arch Linux - Stable" {
    icon /EFI/refind/icons/os_arch.png
    volume "EFI"
    loader /vmlinuz-linux
    initrd /initramfs-linux.img
    options "root=/dev/mapper/croot1 rw add_efi_memmap rootflags=subvol=@ initrd=\intel-ucode.img"
}

I suspect this problem is because of lsblkfailing to detect all mount points in a btrfs filesystem with multiple subvolumes mounted:

$lsblk /dev/nvme1n1p5 --json --paths --tree | less
{
   "blockdevices": [
      {
         "name": "/dev/nvme1n1p5",
         "maj:min": "259:6",
         "rm": false,
         "size": "1,7T",
         "ro": false,
         "type": "part",
         "mountpoints": [
             null
         ],
         "children": [
            {
               "name": "/dev/mapper/croot1",
               "maj:min": "254:3",
               "rm": false,
               "size": "1,7T",
               "ro": false,
               "type": "crypt",
               "mountpoints": [
                   "/home/lucas/.cache"
               ]
            }
         ]
      }
   ]
}

Note that /dev/mapper/croot1 is actually also mounted to / and /home.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions