Manjaro-chroot or chroot manually because btrfs

It looks like you are doing the grub-boot-iso dance.

If you - instead of using the 40_custom file - use the /boot/grub/custom.cfg - it won’t break your grub - and if you make a mistake - it still doesn’t break your grub.

I just checked my system and yes, like yours but for some reason there is a lvm and card1.lock that you don’t have.
Should I check what it looks like in live?
IIRC it was empty, but my memory is not the same it was a few years ago so I will check that and come back,

From my system, non-live:

ls -l /var/lock/
total 12
-rw-r--r-- 1 root root 22 Jun 24 14:10 asound.state.lock
-rw-r--r-- 1 root root 22 Jun 24 14:10 card0.lock
-rw-r--r-- 1 root root 22 Jun 24 14:10 card1.lock
drwxrwxrwt 2 root root 40 Jun 24 12:13 dmraid
drwx------ 2 root root 40 Jun 24 12:13 lvm
drwxr-xr-x 2 root root 40 Jun 24 12:13 subsys
drwxr-xr-x 2 root root 40 Jun 24 15:00 timeshift

ls -l /var/lock/dmraid
total 0

On another note, how do you guys make the preformated text into those “foldable” buttons here on the forum?

Aaah, I will try that, I just used the 40_custom file because its easier to keep things in order. Do you think the 40_custom file is unreadable with update-grub and that is why it throws the error?
I will try that as well and see if that changes anything and come back and report.

In the toolbar of the post editor… :arrow_down:

1 Like

I can update my grub config on a btrfs system using the following steps - assuming a default Calamares install - your system appears from the previous fstab to a default Calamares install

  1. mount the partition on /mnt - on my system it is sda2 - it may differ for your system
  2. mount the efi partition to /mnt/@/boot/efi - on my system sda1 - it may differ for your system
  3. bind mount the @cache, @home and @log to the relevant folders inside /mnt/@
  4. execute manjaro-chroot using the /mnt/@ as the root and /bin/bash as the shell
sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/@/boot/efi
sudo mount --bind /mnt/@cache /mnt/@/var/cache
sudo mount --bind /mnt/@home /mnt/@/home
sudo mount --bind /mnt/@log /mnt/@/var/log
sudo manjaro-chroot /mnt/@ /bin/bash

Do your config changes - what you need to do.

If you need to update grub you can safely ignore the message ERROR: mkdir /var/lock/dmraid - the configuration will be updated as you expect.

When you are done - exit the chroot

exit

And reboot the system

1 Like

If you use the -o subvol=@ mount option for mounting the on-disk root filesystem to /mnt, then you don’t need to specify the @/ in the paths for the subsequent target mounpoints. Also, you don’t have to use bind-mounts if you mount the subvolumes directly via the subvol option. :arrow_down:

sudo mount -t btrfs -o subvol=@ /dev/sda2 /mnt
sudo mount -t vfat /dev/sda1 /mnt/boot/efi
sudo mount -t btrfs -o subvol=@cache /dev/sda2 /mnt/var/cache
sudo mount -t btrfs -o subvol=@home /dev/sda2 /mnt/home
sudo mount -t btrfs -o subvol=@log /dev/sda2 /mnt/var/log
sudo manjaro-chroot /mnt/ /bin/bash

:wink:

2 Likes

I managed to hook the 2 most awesome “manjaro dudes” here on the forum, you are both FANTASTIC! :love_you_gesture:

I have a few things to test out now and will get to it, probably later this evening and then come back with reports.

THANK YOU FROM THE BOTTOM OF MY HEART!!! :hearts:

Edit
@linux-aarhus my offer to that game still stands btw, I haven’t forgotten, just throw me a dm if you want to. No preassure ofc! <3

2 Likes

We are members of the…

:crazy_face: :rofl:

1 Like

Update:

JUST when starting to type this update, 3 lines in to be exact, I realized one crucial thing I COMPLETELY forgot about, and I can not expect you to pick that up through the tiny hints that are there.

As you can see I have my / at sda7, the reason, I also have a windows 11 installation, the os-prober never mentions finding windows, so that is probably where it fails?
It’s still strange though, the grub menu should not be completely disabled, the snapshots are found.

