Bug#1103935: os-prober: Hurd detection produces unusable grub.cfg fragment

2025-04-22 Thread Martin-Éric Racine
ke 23.4.2025 klo 9.20 Martin-Éric Racine (martin-eric.rac...@iki.fi) kirjoitti:
>
> ke 23.4.2025 klo 9.13 Pascal Hambourg (pas...@plouf.fr.eu.org) kirjoitti:
> >
> > On 23/04/2025 at 06:08, Martin-Éric Racine wrote:
> > >
> > > In its current form, os-prober produces an unusable GRUB config segment 
> > > when it finds a Hurd partition:
> > >
> > > 1) It wants to boot a /boot/gnumach.gz file that doesn't exist. Mach 
> > > kernel files include version numbers.
> > >
> > > Once that has been manually fixed in grub.cfg to e.g. 
> > > /boot/gnumach-1.8-486-up.gz, a second problem emerges:
> > >
> > > 2) The config fragment passes the incorrect root device, which makes the 
> > > Mach kernel fail to find its Hurd of services.
> >
> > os-prober does not generate GRUB menu entries. It just detects operating
> > systems, and GRUB helper script 30_os-prober uses its output to generate
> > menu entries. Is os-prober output for Hurd incorrect ?
>
> Yes, as stated above, the output is incorrect.

More precisely, what 30_os-prober produces is incorrect. Looking
towards the end of the script is where the incorrect menu entry gets
generated. If you think that this makes it a bin:grub-common issue,
you're welcome to reassign the bug.

Martin-Éric



Bug#1103935: os-prober: Hurd detection produces unusable grub.cfg fragment

2025-04-22 Thread Pascal Hambourg

On 23/04/2025 at 08:20, Martin-Éric Racine wrote:

ke 23.4.2025 klo 9.13 Pascal Hambourg (pas...@plouf.fr.eu.org) kirjoitti:


os-prober does not generate GRUB menu entries. It just detects operating
systems, and GRUB helper script 30_os-prober uses its output to generate
menu entries. Is os-prober output for Hurd incorrect ?


Yes, as stated above, the output is incorrect.


Can you show a raw os-prober actual output (not the resulting GRUB menu 
entry) for Hurd and what you think it should be ?




Bug#1103935: os-prober: Hurd detection produces unusable grub.cfg fragment

2025-04-22 Thread Martin-Éric Racine
ke 23.4.2025 klo 9.13 Pascal Hambourg (pas...@plouf.fr.eu.org) kirjoitti:
>
> On 23/04/2025 at 06:08, Martin-Éric Racine wrote:
> >
> > In its current form, os-prober produces an unusable GRUB config segment 
> > when it finds a Hurd partition:
> >
> > 1) It wants to boot a /boot/gnumach.gz file that doesn't exist. Mach kernel 
> > files include version numbers.
> >
> > Once that has been manually fixed in grub.cfg to e.g. 
> > /boot/gnumach-1.8-486-up.gz, a second problem emerges:
> >
> > 2) The config fragment passes the incorrect root device, which makes the 
> > Mach kernel fail to find its Hurd of services.
>
> os-prober does not generate GRUB menu entries. It just detects operating
> systems, and GRUB helper script 30_os-prober uses its output to generate
> menu entries. Is os-prober output for Hurd incorrect ?

Yes, as stated above, the output is incorrect.

Martin-Éric



Bug#1103935: os-prober: Hurd detection produces unusable grub.cfg fragment

2025-04-22 Thread Pascal Hambourg

On 23/04/2025 at 06:08, Martin-Éric Racine wrote:


In its current form, os-prober produces an unusable GRUB config segment when it 
finds a Hurd partition:

1) It wants to boot a /boot/gnumach.gz file that doesn't exist. Mach kernel 
files include version numbers.

Once that has been manually fixed in grub.cfg to e.g. 
/boot/gnumach-1.8-486-up.gz, a second problem emerges:

2) The config fragment passes the incorrect root device, which makes the Mach 
kernel fail to find its Hurd of services.


os-prober does not generate GRUB menu entries. It just detects operating 
systems, and GRUB helper script 30_os-prober uses its output to generate 
menu entries. Is os-prober output for Hurd incorrect ?




Bug#1103935: os-prober: Hurd detection produces unusable grub.cfg fragment

2025-04-22 Thread Martin-Éric Racine
Package: os-prober
Severity: important
X-Debbugs-Cc: martin-eric.rac...@iki.fi
Usertags: hurd-i386 

In its current form, os-prober produces an unusable GRUB config segment when it 
finds a Hurd partition:

1) It wants to boot a /boot/gnumach.gz file that doesn't exist. Mach kernel 
files include version numbers.

Once that has been manually fixed in grub.cfg to e.g. 
/boot/gnumach-1.8-486-up.gz, a second problem emerges:

2) The config fragment passes the incorrect root device, which makes the Mach 
kernel fail to find its Hurd of services.

What's expected is something like this (for each Mach kernel found):

menuentry "Debian GNU/Hurd, with Mach 1.8" {
set root='hd0,msdos1'
echo'Loading GNU Mach ...'
multiboot   /boot/gnumach-1.8-486-up.gz root=part:1:device:hd0
echo'Loading the Hurd ...'
module  /hurd/pci-arbiter.static pci-arbiter \
--host-priv-port='${host-port}' 
--device-master-port='${device-port}' \
--next-task='${acpi-task}' \
'$(pci-task=task-create)' '$(task-resume)'
module  /hurd/acpi.static acpi \
--next-task='${disk-task}' \
'$(acpi-task=task-create)'
module  /hurd/rumpdisk.static rumpdisk \
--next-task='${fs-task}' \
'$(disk-task=task-create)'
module  /hurd/ext2fs.static ext2fs \
--multiboot-command-line='${kernel-command-line}' \
--exec-server-task='${exec-task}' -T typed '${root}' \
'$(fs-task=task-create)'
module  /hurd/exec.static exec '$(exec-task=task-create)'
}

Perhaps it would be a good idea for os-prober to copy the 10_hurd script that 
comes with GRUB for the Hurd port, passing it the correct root device for the 
Hurd partition (instead of the Linux partition that os-prober runs from), to 
generate the menu entries.

Martin-Éric

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: i386 (x86_64)

Kernel: Linux 6.12.12+bpo-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE=fi:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages os-prober depends on:
pn  grub-common  
ii  libc62.41-7
ii  mount2.41-4

os-prober recommends no packages.

os-prober suggests no packages.