You are not logged in.

#1 2023-09-06 09:06:13

riccbi
Member
Registered: 2023-03-01
Posts: 9

[SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Hello everyone,
I'm new to arch linux, then I might be missing some important information. It's been three months since I updated grub to a version subsequent to grub-2:2.06.r566.g857af0e17-1 and now, every time that I run grub-mkconfig with os-prober enabled, no other OS can be found (I have a triple boot with ubuntu and win). At the moment I'm sticking with the last grub version that can find my OSs but I'd like to understand why the newer cannot.

This is the output when i run grub-mkconfig while grub version (grub-2:2.06.r566.g857af0e17-1 ) is installed:

# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-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/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 22.04.2 LTS (22.04) on /dev/nvme0n1p5
Adding boot menu entry for UEFI Firmware Settings ...
done

with this version all OSs are correctly found.

This is instead the output when i run grub-mkconfig while the current grub version (grub-2:2.12rc1-1) is installed:

# grub-mkconfig -o /boot/grub/grub.cfg
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-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.
Adding boot menu entry for UEFI Firmware Settings ...
done

As you can see no other OS is found, and no grub version after grub-2:2.06.r566.g857af0e17-1 seems to be capable of.
I'm currently using the last kernel in the repositories: linux 6.4.12.arch1-1
What can I do? Thanks in advance.

Last edited by riccbi (2023-09-12 13:51:41)

Offline

#2 2023-09-06 16:25:45

-thc
Member
Registered: 2017-03-15
Posts: 516

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Take a look at the end of the file "/etc/default/grub".

If I remember that correctly the default behavior was changed after r566.

Offline

#3 2023-09-06 20:02:30

riccbi
Member
Registered: 2023-03-01
Posts: 9

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

-thc wrote:

Take a look at the end of the file "/etc/default/grub".

If I remember that correctly the default behavior was changed after r566.

Thank you for replying, I've taken a look at that file and i think that the only lines related to os prober are:

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false

The line is uncommented and I think that os-prober runs but can't find any OS.

Offline

#4 2023-09-06 20:42:03

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Is indeed no other OS found (os-prober isn't part of grub) or are they just not printed to stdout?
What does the resulting /boot/grub/grub.cfg look like?

Online

#5 2023-09-06 21:17:36

riccbi
Member
Registered: 2023-03-01
Posts: 9

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

seth wrote:

Is indeed no other OS found (os-prober isn't part of grub) or are they just not printed to stdout?
What does the resulting /boot/grub/grub.cfg look like?

I can't see nothing on stdout nor on the grub menu on startup.

This is the grub.cfg when i run a grub-mkconfig with the current grub version (2.12rc1-1)
and this is the grub.cfg with the last grub version that i can make os-prober work with (2.06.r566).

I can see that in the latter case there are multiple menu entries.

Last edited by riccbi (2023-09-06 21:18:27)

Offline

#6 2023-09-06 22:12:25

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

What if you only preserve the old /etc/grub.d/30_os-prober ?

Online

#7 2023-09-07 09:39:57

riccbi
Member
Registered: 2023-03-01
Posts: 9

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

seth wrote:

What if you only preserve the old /etc/grub.d/30_os-prober ?

I'm sorry for the late response, but it was night time out here.

I ran a diff on the /etc/grub.d/30_os-prober prior and after the upgrade and it printed nothing, so I don't think that it changed between upgrades.

After reinstalling the last version, i ran the usual grub-mkconfig and now os-prober finds windows...

# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-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/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

I don't understand why Ubuntu is nowhere to be seen.

Offline

#8 2023-09-08 01:07:18

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Same here with a double issue (kde).

Dual boot with Manjaro unstable (btrfs) and if it's set first in the boot sequence, all is good. When Arch is set first (ext4), the other OS is not in the boot menu. Furthermore, after the fresh install setup, if we keep it that way, we must update-grub in Manjaro to access mainline Kernel (miffe). Next release candidate overwrites previous one normally.

They both have the same grub version: 2:2.12rc1-1

This double issue is also present with Neon unstable (JJ) since a long time (mainline ppa).

We tried to replace 30_os_prober with the Manjaro one, no go. Also, we tried os-prober btrfs and os-prober-git.  In all cases, the update-grub reading is same as OP. No to say that enabling os-prober in Grub has no effect.

$ dkms status
broadcom-wl/6.30.223.271, 6.5.0-1-mainline, x86_64: installed
broadcom-wl/6.30.223.271, 6.5.2-arch1-1, x86_64: installed

Linux stable (core-testing) is not affected.

$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-mainline
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-linux-mainline.img
Found fallback initrd image(s) in /boot:  intel-ucode.img amd-ucode.img initramfs-linux-mainline-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img amd-ucode.img initramfs-linux-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.
Adding boot menu entry for UEFI Firmware Settings ...
done

Don't we all have that issue?

Last edited by Archcan_98 (2023-09-08 01:15:45)

Offline

#9 2023-09-08 15:19:29

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Edit /usr/bin/os-prober, add

exec > /tmp/os-prober.log 2>&1
set -x

right below the shebang, run grub-mkconfig (wtf is "update-grub"??) and post the /tmp/os-prober.log

cat /tmp/os-prober.log | curl -F 'file=@-' 0x0.st

Online

#10 2023-09-08 17:21:53

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

If this is correct, no trace of the second OS in the Arch grub menu. Removing set -e makes no different.
/usr/bin/os-prober:

#!/bin/sh
exec > /tmp/os-prober.log 2>&1
set -x
set -e

http://0x0.st/Hfao.txt


An AUR package, a Simple wrapper around grub-mkconfig.

$ pacman -Q update-grub
update-grub 0.0.1-8

No trace of the other OS when running grub-mkconfig.

Edit:
Searching btrfs in the log file leads to no result. Here's the install:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

NAME        FSTYPE   SIZE MOUNTPOIN LABEL
nvme0n1            238.5G           
├─nvme0n1p1 vfat     300M /boot/efi 
├─nvme0n1p2 btrfs  140.5G           
├─nvme0n1p3 swap     8.6G [SWAP]    
└─nvme0n1p4 ext4    89.1G / 

Last edited by Archcan_98 (2023-09-08 17:37:06)

Offline

#11 2023-09-08 18:37:14

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Rever the change to os-prober, edit /usr/lib/os-probes/50mounted-tests instead

exec > /tmp/50mounted-tests.log 2>&1
set -x

Online

#12 2023-09-09 01:31:49

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

grub-mkconfig creates this file in tmp: 50mounted-tests.log

http://0x0.st/HfMY.txt

Last edited by Archcan_98 (2023-09-09 01:37:06)

Offline

#13 2023-09-09 06:41:16

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

It mounts and checks /usr/lib/os-probes/mounted/90linux-distro - so we'll analyze that next…

Online

#14 2023-09-09 17:10:22

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Good Saturday to all and thanks for addressing this issue,

cat /tmp/90linux-distro-tests.log | curl -F 'file=@-' 0x0.st

http://0x0.st/Hfjx.txt

BTW, this bug is older here than the previous version of Grub.

Last edited by Archcan_98 (2023-09-13 00:38:05)

Offline

#15 2023-09-09 19:22:50

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

+ exit 1

means

if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then

is false
$dir is /var/lib/os-prober/mount.

Revert the changes and make this

…
partition="$1"
dir="$2"
type="$3"

ls -lR "$dir" > /tmp/foreign_partition.wtf # <============== add only this line

# This test is inaccurate, but given separate / and /boot partitions and the
…

And upload /tmp/foreign_partition.wtf

Online

#16 2023-09-10 00:22:40

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Sorry for the last post. Not sure if I had to create <<mount>>, but got a file anyway?

ls: cannot access '/var/lib/os-prober/mount/@/bin/rankmirrors': No such file or directory

At least we see timeshift. One snapshot left: 20230909 was created manually this afternoon after the update. The line added to 90linux-distro has been removed.

/var/lib/os-prober/mount:
total 0
dr-xr-xr-x 0 root root 0 Aug 26 14:25 @
dr-xr-xr-x 0 root root 0 Sep  9 14:22 @cache
dr-xr-xr-x 0 root root 0 Sep  9 14:22 @home
dr-xr-xr-x 0 root root 0 Dec 31  1969 @log
dr-xr-xr-x 0 root root 0 Dec 31  1969 @swap
dr-xr-xr-x 0 root root 0 Sep  9 14:22 timeshift-btrfs

/var/lib/os-prober/mount/@:
total 28
dr-xr-xr-x 0 root root     0 Sep  3 13:14 bin
dr-xr-xr-x 0 root root     0 Sep  9 14:20 boot
-r--r--r-- 0 root root 22997 Aug 24 22:45 desktopfs-pkgs.txt
dr-xr-xr-x 0 root root     0 Aug 25 16:47 dev
dr-xr-xr-x 0 root root     0 Sep  9 14:22 etc
dr-xr-xr-x 0 root root     0 Aug 25 16:47 home
dr-xr-xr-x 0 root root     0 Sep  3 13:14 lib
dr-xr-xr-x 0 root root     0 Sep  3 13:14 lib64
dr-xr-xr-x 0 root root     0 Aug  5 10:22 mnt
dr-xr-xr-x 0 root root     0 Aug 25 16:49 opt
dr-xr-xr-x 0 root root     0 Aug 25 16:47 proc
dr-xr-xr-x 0 root root     0 Sep  6 20:26 root
-r--r--r-- 0 root root  5339 Aug 24 22:39 rootfs-pkgs.txt
dr-xr-xr-x 0 root root     0 Aug 25 16:47 run
dr-xr-xr-x 0 root root     0 Sep  3 13:14 sbin
dr-xr-xr-x 0 root root     0 Aug 24 22:38 srv
dr-xr-xr-x 0 root root     0 Aug 25 16:47 swap
dr-xr-xr-x 0 root root     0 Aug 25 16:47 sys
dr-xr-xr-x 0 root root     0 Aug 25 16:49 tmp
dr-xr-xr-x 0 root root     0 Sep  9 14:19 usr
dr-xr-xr-x 0 root root     0 Sep  9 14:21 var

/var/lib/os-prober/mount/@/bin:

Last edited by Archcan_98 (2023-09-10 00:23:04)

Offline

#17 2023-09-10 06:04:25

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Sorry for the last post.

Why?
As long as you're not trying to run the scripts directly but through grub-mkconfig, you don't have to mount anything specifically.

The problem would be the "@" subvolume showing up there?
(I assume the generated foreign_partition.wtf is much longer any ou copypasted the above out of the pager? In future please don't, upload them. But we'll just roll w/ that theory)

partition="$1"
dir="$2"
type="$3"

[ "$type" = "btrfs" ] && dir="$dir/@" # <======== add this line

# This test is inaccurate, but given separate / and /boot partitions and the

Online

#18 2023-09-10 16:44:38

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Why? We seem to have 5 hours difference and want it to go faster.

It is not that inaccurate, because it is the exact time of snapshot creation and it shows the fresh install date.

Yes, the content is longer if we let the process run longer (grub-mkconfig). At first, we thought that is was a no end loop, but it's not and it takes an eternity. I

### BEGIN /etc/grub.d/30_os-prober ###
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.
ls: cannot access '/var/lib/os-prober/mount/@/bin/rankmirrors': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/lua5.4': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/lookandfeeltool': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/x86_64-linux-gnu-gcc': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/qmleasing6': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/mount.ntfs': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/mount.lowntfs-3g': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/x86_64-linux-gnu-c++': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/kinfocenter': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/qmlls6': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/qml6': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/mount.ntfs-3g': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/luac5.4': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/qmake6': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/x86_64-linux-gnu-gcc-nm': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/qmlscene6': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/androiddeployqt6': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/baloo_file': No such file or directory
ls: cannot access '/var/lib/os-prober/mount/@/bin/x86_64-linux-gnu-gcc-ranlib': No such file or directory
Stopped there.

Will try now to give timeshift a cold shower.

Here's the file again and we let the process run longer. Thanks for your devotion:


$ cat /tmp/foreign_partition.wtf | curl -F 'file=@-' 0x0.st

http://0x0.st/Hfpj.txt

Last edited by Archcan_98 (2023-09-13 00:37:33)

Offline

#19 2023-09-10 17:34:46

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

No go! Deleting the only snapshot first and timeshift + timeshift-autosnap is the same ball game after restart. @ is still there:

Last edited by Archcan_98 (2023-09-13 00:36:49)

Offline

#20 2023-09-10 18:30:41

seth
Member
Registered: 2012-09-03
Posts: 52,263

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

I've frankly no idea what you're talking about, but "@" is the root subvolume and the idea of #17 was to simply include that into the tested path (if the FS type is btrfs)

Online

#21 2023-09-12 09:44:54

Hrsat
Member
Registered: 2023-09-12
Posts: 1

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

just install fuse3 which is depending by grub
you can fixing it follow this:
https://www.umutsagir.com/solution-to-o … 0partition.

Offline

#22 2023-09-12 13:50:20

riccbi
Member
Registered: 2023-03-01
Posts: 9

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Hrsat wrote:

just install fuse3 which is depending by grub
you can fixing it follow this:
https://www.umutsagir.com/solution-to-o … 0partition.

Yes! That was it, thank you very much, now when i run grub-mkconfig all the installed OSs are found.

Offline

#23 2023-09-13 00:38:56

Archcan_98
Member
Registered: 2023-09-08
Posts: 36

Re: [SOLVED] Unable to run successfully os-prober since grub 2.06.r566

Same here, thanks mate.

Offline

Board footer

Powered by FluxBB