I can't run manjaro-chroot on vm with brtfs filesystem

Hello, after last update I am getting the following error at boot:

"no embedding supported"

I need to rebuild the boot loader.
But my systems has brtfs and I am getting an error in chrooting it:

manjaro ~]# lsblk -f
NAME   FSTYPE   FSVER            LABEL              UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0  squashfs 4.0                                                                            0   100% /run/miso/sfs/livefs
loop1  squashfs 4.0                                                                            0   100% /run/miso/sfs/mhwdfs
loop2  squashfs 4.0                                                                            0   100% /run/miso/sfs/desktopfs
loop3  squashfs 4.0                                                                            0   100% /run/miso/sfs/rootfs
sda    iso9660  Joliet Extension MANJARO_XFCEM_2137 2022-08-16-12-38-45-00                     0   100% /run/miso/bootmnt
├─sda1 iso9660  Joliet Extension MANJARO_XFCEM_2137 2022-08-16-12-38-45-00                              
└─sda2 vfat     FAT12            MISO_EFI           B811-4A5B                                           
sr0                                                                                                     
vda                                                                                                     
├─vda1 btrfs                                        a5e174c9-9e22-45bc-96c2-c9e6947dbbf1                
└─vda2 swap     1                swap               9083b6a6-11c4-4b50-845f-fe3111c54e4b                
vdb                                                                                                     
└─vdb1 btrfs                                        a5e174c9-9e22-45bc-96c2-c9e6947dbbf1                
[manjaro ~]# manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> ERROR: No Linux partitions detected!
[manjaro ~]# 

do you have advice that can help me?

manjaro-chroot -a doesnt work with btrfs or encryption… so you have to chroot manually … i dont use btrfs, so you have to look it up yourself on how to do it, either here on forum, or on manjaro wiki chroot section

Ok thanks.
I am not very confident with BTRFS
I have mounted the file system putting the following in /etc/fstab:

UUID=a5e174c9-9e22-45bc-96c2-c9e6947dbbf1 /mnt btrfs device=/dev/vda1,device=/dev/vdb1 0 0

I can mount the filesystem but the content is very weird:

[manjaro mnt]# btrfs fi show
Label: none  uuid: a5e174c9-9e22-45bc-96c2-c9e6947dbbf1
	Total devices 2 FS bytes used 84.58GiB
	devid    1 size 45.00GiB used 44.99GiB path /dev/vda1
	devid    2 size 50.00GiB used 45.00GiB path /dev/vdb1

[manjaro mnt]# ls -ltr /mnt
total 0
drwxr-xr-x 1 root root  10 Mar 21  2022 @home
drwxr-xr-x 1 root root 216 Jun 18 09:14 @
drwxr-xr-x 1 root root 220 Aug 31 22:00 @log
drwxr-xr-x 1 root root 210 Sep 23 11:38 timeshift-btrfs
drwxr-xr-x 1 root root 158 Sep 23 11:39 @cache

me neither, so i will not be much of help, since im not using it … but if the color changed to red, than you are sucesfully chrooted

Are you using Btrfs Raid 1 or Raid 0?


It looks like that /dev/sda1 is wrong because Grub drive is not there, but it is in /dev/sda2.

Try to chroot btrfs filesystem:

  1. Run manjaro-chroot /mnt/@/

  2. mount /dev/sda2 /boot/efi

  3. Check /etc/fstab

I can’t mount efi:



[manjaro ~]# manjaro-chroot /mnt/@/
sh-5.1# ls -la /boot    
total 105852
drwxr-xr-x 1 root root      452 Sep 23 21:24 .
drwxr-xr-x 1 root root      216 Jun 18 11:14 ..
-rw-r--r-- 1 root root    51200 Aug 26 16:12 amd-ucode.img
drwxr-xr-x 1 root root        0 Sep 23 21:24 efi
drwxr-xr-x 1 root root      106 Sep 23 13:39 grub
-rw------- 1 root root 33173050 Sep 23 13:38 initramfs-5.15-x86_64-fallback.img
-rw------- 1 root root  8882654 Sep 23 13:38 initramfs-5.15-x86_64.img
-rw------- 1 root root 35840278 Sep 23 13:39 initramfs-5.17-x86_64-fallback.img
-rw------- 1 root root  8922192 Sep 23 13:38 initramfs-5.17-x86_64.img
-rw-r--r-- 1 root root       22 Sep  5 12:14 linux515-x86_64.kver
-rw-r--r-- 1 root root       22 Jun 15 09:08 linux517-x86_64.kver
drwxr-xr-x 1 root root       22 Mar 14  2022 memtest86+
-rw-r--r-- 1 root root 10783264 Sep 23 13:38 vmlinuz-5.15-x86_64
-rw-r--r-- 1 root root 10717984 Jun 18 11:15 vmlinuz-5.17-x86_64
sh-5.1# mount /dev/sda2 /boot/efi
mount: /boot/efi: /dev/sda2 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
sh-5.1# cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=a5e174c9-9e22-45bc-96c2-c9e6947dbbf1 /              btrfs   subvol=/@,defaults 0 0
UUID=a5e174c9-9e22-45bc-96c2-c9e6947dbbf1 /home          btrfs   subvol=/@home,defaults 0 0
UUID=a5e174c9-9e22-45bc-96c2-c9e6947dbbf1 /var/cache     btrfs   subvol=/@cache,defaults 0 0
UUID=a5e174c9-9e22-45bc-96c2-c9e6947dbbf1 /var/log       btrfs   subvol=/@log,defaults 0 0
UUID=9083b6a6-11c4-4b50-845f-fe3111c54e4b swap           swap    defaults,noatime 0 0

