Manjaro-chroot or chroot manually because btrfs

I FIGURED IT OUT!!!

I don’t mount my /home as a subvol, so if someone else uses this, you have to keep into consideration how YOUR /home is mounted in /etc/fstab
This is what I did in my case to make it work:

Boot into live env and open a console and type: (got lazy, did not continue testing when I got it working, but not all dirs might have to be mounted, like above mentioned /home f ex, I MIGHT do some more testing and find out)

edit yepp, I did some testing today and the only mounts needed is root, boot and the “hack” below for update-grub to work but saving all in the post for my own reference and mark this as the solution.

sudo mount -t btrfs -o subvol=@ /dev/sda7 /mnt
sudo mount -t vfat /dev/sda5 /mnt/boot/efi
sudo mount -t btrfs -o subvol=@cache /dev/sda7 /mnt/var/cache
sudo mount -t btrfs /dev/sda8 /mnt/home
sudo mount -t btrfs -o subvol=@log /dev/sda7 /mnt/var/log

Then comes the “hack” that makes it work, found sollution by reading this:

I found this question with a similar issue that said there was a known problem with the grub-mkconfig helper script.

So I:

sudo mkdir /mnt/hostrun
sudo mount --bind /run /mnt/hostrun

If I mount it directly to /run, all that folder will contain is a folder called “mount”. By mounting it to a directory I created first it somehow shows all directories correctly in /hostrun. I then mount THAT directory to /run within chroot:

sudo manjaro-chroot /mnt /bin/bash
mount --bind /hostrun /run

I can now use update-grub and it detects windows and my configured menus in 40_custom also works perfectly.

Now, can someone explain WHY this works I would be greateful.

Maybe even do a change to manjaro-chroot so if it detects a btrfs system it changes how it mounts? Or at least add some info in the Manjaro Wiki?

Is it just MY computer that does this? Call for testers. xD

On a side note, I find the absolute last comment from 2017 here pretty interesting.

Issue effects only installations on removable usb keys. Not a major problem then. Maybe we could add a information window that says: “Grub is now installed. If your other systems do not show in the grub menu, do not panic. Just boot and run ‘sudo update-grub’ in your manjaro installation.”

Edit
Just in case someone wants to really look deep into this, this might be helpful.
I did do some other tests before figuring this out. F ex I disabled os-prober in /etc/default/grub. That obviously fixed the error but made my win11 disappear.
Changing back to GRUB_DISABLE_OS_PROBER=false and running update-grub now produced NO ERRORS, but it also still did not detect my win11. But the error was gone for some reason.

Edit 2
I will mark this as a solution in a while, but I would REALLY appreciate some feedback, if possible. :hearts:

2 Likes