Example of a WORKING update-grub:

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Found snapshot: 2023-06-23 18:00:01 | timeshift-btrfs/snapshots/2023-06-23_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-22 18:00:01 | timeshift-btrfs/snapshots/2023-06-22_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-21 18:00:01 | timeshift-btrfs/snapshots/2023-06-21_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-20 20:22:27 | timeshift-btrfs/snapshots/2023-06-20_20-22-27/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-20 18:00:01 | timeshift-btrfs/snapshots/2023-06-20_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-20 17:00:01 | timeshift-btrfs/snapshots/2023-06-20_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-19 18:00:01 | timeshift-btrfs/snapshots/2023-06-19_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-18 18:00:02 | timeshift-btrfs/snapshots/2023-06-18_18-00-02/@ | daily    | N/A                                           |
Found snapshot: 2023-06-17 18:00:01 | timeshift-btrfs/snapshots/2023-06-17_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-16 21:47:16 | timeshift-btrfs/snapshots/2023-06-16_21-47-16/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-15 21:29:16 | timeshift-btrfs/snapshots/2023-06-15_21-29-16/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-13 17:00:01 | timeshift-btrfs/snapshots/2023-06-13_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-06 21:33:25 | timeshift-btrfs/snapshots/2023-06-06_21-33-25/@ | ondemand | N/A                                           |
Found snapshot: 2023-06-06 17:00:01 | timeshift-btrfs/snapshots/2023-06-06_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-05 23:00:08 | timeshift-btrfs/snapshots/2023-06-05_23-00-08/@ | monthly  | N/A                                           |
Found snapshot: 2023-05-30 17:00:01 | timeshift-btrfs/snapshots/2023-05-30_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-05-30 14:28:02 | timeshift-btrfs/snapshots/2023-05-30_14-28-02/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-29 01:58:22 | timeshift-btrfs/snapshots/2023-05-29_01-58-22/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-29 00:48:57 | timeshift-btrfs/snapshots/2023-05-29_00-48-57/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-25 20:54:40 | timeshift-btrfs/snapshots/2023-05-25_20-54-40/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-05 23:00:02 | timeshift-btrfs/snapshots/2023-05-05_23-00-02/@ | monthly  | N/A                                           |
Found 21 snapshot(s)
Unmount /tmp/grub-btrfs.uOi9myYczu .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
done

Note: Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi

Maybe it’s ONLY the os prober at play here, and everything else works?

I won’t go through the whole process I went through, the conclusion is the error is consistent no matter how I mount, the manjaro-chroot works if I do the process you guys gave me, I can also su bedna and all seems to work.
cache log and home is probably not needed if I stay as root.

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 &&
sudo manjaro-chroot /mnt /bin/bash

Again, I removed every extra menu item created by removing the 40_custom file so only the windows 11 is the “out of the ordinary” now.

Edit
There is a file called 41_custom though that I do NOT recognize, should that be there??

#!/bin/sh
cat <<EOF
if [ -f  \${config_directory}/custom.cfg ]; then
  source \${config_directory}/custom.cfg
elif [ -z "\${config_directory}" -a -f  \$prefix/custom.cfg ]; then
  source \$prefix/custom.cfg
fi
EOF
ls /etc/grub.d
00_header  10_linux  20_linux_xen  30_os-prober  30_uefi-firmware  35_fwupd  41_custom  41_snapshots-btrfs  60_memtest86+  60_memtest86+-efi  README

Edit 2
Do you want me to start a new thread? Or change the name of it or something?

That path is wrong. /dev/sda1 is a device special file, not a directory. Therefore, it cannot have any subdirectory named @ or efi below it, and it cannot be a mountpoint.

Furthermore, the device as spelled out above is /dev/sda1@, which I don’t even think exists — btrfs subvolumes are not block devices, only the parent partition is.


Disclaimer: I don’t use Microsoft Windows and I have only one operating system on my computer. Therefore I am also not using os-prober, and I have no idea how it works. :man_shrugging:

I have no idea, all I can say is it works, the windows option is in my grub menu and It works to boot. I used it yesterday to shrink a ntfs volume to fit the iso files that started all this. xD
I’m going to try to boot into windows right after this to see that it still works, but pretty sure that line has looked like that forever for me.

So where do I go from here? Is this a grub issue or who manages the os_prober scripts. Is there anywhere I can request support?
Even though I feeeeel like this is a manjaro thing (im running manjaro, using manjaro-chroot), it might not also be the correct place to ask for help?

Edit
Yepp, hello, this is a robot typing from windows 11… xD

