You are not logged in.

#1 2025-02-25 09:31:22

LinuxLover471
Member
Registered: 2025-02-23
Posts: 93

[Workaround]os-prober segmentation fault. GRUB new update mess!

Hi, my system was quite stable (in a reliable way) and because of some reason, when I tried to boot into windows 10 from grub, it said-

Setting partition type to 0x83
error: invalid signature.

Press any key to continue..._

And if I pressed a key then it sent me back to grub so I tried to use grub-mkconfig (for BIOS) and it gave some sort of segmentation fault core dumped error, So I thought about using os-prober but it gave the same error, Have a look at it.-

[ak@ak-G31M-ES2L ~]$ sudo 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.
/usr/lib/os-probes/50mounted-tests: line 72:  2997 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3118 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3137 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3156 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3189 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3208 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
Adding boot menu entry for UEFI Firmware Settings ...
done
[ak@ak-G31M-ES2L ~]$ sudo mount /dev/sda4 /mnt
[ak@ak-G31M-ES2L ~]$ sudo 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.
/usr/lib/os-probes/50mounted-tests: line 72:  3764 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3784 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3803 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3836 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  3855 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
Found Windows 10 on /dev/sda4
Adding boot menu entry for UEFI Firmware Settings ...
done
[ak@ak-G31M-ES2L ~]$ sudo os-prober
/dev/sda4:Windows 10:Windows:chain
/usr/lib/os-probes/50mounted-tests: line 72:  4236 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  4257 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  4277 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  4310 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72:  4330 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
[ak@ak-G31M-ES2L ~]$ 

Also I had reinstalled grub a few times but this did not fix the issue.
Also I had updated the system when this happened, when I reverted to an older version using timeshift the issue persisted. So the problem is probably with os-prober.

EDIT- I reverted to an even more older snapshot so it seems like the issue is with the new update of os-prober or grub.
When I updated the mirror and checked what is updatable I got this-

[ak@ak-G31M-ES2L ~]$ sudo pacman -Su
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Package (7)      Old Version          New Version               Net Change

extra/discord    0.0.86-1             0.0.87-1                    0.00 MiB
core/grub        2:2.12-3             2:2.12.r212.g4dc616657-2    1.89 MiB
extra/haruna     1.3.2-1              1.3.3-1                     0.01 MiB
extra/os-prober  1.81-2               1.83-1                      0.00 MiB
core/pacman      7.0.0.r6.gc685ae6-1  7.0.0.r6.gc685ae6-2         0.00 MiB
extra/sdl3       3.2.4-1              3.2.4-2                     0.00 MiB
core/which       2.22-1               2.23-1                      0.00 MiB

Total Installed Size:  300.72 MiB
Net Upgrade Size:        1.90 MiB

:: Proceed with installation? [Y/n] 

EDIT 2- After a little more investigation, it seems the new version of os-prober works fine, but the new version of grub is malfunctioning.
Thanks,
LL

Last edited by LinuxLover471 (2025-02-26 08:52:00)

Offline

#2 2025-02-25 10:04:29

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,547

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Moving to Newbie Corner as requested.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2025-02-25 12:38:23

Armand01
Member
Registered: 2025-02-25
Posts: 2

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Hello

I can confirm the same issue as @LinuxLover471

Since [ALPM] upgraded grub (2:2.12-3 -> 2:2.12.r212.g4dc616657-2)

/usr/lib/os-probes/50mounted-tests: line 72:  5895 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null

Offline

#4 2025-02-25 12:58:55

cycl0ps
Member
Registered: 2025-02-17
Posts: 1

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Hello,
Can confirm the same issue.
Running os-prober by itself does list WIndows Boot Manager but does seg fault later on.

/dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/usr/lib/os-probes/50mounted-tests: line 72: 74896 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 74916 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 74950 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null

Offline

#5 2025-02-25 13:35:15

lidistat67
Member
Registered: 2024-10-27
Posts: 2

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

