Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
Robert Millan a écrit : On Mon, Nov 02, 2009 at 08:36:05PM +0100, Samuel Thibault wrote: Hello, The patch below fixes menu entry generation for GNU/Hurd. Committed. Btw, next time please use text/plain attachments. Hi, is it normal that hurd entry match ANY OS because you left the wildcard in the hurd case: case ${BOOT} in ... ... hurd|***) cat EOF menuentry ${LONGNAME} (on ${DEVICE}) { EOF Regards, Yves Blusseau smime.p7s Description: S/MIME Cryptographic Signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
Yves Blusseau, le Tue 03 Nov 2009 14:36:09 +0100, a écrit : is it normal that hurd entry match ANY OS because you left the wildcard in the hurd case: Ugh, no, I was misguided by the hurd tag indeed, here is a patch. Samuel 2009-11-03 Samuel Thibault samuel.thiba...@ens-lyon.org * util/grub.d/30_os-prober.in: Restore default behavior for unsupported OSes. Index: util/grub.d/30_os-prober.in === --- util/grub.d/30_os-prober.in (révision 2680) +++ util/grub.d/30_os-prober.in (copie de travail) @@ -158,7 +158,7 @@ } EOF ;; -hurd|*) +hurd) cat EOF menuentry ${LONGNAME} (on ${DEVICE}) { EOF @@ -182,5 +182,8 @@ } EOF ;; +*) + echo ${LONGNAME} is not yet supported by grub-mkconfig. 2 +;; esac done ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
Am Dienstag, den 03.11.2009, 15:01 +0100 schrieb Samuel Thibault: Yves Blusseau, le Tue 03 Nov 2009 14:36:09 +0100, a écrit : is it normal that hurd entry match ANY OS because you left the wildcard in the hurd case: Ugh, no, I was misguided by the hurd tag indeed, here is a patch. Samuel Commited. -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH,HURD] Fix GNU/Hurd menu entry generation
Hello, The patch below fixes menu entry generation for GNU/Hurd. Samuel 2009-20-26 Samuel Thibault samuel.thiba...@ens-lyon.org * util/grub.d/30_os-prober.in: Add GNU/Hurd support Index: util/grub.d/30_os-prober.in === --- util/grub.d/30_os-prober.in (révision 2657) +++ util/grub.d/30_os-prober.in (copie de travail) @@ -155,7 +155,28 @@ EOF ;; hurd|*) - echo ${LONGNAME} is not yet supported by grub-mkconfig. 2 + cat EOF +menuentry ${LONGNAME} (on ${DEVICE}) { +EOF + prepare_grub_to_access_device ${DEVICE} | sed -e s/^/\t/ + grub_device=`${grub_probe} --device ${DEVICE} --target=drive` + mach_device=`echo ${grub_device} | tr -d '()' | tr , 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} + module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\ + --multiboot-command-line='\${kernel-command-line}' \\ + --host-priv-port='\${host-port}' \\ + --device-master-port='\${device-port}' \\ + --exec-server-task='\${exec-task}' -T typed '\${root}' \\ + '\$(task-create)' '\$(task-resume)' + module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)' +} +EOF ;; esac done ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
On Mon, Oct 26, 2009 at 03:01:16AM +0100, Samuel Thibault wrote: Did you observe wrong entry generation in grub-mkconfig? I didn't try that part of my patch as there are other things that prevent grub2 from working from inside GNU/Hurd itself. Which are these? It's unfortunate that nobody reported this before 1.97 was released. Perhaps I should test GRUB on GNU/Hurd before doing a release. -- Robert Millan The DRM opt-in fallacy: Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH,HURD] Fix GNU/Hurd menu entry generation
Hello, The patch below fixes menu entry generation for GNU/Hurd. Samuel 2009-20-26 Samuel Thibault samuel.thiba...@ens-lyon.org * util/grub.d/30_os-prober.in: Add GNU/Hurd support * util/grub.d/10_hurd.in: Translate grub device name into mach device name. Index: util/grub.d/30_os-prober.in === --- util/grub.d/30_os-prober.in (révision 2657) +++ util/grub.d/30_os-prober.in (copie de travail) @@ -155,7 +155,28 @@ EOF ;; hurd|*) - echo ${LONGNAME} is not yet supported by grub-mkconfig. 2 + cat EOF +menuentry ${LONGNAME} (on ${DEVICE}) { +EOF + prepare_grub_to_access_device ${DEVICE} | sed -e s/^/\t/ + GRUB_DEVICE=`${grub_probe} --device ${DEVICE} --target=drive` + mach_device=`echo ${GRUB_DEVICE} | tr -d '()' | tr , s` + HURD_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} + module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\ + --multiboot-command-line='\${kernel-command-line}' \\ + --host-priv-port='\${host-port}' \\ + --device-master-port='\${device-port}' \\ + --exec-server-task='\${exec-task}' -T typed '\${root}' \\ + '\$(task-create)' '\$(task-resume)' + module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)' +} +EOF ;; esac done Index: util/grub.d/10_hurd.in === --- util/grub.d/10_hurd.in (révision 2657) +++ util/grub.d/10_hurd.in (copie de travail) @@ -48,6 +48,7 @@ *fs) hurd_fs=${GRUB_FS} ;; *) hurd_fs=${GRUB_FS}fs ;; esac +mach_device=`echo ${GRUB_DEVICE} | tr -d '()' | tr , s` for i in /hurd/${hurd_fs}.static /hurd/exec ; do if test -e $i ; then @@ -73,7 +74,7 @@ EOF prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e s/^/\t/ cat EOF - multiboot ${kernel} root=device:${GRUB_DEVICE} + multiboot ${kernel} root=device:${mach_device} module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\ --multiboot-command-line='\${kernel-command-line}' \\ --host-priv-port='\${host-port}' \\ ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
On Mon, Oct 26, 2009 at 02:40:01AM +0100, Samuel Thibault wrote: + mach_device=`echo ${GRUB_DEVICE} | tr -d '()' | tr , s` [...] +mach_device=`echo ${GRUB_DEVICE} | tr -d '()' | tr , s` for i in /hurd/${hurd_fs}.static /hurd/exec ; do if test -e $i ; then @@ -73,7 +74,7 @@ EOF prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e s/^/\t/ cat EOF - multiboot ${kernel} root=device:${GRUB_DEVICE} + multiboot ${kernel} root=device:${mach_device} I think you missunderstand what GRUB_DEVICE is (not surprising, because the variable name is quite misleading). Did you observe wrong entry generation in grub-mkconfig? -- Robert Millan The DRM opt-in fallacy: Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
Robert Millan, le Mon 26 Oct 2009 02:48:48 +0100, a écrit : @@ -73,7 +74,7 @@ EOF prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e s/^/\t/ cat EOF - multiboot ${kernel} root=device:${GRUB_DEVICE} + multiboot ${kernel} root=device:${mach_device} I think you missunderstand what GRUB_DEVICE is (not surprising, because the variable name is quite misleading). Ah, that's possible, is it actually DEVICE? If so, then you can probably skip that part of the patch indeed. Did you observe wrong entry generation in grub-mkconfig? I didn't try that part of my patch as there are other things that prevent grub2 from working from inside GNU/Hurd itself. Samuel ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel