* [PATCH,HURD] Fix GNU/Hurd menu entry generation
@ 2009-11-02 19:36 Samuel Thibault
2009-11-02 21:02 ` Robert Millan
0 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2009-11-02 19:36 UTC (permalink / raw)
To: grub-devel
Hello,
The patch below fixes menu entry generation for GNU/Hurd.
Samuel
2009-20-26 Samuel Thibault <samuel.thibault@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-11-02 19:36 [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
@ 2009-11-02 21:02 ` Robert Millan
2009-11-03 13:36 ` Yves Blusseau
0 siblings, 1 reply; 10+ messages in thread
From: Robert Millan @ 2009-11-02 21:02 UTC (permalink / raw)
To: The development of GRUB 2
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.
--
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."
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-11-02 21:02 ` Robert Millan
@ 2009-11-03 13:36 ` Yves Blusseau
2009-11-03 14:01 ` Samuel Thibault
0 siblings, 1 reply; 10+ messages in thread
From: Yves Blusseau @ 2009-11-03 13:36 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
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
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3326 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-11-03 13:36 ` Yves Blusseau
@ 2009-11-03 14:01 ` Samuel Thibault
2009-11-03 14:25 ` Felix Zielcke
0 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2009-11-03 14:01 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
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
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 606 bytes --]
2009-11-03 Samuel Thibault <samuel.thibault@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-11-03 14:01 ` Samuel Thibault
@ 2009-11-03 14:25 ` Felix Zielcke
0 siblings, 0 replies; 10+ messages in thread
From: Felix Zielcke @ 2009-11-03 14:25 UTC (permalink / raw)
To: The development of GRUB 2
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-10-26 12:36 ` Robert Millan
@ 2009-10-26 13:37 ` Samuel Thibault
0 siblings, 0 replies; 10+ messages in thread
From: Samuel Thibault @ 2009-10-26 13:37 UTC (permalink / raw)
To: The development of GRUB 2
Robert Millan, le Mon 26 Oct 2009 13:36:13 +0100, a écrit :
> 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?
Various things that we never took the time to implement, like
discovering disks & such.
Samuel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-10-26 2:01 ` Samuel Thibault
@ 2009-10-26 12:36 ` Robert Millan
2009-10-26 13:37 ` Samuel Thibault
0 siblings, 1 reply; 10+ messages in thread
From: Robert Millan @ 2009-10-26 12:36 UTC (permalink / raw)
To: The development of GRUB 2
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."
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-10-26 1:48 ` Robert Millan
@ 2009-10-26 2:01 ` Samuel Thibault
2009-10-26 12:36 ` Robert Millan
0 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2009-10-26 2:01 UTC (permalink / raw)
To: The development of GRUB 2
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-10-26 1:40 ` [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
@ 2009-10-26 1:48 ` Robert Millan
2009-10-26 2:01 ` Samuel Thibault
0 siblings, 1 reply; 10+ messages in thread
From: Robert Millan @ 2009-10-26 1:48 UTC (permalink / raw)
To: The development of GRUB 2
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."
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH,HURD] Fix GNU/Hurd menu entry generation
2009-10-21 18:13 [PATCH,HURD] Fix GNU/Hurd boot Samuel Thibault
@ 2009-10-26 1:40 ` Samuel Thibault
2009-10-26 1:48 ` Robert Millan
0 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2009-10-26 1:40 UTC (permalink / raw)
To: grub-devel
Hello,
The patch below fixes menu entry generation for GNU/Hurd.
Samuel
2009-20-26 Samuel Thibault <samuel.thibault@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}' \\
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-11-03 14:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-02 19:36 [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
2009-11-02 21:02 ` Robert Millan
2009-11-03 13:36 ` Yves Blusseau
2009-11-03 14:01 ` Samuel Thibault
2009-11-03 14:25 ` Felix Zielcke
-- strict thread matches above, loose matches on Subject: below --
2009-10-21 18:13 [PATCH,HURD] Fix GNU/Hurd boot Samuel Thibault
2009-10-26 1:40 ` [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
2009-10-26 1:48 ` Robert Millan
2009-10-26 2:01 ` Samuel Thibault
2009-10-26 12:36 ` Robert Millan
2009-10-26 13:37 ` Samuel Thibault
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.