should I have to use this /etc/fstab before chrooting?

what is the output ls -al /boot/efi ?

sh-5.1# ls -ltr /boot/efi
total 0
sh-5.1#
sh-5.1# ls -al /boot/efi
total 0
drwxr-xr-x 1 root root   0 Sep 23 21:24 .
drwxr-xr-x 1 root root 452 Sep 23 21:24 ..

I think /dev/sda2 is owned by other system or not.

I see there is no GRUB mountpoint in /etc/fstab.

Try to run umount /dev/sda2 if it works?

it does not seem to work:

sh-5.1# umount /dev/sda2
umount: /dev/sda2: not mounted.
sh-5.1# mount /dev/sda2 /boot/efi
mount: /boot/efi: /dev/sda2 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
sh-5.1# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 138.1M  1 loop 
loop1    7:1    0 717.6M  1 loop 
loop2    7:2    0 951.3M  1 loop 
loop3    7:3    0 645.3M  1 loop 
sda      8:0    1  28.7G  0 disk 
|-sda1   8:1    1   2.5G  0 part 
`-sda2   8:2    1     4M  0 part 
sr0     11:0    1  1024M  0 rom  
vda    253:0    0    50G  0 disk 
|-vda1 253:1    0    45G  0 part /var/log
|                                /var/cache
|                                /home
|                                /
`-vda2 253:2    0     5G  0 part 
vdb    253:16   0    50G  0 disk 
`-vdb1 253:17   0    50G  0 part

it seems /dev/sda is mounted in the host:

sh-5.1# 
exit
[manjaro ~]# df
Filesystem     1K-blocks     Used Available Use% Mounted on
dev              8164876        0   8164876   0% /dev
run              8192184     9400   8182784   1% /run
/dev/sda         2588114  2588114         0 100% /run/miso/bootmnt
cowspace          262144        0    262144   0% /run/miso/cowspace
overlay_root    12288276   321400  11966876   3% /run/miso/overlay_root
/dev/loop0        141568   141568         0 100% /run/miso/sfs/livefs
/dev/loop1        734976   734976         0 100% /run/miso/sfs/mhwdfs
/dev/loop2        974336   974336         0 100% /run/miso/sfs/desktopfs
/dev/loop3        660992   660992         0 100% /run/miso/sfs/rootfs
overlay         12288276   321400  11966876   3% /
tmpfs            8192184        0   8192184   0% /dev/shm
tmpfs            8192184        8   8192176   1% /tmp
tmpfs            8192184     3540   8188644   1% /etc/pacman.d/gnupg
tmpfs            1638436      104   1638332   1% /run/user/1000
/dev/vda1       99611144 91010996   6698284  94% /mnt
/dev/vda1       99611144 91010996   6698284  94% /mnt/home
/dev/vda1       99611144 91010996   6698284  94% /mnt/var/cache
/dev/vda1       99611144 91010996   6698284  94% /mnt/var/log
[manjaro ~]# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 138.1M  1 loop /run/miso/sfs/livefs
loop1    7:1    0 717.6M  1 loop /run/miso/sfs/mhwdfs
loop2    7:2    0 951.3M  1 loop /run/miso/sfs/desktopfs
loop3    7:3    0 645.3M  1 loop /run/miso/sfs/rootfs
sda      8:0    1  28.7G  0 disk /run/miso/bootmnt
├─sda1   8:1    1   2.5G  0 part 
└─sda2   8:2    1     4M  0 part 
sr0     11:0    1  1024M  0 rom  
vda    253:0    0    50G  0 disk 
├─vda1 253:1    0    45G  0 part /mnt/var/log
│                                /mnt/var/cache
│                                /mnt/home
│                                /mnt
└─vda2 253:2    0     5G  0 part 
vdb    253:16   0    50G  0 disk 
└─vdb1 253:17   0    50G  0 part

but /dev/sda in my usb drive from where I booted the live manjaro

and this is VM, I do not think it has efi

Ah, it seems that you do not have a GRUB partition in VM.

  1. You need to create a new partition 300 MB for GRUB with the filesystem FAT32.

  2. Edit /etc/fstab to add a new GRUB mountpoint.

  3. Mount this new GRUB partition.

  4. Check if the config /etc/default/grub is correct.

  5. Reinstall GRUB and run update-grub

But I do not know if the step by step is correct.

There are infos about “Grub installation guide” in wiki and tutorials.


I am tired and need to go to bed.

Sidenote:

You can find good Information about Btrfs in the wiki

This is Raid (you can see it because both partitions have the same ID)

To see if it is Raid 0 or 1 or mixed you can mount it and use

btrfs filesystem usage -h #YOUR_MOUNT_POINT#

this will show RAID-Levels and also (when used as root): Device unallocated: 391.94GiB

My intention was not to use RAID. I installed manjaro with btrfs and after some time I added one more device because I needed more space.

[manjaro ~]# btrfs filesystem usage -h /mnt
Overall:
    Device size:		  95.00GiB
    Device allocated:		  90.99GiB
    Device unallocated:		   4.01GiB
    Device missing:		     0.00B
    Used:			  86.57GiB
    Free (estimated):		   6.39GiB	(min: 4.38GiB)
    Free (statfs, df):		   6.39GiB
    Data ratio:			      1.00
    Metadata ratio:		      2.00
    Global reserve:		 228.94MiB	(used: 0.00B)
    Multiple profiles:		        no

Data,single: Size:85.47GiB, Used:83.09GiB (97.22%)
   /dev/vda1	  39.47GiB
   /dev/vdb1	  46.00GiB

Metadata,DUP: Size:2.75GiB, Used:1.74GiB (63.28%)
   /dev/vda1	   5.50GiB

System,DUP: Size:8.00MiB, Used:16.00KiB (0.20%)
   /dev/vda1	  16.00MiB

Unallocated:
   /dev/vda1	  13.01MiB
   /dev/vdb1	   4.00GiB
[manjaro ~]# btrfs filesystem usage -h /mnt/home
Overall:
    Device size:		  95.00GiB
    Device allocated:		  90.99GiB
    Device unallocated:		   4.01GiB
    Device missing:		     0.00B
    Used:			  86.57GiB
    Free (estimated):		   6.39GiB	(min: 4.38GiB)
    Free (statfs, df):		   6.39GiB
    Data ratio:			      1.00
    Metadata ratio:		      2.00
    Global reserve:		 228.94MiB	(used: 0.00B)
    Multiple profiles:		        no

Data,single: Size:85.47GiB, Used:83.09GiB (97.22%)
   /dev/vda1	  39.47GiB
   /dev/vdb1	  46.00GiB

Metadata,DUP: Size:2.75GiB, Used:1.74GiB (63.28%)
   /dev/vda1	   5.50GiB

System,DUP: Size:8.00MiB, Used:16.00KiB (0.20%)
   /dev/vda1	  16.00MiB

Unallocated:
   /dev/vda1	  13.01MiB
   /dev/vdb1	   4.00GiB
[manjaro ~]# btrfs filesystem usage -h /mnt/var/cache
Overall:
    Device size:		  95.00GiB
    Device allocated:		  90.99GiB
    Device unallocated:		   4.01GiB
    Device missing:		     0.00B
    Used:			  86.57GiB
    Free (estimated):		   6.39GiB	(min: 4.38GiB)
    Free (statfs, df):		   6.39GiB
    Data ratio:			      1.00
    Metadata ratio:		      2.00
    Global reserve:		 228.94MiB	(used: 0.00B)
    Multiple profiles:		        no

Data,single: Size:85.47GiB, Used:83.09GiB (97.22%)
   /dev/vda1	  39.47GiB
   /dev/vdb1	  46.00GiB

Metadata,DUP: Size:2.75GiB, Used:1.74GiB (63.28%)
   /dev/vda1	   5.50GiB

System,DUP: Size:8.00MiB, Used:16.00KiB (0.20%)
   /dev/vda1	  16.00MiB

Unallocated:
   /dev/vda1	  13.01MiB
   /dev/vdb1	   4.00GiB

I have another VM in this host and this is the /etc/fstab:

#
# /etc/fstab
# Created by anaconda on Mon Jun 20 13:40:04 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/cs-root     /                       xfs     defaults        0 0
UUID=b3a67487-f0ea-4965-ab0d-6c00fa854cb8 /boot                   xfs     defaults        0 0
/dev/mapper/cs-swap     none                    swap    defaults        0 0

This is Centos. So it does not have any /boot/efi. I wonder to know why I should create for manjaro?

But this error at boot after updating Manjaro:

image

Where does this come out?

I do not know about this error, because I do not use virt-manager or gnome-boxes (Both use the same libvirt)

virt-manager might be special because no need GRUB bootloader? fstab in it is different than fstab is in host.

I use VirtualBox, OS setup in it is same as OS setup in my host. It supports snapshots well.
It lets you easily compare and test both setups.

This is called Raid 0 :wink: