* [PATCH,HURD] Fix root device passing
@ 2009-11-02 17:33 Samuel Thibault
2009-11-02 18:50 ` Colin Watson
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2009-11-02 17:33 UTC (permalink / raw)
To: grub-devel
Hello,
The patch below fixes passing root device to GNU Mach.
With this applied (and some tuning in my hurd /dev/) and my other two
patches, I could successfully run grub-install and boot!
Samuel
2009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
* util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
giving it to GNU Mach.
Index: util/grub.d/10_hurd.in
===================================================================
--- util/grub.d/10_hurd.in (révision 2677)
+++ util/grub.d/10_hurd.in (copie de travail)
@@ -72,8 +72,9 @@
menuentry "${OS}" {
EOF
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
+ROOT_DEVICE=`echo ${GRUB_DEVICE} | sed -e 's:^/dev/::'`
cat << EOF
- multiboot ${kernel} root=device:${GRUB_DEVICE}
+ multiboot ${kernel} root=device:${ROOT_DEVICE}
EOF
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
cat << EOF
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH,HURD] Fix root device passing
2009-11-02 17:33 [PATCH,HURD] Fix root device passing Samuel Thibault
@ 2009-11-02 18:50 ` Colin Watson
2009-11-02 18:53 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: Colin Watson @ 2009-11-02 18:50 UTC (permalink / raw)
To: The development of GRUB 2
On Mon, Nov 02, 2009 at 06:33:29PM +0100, Samuel Thibault wrote:
> The patch below fixes passing root device to GNU Mach.
> With this applied (and some tuning in my hurd /dev/) and my other two
> patches, I could successfully run grub-install and boot!
>
> Samuel
>
> 2009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
>
> * util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
> giving it to GNU Mach.
>
> Index: util/grub.d/10_hurd.in
> ===================================================================
> --- util/grub.d/10_hurd.in (révision 2677)
> +++ util/grub.d/10_hurd.in (copie de travail)
> @@ -72,8 +72,9 @@
> menuentry "${OS}" {
> EOF
> prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
> +ROOT_DEVICE=`echo ${GRUB_DEVICE} | sed -e 's:^/dev/::'`
> cat << EOF
> - multiboot ${kernel} root=device:${GRUB_DEVICE}
> + multiboot ${kernel} root=device:${ROOT_DEVICE}
> EOF
> prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
> cat << EOF
'multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}' would be simpler
and quicker.
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH,HURD] Fix root device passing
2009-11-02 18:50 ` Colin Watson
@ 2009-11-02 18:53 ` Samuel Thibault
2009-11-02 19:06 ` Felix Zielcke
2009-11-02 19:11 ` Robert Millan
0 siblings, 2 replies; 8+ messages in thread
From: Samuel Thibault @ 2009-11-02 18:53 UTC (permalink / raw)
To: The development of GRUB 2
Colin Watson, le Mon 02 Nov 2009 18:50:43 +0000, a écrit :
> 'multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}' would be simpler
> and quicker.
And will not work on some systems.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH,HURD] Fix root device passing
2009-11-02 18:53 ` Samuel Thibault
@ 2009-11-02 19:06 ` Felix Zielcke
2009-11-02 19:12 ` Felix Zielcke
2009-11-02 19:17 ` Samuel Thibault
2009-11-02 19:11 ` Robert Millan
1 sibling, 2 replies; 8+ messages in thread
From: Felix Zielcke @ 2009-11-02 19:06 UTC (permalink / raw)
To: The development of GRUB 2
Am Montag, den 02.11.2009, 19:53 +0100 schrieb Samuel Thibault:
> Colin Watson, le Mon 02 Nov 2009 18:50:43 +0000, a écrit :
> > 'multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}' would be simpler
> > and quicker.
>
> And will not work on some systems.
>
> Samuel
Why ones?
I just looked in POSIX.1-2008 and it defines it.
Both bash and dash supports it.
Note that 10_hurd only gets installed if the host kernel is HURD.
Is there any HURD based distribution avaible besides Debian?
--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH,HURD] Fix root device passing
2009-11-02 19:06 ` Felix Zielcke
@ 2009-11-02 19:12 ` Felix Zielcke
2009-11-02 19:17 ` Samuel Thibault
1 sibling, 0 replies; 8+ messages in thread
From: Felix Zielcke @ 2009-11-02 19:12 UTC (permalink / raw)
To: The development of GRUB 2
Am Montag, den 02.11.2009, 20:06 +0100 schrieb Felix Zielcke:
> Am Montag, den 02.11.2009, 19:53 +0100 schrieb Samuel Thibault:
> > Colin Watson, le Mon 02 Nov 2009 18:50:43 +0000, a écrit :
> > > 'multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}' would be simpler
> > > and quicker.
> >
> > And will not work on some systems.
> >
> > Samuel
>
> Why ones?
Uhm which ones of course.
> I just looked in POSIX.1-2008 and it defines it.
> Both bash and dash supports it.
> Note that 10_hurd only gets installed if the host kernel is HURD.
> Is there any HURD based distribution avaible besides Debian?
>
>
--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH,HURD] Fix root device passing
2009-11-02 19:06 ` Felix Zielcke
2009-11-02 19:12 ` Felix Zielcke
@ 2009-11-02 19:17 ` Samuel Thibault
1 sibling, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2009-11-02 19:17 UTC (permalink / raw)
To: The development of GRUB 2
Felix Zielcke, le Mon 02 Nov 2009 20:06:19 +0100, a écrit :
> Am Montag, den 02.11.2009, 19:53 +0100 schrieb Samuel Thibault:
> > Colin Watson, le Mon 02 Nov 2009 18:50:43 +0000, a écrit :
> > > 'multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}' would be simpler
> > > and quicker.
> >
> > And will not work on some systems.
> >
> > Samuel
>
> Which ones?
Solaris for instance.
> I just looked in POSIX.1-2008 and it defines it.
> Both bash and dash supports it.
Fortunately, yes.
> Note that 10_hurd only gets installed if the host kernel is HURD.
Ah, then ok.
> Is there any HURD based distribution avaible besides Debian?
There is the GNU distribution yes. In any case it's probably safe to
assume that a GNU system uses at least a POSIX2008-compliant dash or
posh. Here is an updated patch.
Samuel
2009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
* util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
giving it to GNU Mach.
Index: util/grub.d/10_hurd.in
===================================================================
--- util/grub.d/10_hurd.in (révision 2677)
+++ util/grub.d/10_hurd.in (copie de travail)
@@ -73,7 +73,7 @@
EOF
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
cat << EOF
- multiboot ${kernel} root=device:${GRUB_DEVICE}
+ multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}
EOF
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
cat << EOF
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH,HURD] Fix root device passing
2009-11-02 18:53 ` Samuel Thibault
2009-11-02 19:06 ` Felix Zielcke
@ 2009-11-02 19:11 ` Robert Millan
2009-11-02 19:19 ` Samuel Thibault
1 sibling, 1 reply; 8+ messages in thread
From: Robert Millan @ 2009-11-02 19:11 UTC (permalink / raw)
To: The development of GRUB 2
On Mon, Nov 02, 2009 at 07:53:36PM +0100, Samuel Thibault wrote:
> Colin Watson, le Mon 02 Nov 2009 18:50:43 +0000, a écrit :
> > 'multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}' would be simpler
> > and quicker.
>
> And will not work on some systems.
I guess at least in the GNU system it's safe to assume that /bin/bash is
available? ;-)
Note: we follow the convention of using hi case for global variables and
low case for private ones, so at the least I'd s/ROOT_DEVICE/root_device/
here.
--
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] 8+ messages in thread* Re: [PATCH,HURD] Fix root device passing
2009-11-02 19:11 ` Robert Millan
@ 2009-11-02 19:19 ` Samuel Thibault
0 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2009-11-02 19:19 UTC (permalink / raw)
To: The development of GRUB 2
Robert Millan, le Mon 02 Nov 2009 20:11:07 +0100, a écrit :
> On Mon, Nov 02, 2009 at 07:53:36PM +0100, Samuel Thibault wrote:
> > Colin Watson, le Mon 02 Nov 2009 18:50:43 +0000, a écrit :
> > > 'multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}' would be simpler
> > > and quicker.
> >
> > And will not work on some systems.
>
> I guess at least in the GNU system it's safe to assume that /bin/bash is
> available? ;-)
bash, yes, but remember that /bin/sh could point to something else than
bash. I believe we can however assume a /bin/sh that supports such
substitution on the GNU system (note that dash used to not support it
previously).
> Note: we follow the convention of using hi case for global variables and
> low case for private ones, so at the least I'd s/ROOT_DEVICE/root_device/
> here.
Ok, anyway it disappears.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-11-02 19:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 17:33 [PATCH,HURD] Fix root device passing Samuel Thibault
2009-11-02 18:50 ` Colin Watson
2009-11-02 18:53 ` Samuel Thibault
2009-11-02 19:06 ` Felix Zielcke
2009-11-02 19:12 ` Felix Zielcke
2009-11-02 19:17 ` Samuel Thibault
2009-11-02 19:11 ` Robert Millan
2009-11-02 19:19 ` 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.