I can confirm as well.

 /usr/lib/os-probes/50mounted-tests: line 72: 21648 Segmentation fault      (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null 

Offline

#6 2025-02-25 14:21:10

cryptearth
Member
Registered: 2024-02-03
Posts: 1,395

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

and I thought it was zfs because grub-mount hung on a zvol

Offline

#7 2025-02-25 14:31:19

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,842
Website

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Place this in /boot/grub/custom.cfg:

menuentry 'Windows' {
   search --fs-uuid --set=root $uuid
   chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

Replace $uuid with the actual filesystem UUID for the EFI system partition that contains bootmgfw.efi.

Do we really need os-prober for a 2-line menuentry stanza? I think not...


Jin, Jîyan, Azadî

Offline

#8 2025-02-25 14:50:06

LinuxLover471
Member
Registered: 2025-02-23
Posts: 93

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Head_on_a_Stick wrote:

Place this in /boot/grub/custom.cfg:

menuentry 'Windows' {
   search --fs-uuid --set=root $uuid
   chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

Replace $uuid with the actual filesystem UUID for the EFI system partition that contains bootmgfw.efi.

Do we really need os-prober for a 2-line menuentry stanza? I think not...

Hey, the solution is not full, as some people, like myself, use BIOS a based system, but I am pretty sure I can find more about this on the wiki.

But I think that everyone should wait before updating, as introducing issues and fixing them is not worth it you know.

Thanks for your kind suggestion,
LL

Offline

#9 2025-02-25 14:56:58

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,842
Website

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

For non-UEFI systems see https://wiki.archlinux.org/title/GRUB#W … S/MBR_mode.

os-prober is pretty useless anyway, it identifies root partitions by block devices rather than UUID in the multiboot kernel command lines, which isn't a good idea for systems with multiple disks. Custom menuentries are so simple to write, they are not difficult at all.


Jin, Jîyan, Azadî

Offline

#10 2025-02-25 15:34:32

LinuxLover471
Member
Registered: 2025-02-23
Posts: 93

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Head_on_a_Stick wrote:

For non-UEFI systems see https://wiki.archlinux.org/title/GRUB#W … S/MBR_mode.

os-prober is pretty useless anyway, it identifies root partitions by block devices rather than UUID in the multiboot kernel command lines, which isn't a good idea for systems with multiple disks. Custom menuentries are so simple to write, they are not difficult at all.

After adding the entry to custom.conf, and updating with it, it did make an entry of it. But after updating grub and running install and mkconfig again, it did not work this time.

Maybe I am missing something?

Thanks,
LL

Offline

#11 2025-02-25 16:35:49

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,842
Website

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Please don't full-quote unnecessarily, it bloats the thread and makes it harder to follow.

You should share your attempt at custom.conf and elaborate on the exact meaning of "did not work" — a description of what actually happens when the machine boots would be a good place to start. See also https://bbs.archlinux.org/viewtopic.php?id=57855.

Please note that adding "Bug report!" to the thread title does not constitute an actual bug report and is unlikely to be noticed by anybody who can fix this. In this case the problem appears to be with /usr/bin/grub-mount (did you try that command in isolation?) and probably related to the recent update of the grub package, which included a slew of vulnerability fixes and may have introduced a regression. That being the case you should report this to the GRUB developers directly: https://www.gnu.org/software/grub/grub-bugs.html


Jin, Jîyan, Azadî

Offline

#12 2025-02-25 17:26:27

jmandawg
Member
Registered: 2011-10-19
Posts: 62

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Head_on_a_Stick wrote:

Do we really need os-prober for a 2-line menuentry stanza? I think not...

Thank you this worked perfectly, time to uninstall os-prober,

Offline

#13 2025-02-26 06:58:48

LinuxLover471
Member
Registered: 2025-02-23
Posts: 93

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Head_on_a_Stick wrote:

Please don't full-quote unnecessarily, it bloats the thread and makes it harder to follow.

Okay, will do this from now on.

Head_on_a_Stick wrote:

You should share your attempt at custom.conf and elaborate on the exact meaning of "did not work" — a description of what actually happens when the machine boots would be a good place to start.

I had made a custom.conf in /boot/grub/ with sudo nano /boot/grub/custom.conf, and added this-

if [ "${grub_platform}" == "pc" ]; then
	menuentry "Microsoft Windows Vista/7/8/8.1/10 BIOS/MBR" {
		insmod part_msdos
		insmod ntfs
		insmod ntldr
		search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 169C095A9C0935B1
		ntldr /bootmgr
	}
fi

After doing this and using "grub-mkconfig -o /boot/grub/custom.conf" did make an entry for windows with the name mentioned in the code. I booted into the entry and it did work, (although the old entry made by os-prober was still there.) I then updated grub and then installed it on /dev/sda with grub-install and updated it with the same command mentioned earlier. But this time when I booted into windows, it just gave a black screen and the system did not progress, whereas normally it would almost immediately give the windows 10 logo. I had also tried this with the default grub.cfg file, by adding this to the last of the file, but I got the same issue.

I seem to have an idea on this, let's see if it works.

Head_on_a_Stick wrote:

Please note that adding "Bug report!" to the thread title does not constitute an actual bug report and is unlikely to be noticed by anybody who can fix this.

Okay.

Head_on_a_Stick wrote:

In this case the problem appears to be with /usr/bin/grub-mount (did you try that command in isolation?)

What do you mean by isolation? Is there a grub mount command? Also do you don't have this issue? (if possible, then try confirming with os-prober installed.)

Thanks,
LL

Offline

#14 2025-02-26 08:51:01

LinuxLover471
Member
Registered: 2025-02-23
Posts: 93

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

It seems that you have to change hd0,msdos1 according to your windows partition, in my case it was /dev/sda4 so I had to change it to hd0,msdos4. And use lsblk -lf to find the UUID

I had tried using-

if [ "${grub_platform}" == "pc" ]; then
	menuentry "Microsoft Windows Vista/7/8/8.1/10 BIOS/MBR" {
		insmod part_msdos
		insmod ntfs
		insmod ntldr
		search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 169C095A9C0935B1
		ntldr /bootmgr
	}
fi

But this did not work, for some unknown reason.

But then I tried this-

menuentry "Windows 10 (BIOS/MBR)" {
    insmod part_msdos
    insmod ntfs
    set root=(hd0,msdos4)
    chainloader +1
}

And oh boy, it worked like a charm.

Now some doubts to clear that I got when experimenting with different options.
1. You add/try these entries in /boot/grub/custom.cfg NOT .conf or grub.cfg.
2. You would not need to use grub-mkconfig as grub automatically picks up the custom.cfg file.

After this, I have removed os-prober and it works like a charm. I will add workaround to the start of the subject in the post.

Thanks,
LL

Offline

#15 2025-02-26 09:07:07

frostschutz
Member
Registered: 2013-11-15
Posts: 1,534

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

LinuxLover471 wrote:
		search --no-floppy --fs-uuid --set=root --hint …

I then updated grub and then installed it on /dev/sda with grub-install and updated it with the same command mentioned earlier. But this time when I booted into windows, it just gave a black screen and the system did not progress, whereas normally it would almost immediately give the windows 10 logo.

I have the same issue. It's the search command, which hangs (indefinitely? I rebooted after a few minutes) for some reason. It was instant before, even without --hints.

My system has many drives/partitions and most of them are just LUKS encrypted, so search should not be wasting any time on them. So not sure what might be the cause. I'll have to debug this in more detail.

I also verified that manually checking with `ls`, Grub sees the filesystem and file just fine. And setting root drive, and chainloading windows manually (no search command involved), Grub also boots Windows fine.

Booting windows through the mainboard boot menu also works (if your windows and grub are separate drives / entities)

Last edited by frostschutz (2025-02-26 09:08:26)

Offline

#16 2025-02-26 09:16:36

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,842
Website

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

LinuxLover471 wrote:
Head_on_a_Stick wrote:

In this case the problem appears to be with /usr/bin/grub-mount (did you try that command in isolation?)

What do you mean by isolation? Is there a grub mount command?

Yes: https://man.archlinux.org/man/grub-mount.1

Does that provide any extra information when run directly?

LinuxLover471 wrote:

Also do you don't have this issue?

I'm using Chimera Linux atm and that still has the old GRUB version. Arch packages directly from commits because upstream can't be bothered to release stuff properly hmm


Jin, Jîyan, Azadî

Offline

#17 2025-02-26 14:15:01

Armand01
Member
Registered: 2025-02-25
Posts: 2

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Offline

#18 2025-02-28 01:25:44

Strangiato
Member
Registered: 2020-01-10
Posts: 433

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

My setup is bios/mbr. Today I added a kernel parameter to my grub config, ran...

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

Rebooted, and since then I get this when trying to boot Windows 10:

Setting partition type to 0x83
error: invalid signature.

Press any key to continue..._

Last edited by Strangiato (2025-02-28 10:51:54)

Offline

#19 2025-02-28 07:06:18

LinuxLover471
Member
Registered: 2025-02-23
Posts: 93

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Strangiato wrote:

Rebooted, and since then I get this when trying to boot Windows 10:

Setting partition type to 0x83
error: invalid signature.

Press any key to continue..._

The issue is not fixed but there is a workaround. You can add this to /boot/grub/custom.cfg-

menuentry "Windows 10 (BIOS/MBR)" {
    insmod part_msdos
    insmod ntfs
    set root=(hd0,msdos4)
    chainloader +1
}

Replace hd0 and msdos4 with your appropriate drive and partition, use lsblk -lf to find your windows drive, my system has the windows drive on /dev/sda4 where sda stands for hd0 and 4 stands for msdos4.

Pretty simple, right?
Sincerely,
LL

Last edited by LinuxLover471 (2025-03-12 07:00:39)

Offline

#20 2025-02-28 11:14:45

Arch-eology
Member
Registered: 2025-02-28
Posts: 4

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

Encountered the same issue, found a *fix for it.

Just downgrade grub to version 2.12
then run update-grub.

That fixed it for me, won't reinstall the new current version of grub until they patch that bug. Hope this helps.

Offline

#21 2025-03-10 12:30:54

xunilhcra_2025
Member
Registered: 2025-02-21
Posts: 13

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

LinuxLover471 wrote:

The issue is not fixed but there is a workaround. You can add this to /boot/grub/custom.conf-

menuentry "Windows 10 (BIOS/MBR)" {
    insmod part_msdos
    insmod ntfs
    set root=(hd0,msdos4)
    chainloader +1
}

Replace hd0 and msdos4 with your appropriate drive and partition, use lsblk -lf to find your windows drive, my system has the windows drive on /dev/sda4 where sda stands for hd0 and 4 stands for msdos4.

Pretty simple, right?
Sincerely,
LL

Thanks, just found out I have this issue as well after putting an existing Win10 drive into the system.

Question:  Do I need to set GRUB_DISABLE_OS_PROBER to true in /etc/default/grub prior to 'sudo grub-mkconfig -o /boot/grub/grub.cfg'  after putting your fix in /boot/grub?

Question2:  Is it custom.conf or custom.cfg?  I see a reference to custom.cfg in the existing /boot/grub/grub.cfg but nothing for custom.conf.

Offline

#22 2025-03-12 07:06:21

LinuxLover471
Member
Registered: 2025-02-23
Posts: 93

Re: [Workaround]os-prober segmentation fault. GRUB new update mess!

xunilhcra_2025 wrote:

Question:  Do I need to set GRUB_DISABLE_OS_PROBER to true in /etc/default/grub prior to 'sudo grub-mkconfig -o /boot/grub/grub.cfg'  after putting your fix in /boot/grub?

Question2:  Is it custom.conf or custom.cfg?  I see a reference to custom.cfg in the existing /boot/grub/grub.cfg but nothing for custom.conf.

Ans 1- No, you would have the entry GRUB_DISABLE_OS_PROBER=false with a # before it, it means that it is commented out, in other words, if you want to use os-prober to detect the drive then uncomment it, if not then comment it(by adding # before the line), you can add true if you don't want to uncomment it as grub by default disables os-prober and does not need to add true.

2nd question is answered in the post #14, also thanks for pointing out .conf error, I typed in .conf instead of .cfg.

Hope this helps,
LL

Offline

Board footer

Powered by FluxBB