Manjaro-chroot no longer working on BTRFS

I have previously been able to chroot into my root volume using the following commands:

sudo mount /dev/nvme0p2 /mnt
manjaro-chroot /mnt/@

However, when I tried this today, I got the following error message:

mount: /mnt/@/etc/resolv.conf: mount point is a symbolic link to nowhere. dmesg(1) may have more information after failed mount system call.

My subvolume layout is the standard Timeshift one:

❯ sudo btrfs subvolume list -p /
ID 258 gen 687344 parent 5 top level 5 path @cache
ID 259 gen 687345 parent 5 top level 5 path @log
ID 260 gen 527980 parent 5 top level 5 path @swap
ID 3482 gen 687345 parent 5 top level 5 path @home
ID 4617 gen 687344 parent 5 top level 5 path @
ID 4964 gen 686520 parent 5 top level 5 path timeshift-btrfs/snapshots/2023-04-21_09-27-54/@
ID 4965 gen 684035 parent 5 top level 5 path timeshift-btrfs/snapshots/2023-04-21_09-27-54/@home
ID 4966 gen 686520 parent 5 top level 5 path timeshift-btrfs/snapshots/2023-04-21_21-00-01/@
ID 4967 gen 685205 parent 5 top level 5 path timeshift-btrfs/snapshots/2023-04-21_21-00-01/@home
ID 4968 gen 686520 parent 5 top level 5 path timeshift-btrfs/snapshots/2023-04-22_21-00-01/@
ID 4969 gen 686411 parent 5 top level 5 path timeshift-btrfs/snapshots/2023-04-22_21-00-01/@home

Grateful for any insights on this.

When mounting btrfs-root (btrfs /) you have to explizit say that you want to do so.

When you use

sudo mount /dev/nvme0p2 /mnt

The default btrfs subvolume (btrfs /@) will be mounted at /mnt

You can confirm this by looking into /mnt after mounting !

You can test for your btrfs-default subvolume by:

sudo btrfs subvolume get-default -help
usage: btrfs subvolume get-default <path>

    Get the default subvolume of a filesystem

I tried manjaro-chroot /mnt as well. I have used these commands before, they’re from a previous (now disappeared post) on this forum and they worked without problems.

You first have to look after the mount. If the mount fails, chroot can’t work.

The mount also may depend on your actual fstab. If you do not give any options in the mount, it will use the options specified in fstab (if there is a line for this mountpoint)

You also can find good Information about Btrfs in the wiki

Relevant fstab entry:

UUID=xxx / btrfs subvol=/@,noatime,space_cache,compress=zstd 

Seems like it’s mounted to /@.

No !

When you mount this way (fstab), btrfs-/@ will be mounted to /

Please try to look into /mnt after you did the mount

Then you will see clear

If you do not want to mount the default-subvolume, you need to specify in the mount , what subvolume you want to mount

When you mount this way, btrfs-/@ will be mounted to /mnt/

either

  • your mount lacks the subvol=/
    or
  • your chroot should point to /mnt and not to /mnt/@

With a BTRFS filesystem, you should note that the subvolumes must be mounted. That would be in such a case:

# mount -o subvol=@ /dev/sdyC /mnt

GRUB/Restore the GRUB Bootloader - Manjaro

1 Like

Thanks, I’ll have a look at this solution.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.