Bug#825292: grub-common: does not provide the correct device name for booting the Hurd.

Rodrigo Valiña Gutiérrez rodrivg at gmail.com
Wed May 25 15:53:47 UTC 2016


Package: grub-common
Version: 2.02~beta2-22+deb8u1
Severity: normal
Tags: patch

The script /etc/grub.d/30_os-prober does not provide the correct device name
for booting the Hurd, e.g. when installed with crosshurd.
The bug also applies to the grub version currently in sid.

The patch changes provided device names from, e.g.:
  (hostdisk//dev/sda,msdos2)
to:
  hd0s2

This is the patch that solved the problem in my case, and may be correct:

-----------------------------------------------------------------------------
--- 30_os-prober	2016-02-05 18:30:35.000000000 +0100
+++ 30_os-prober-2	2016-05-25 17:13:17.518318125 +0200
@@ -332,13 +332,14 @@
       prepare_grub_to_access_device ${DEVICE} | grub_add_tab
       grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
       mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
+      hurd_device=`${grub_probe} --device ${DEVICE} --target=compatibility_hint | sed 's/,msdos/s/'`
       grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
       case "${grub_fs}" in
 	*fs)	hurd_fs="${grub_fs}" ;;
 	*)	hurd_fs="${grub_fs}fs" ;;
       esac
       cat << EOF
-	multiboot /boot/gnumach.gz root=device:${mach_device}
+	multiboot /boot/gnumach.gz root=device:${hurd_device}
 	module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
 			--multiboot-command-line='\${kernel-command-line}' \\
 			--host-priv-port='\${host-port}' \\
-----------------------------------------------------------------------------



More information about the Pkg-grub-devel mailing list