I’m sorry, but now I’m sriously getting confused as to what the problem is… :arrow_down:

… and in the same post… :arrow_down:

:confused:

Yes, it exists on my system as well.

Sorry. I was probably unclear.
The line Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi does not exist when running update-grub within a chroot session. The log containing that line is from my REAL system running update-grub

chroot session: (fails after os-prober and grub menu is gone, booting straight into manjaro)

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Found snapshot: 2023-06-23 18:00:01 | timeshift-btrfs/snapshots/2023-06-23_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-22 18:00:01 | timeshift-btrfs/snapshots/2023-06-22_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-21 18:00:01 | timeshift-btrfs/snapshots/2023-06-21_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-20 20:22:27 | timeshift-btrfs/snapshots/2023-06-20_20-22-27/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-20 18:00:01 | timeshift-btrfs/snapshots/2023-06-20_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-20 17:00:01 | timeshift-btrfs/snapshots/2023-06-20_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-19 18:00:01 | timeshift-btrfs/snapshots/2023-06-19_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-18 18:00:02 | timeshift-btrfs/snapshots/2023-06-18_18-00-02/@ | daily    | N/A                                           |
Found snapshot: 2023-06-17 18:00:01 | timeshift-btrfs/snapshots/2023-06-17_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-16 21:47:16 | timeshift-btrfs/snapshots/2023-06-16_21-47-16/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-15 21:29:16 | timeshift-btrfs/snapshots/2023-06-15_21-29-16/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-13 17:00:01 | timeshift-btrfs/snapshots/2023-06-13_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-06 21:33:25 | timeshift-btrfs/snapshots/2023-06-06_21-33-25/@ | ondemand | N/A                                           |
Found snapshot: 2023-06-06 17:00:01 | timeshift-btrfs/snapshots/2023-06-06_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-05 23:00:08 | timeshift-btrfs/snapshots/2023-06-05_23-00-08/@ | monthly  | N/A                                           |
Found snapshot: 2023-05-30 17:00:01 | timeshift-btrfs/snapshots/2023-05-30_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-05-30 14:28:02 | timeshift-btrfs/snapshots/2023-05-30_14-28-02/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-29 01:58:22 | timeshift-btrfs/snapshots/2023-05-29_01-58-22/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-29 00:48:57 | timeshift-btrfs/snapshots/2023-05-29_00-48-57/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-25 20:54:40 | timeshift-btrfs/snapshots/2023-05-25_20-54-40/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-05 23:00:02 | timeshift-btrfs/snapshots/2023-05-05_23-00-02/@ | monthly  | N/A                                           |
Found 21 snapshot(s)
Unmount /tmp/grub-btrfs.PpCgm3PZbz .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
done

MY system, right now: (everything works perfectly, win11 entry is in grub boot menu)

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Found snapshot: 2023-06-24 19:04:21 | timeshift-btrfs/snapshots/2023-06-24_19-04-21/@ | daily    | N/A                                           |
Found snapshot: 2023-06-23 18:00:01 | timeshift-btrfs/snapshots/2023-06-23_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-22 18:00:01 | timeshift-btrfs/snapshots/2023-06-22_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-21 18:00:01 | timeshift-btrfs/snapshots/2023-06-21_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-20 20:22:27 | timeshift-btrfs/snapshots/2023-06-20_20-22-27/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-20 18:00:01 | timeshift-btrfs/snapshots/2023-06-20_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-20 17:00:01 | timeshift-btrfs/snapshots/2023-06-20_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-19 18:00:01 | timeshift-btrfs/snapshots/2023-06-19_18-00-01/@ | daily    | N/A                                           |
Found snapshot: 2023-06-18 18:00:02 | timeshift-btrfs/snapshots/2023-06-18_18-00-02/@ | daily    | N/A                                           |
Found snapshot: 2023-06-16 21:47:16 | timeshift-btrfs/snapshots/2023-06-16_21-47-16/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-15 21:29:16 | timeshift-btrfs/snapshots/2023-06-15_21-29-16/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2023-06-13 17:00:01 | timeshift-btrfs/snapshots/2023-06-13_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-06 21:33:25 | timeshift-btrfs/snapshots/2023-06-06_21-33-25/@ | ondemand | N/A                                           |
Found snapshot: 2023-06-06 17:00:01 | timeshift-btrfs/snapshots/2023-06-06_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-06-05 23:00:08 | timeshift-btrfs/snapshots/2023-06-05_23-00-08/@ | monthly  | N/A                                           |
Found snapshot: 2023-05-30 17:00:01 | timeshift-btrfs/snapshots/2023-05-30_17-00-01/@ | weekly   | N/A                                           |
Found snapshot: 2023-05-30 14:28:02 | timeshift-btrfs/snapshots/2023-05-30_14-28-02/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-29 01:58:22 | timeshift-btrfs/snapshots/2023-05-29_01-58-22/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-29 00:48:57 | timeshift-btrfs/snapshots/2023-05-29_00-48-57/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-25 20:54:40 | timeshift-btrfs/snapshots/2023-05-25_20-54-40/@ | ondemand | N/A                                           |
Found snapshot: 2023-05-05 23:00:02 | timeshift-btrfs/snapshots/2023-05-05_23-00-02/@ | monthly  | N/A                                           |
Found 21 snapshot(s)
Unmount /tmp/grub-btrfs.Re9LGDAUTs .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
done

This, to me, suggests that your live session and your installed version are not both booting in native UEFI mode. I even suspect that it’s the live session that boots in legacy BIOS emulation mode, because as far as I know — but then again, it’s Microsoft Windows, and I don’t use that OS — Windows 11 requires a native UEFI boot.

What this means concretely is that if you have two operating systems on the same drive that boot in different modes — i.e. one in native UEFI mode and the other in legacy BIOS mode — then os-prober will not detect the one running in the other mode. Considering that it does detect your Windows installation when running from the installed Manjaro, the Manjaro installation must be the one booting in native UEFI mode, but for some reason, your live installation did not.

Try disabling legacy BIOS emulation (CSM) in the UEFI settings utility and see whether it makes a difference. :thinking:

Set GRUB_TIMEOUT_STYLE=menu in /etc/default/grub and then run sudo update-grub.

Ok, don’t be mad at me now… takes deep breath

I have had GRUB_TIMEOUT_STYLE=hidden in my grub config since… well I started using Manjaro. I recall reading up on the setting and pushing it away as “hiding the timeout doesn’t work, I still see it” and just left it at that.

For some reason, maybe you can explain why, when I run sudo update grub normally, the grub menu shows after boot, but if I do it in a live sesh, suddenly the menu dissapears.
So if I change the setting to GRUB_TIMEOUT_STYLE=menu I can run update-grub in live, but the win11 is still not detected.
With GRUB_TIMEOUT_STYLE=hidden the menu still “waits for my input”, I know this because I changed my timeout to 20, and my bootscreen (press del to enter bios) kept showing, for 20s. And if I retried, then pressing enter during that time, yeah, it started loading.
So 2 steps forward, 1 step back. xD

CSM was disabled

The usb def boots into UEFI (the second one is a ventoy, I tried using it and booting both “normal” and in “grub2 mode” whatever that means, but no difference)


Hiding the menu does not affect the timeout — as you have experienced. :wink:

That suggests that the live session is reading a different /etc/default/grub, which in turn suggests that you’re not doing it from within the chroot environment.

The chroot should really only pick up what is on your installed system, with the exception of one thing, i.e. the running kernel. So if you want to rebuild your initramfs from within the chroot, then you have to tell it to rebuild the initramfs for your installed kernels, as opposed to the running kernel. But that’s about the only difference.

But of course, if you’re going to run update-grub from within the live session but outside of the chroot, then it’s not going to pick up your on-disk configuration.

At this point I’m only guessing, because I am not at your system and I have no idea what you are or have been doing. :man_shrugging:

Also, check the OS_PROBER setting in /etc/default/grub.

I thought so too for a while, until I left a commented out line in the file from here, and that comment was showing in the file while accessing it in chroot as well.

Ofc, I only do this from within a chroot.

My brain feels like mush so I will put this on hold until tomorrow (I say that, and then in 6hrs I will be back at it, fkn add… xD), and keep this thread open unless you as a mod object to it?

I will even analyze the os_prober script and see if I can understand anything from that.

Thank you both for the AMAZING support! :hearts: :hearts:

1 Like

Hello bedna, glad that you enjoy the community here at Manjaruminati.

If you want to show a little extra appreciation please consider donating to us to keep the constant stream of ILUMINAA!!!“%¤#¤%#”" *ERROR, BOT MALFUNCTION; all_your_base_are_belong_to_us

File:Guru meditation.gif

1 Like

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

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