* backwards compatibility in grub.cfg
@ 2008-05-30 21:20 Robert Millan
2008-05-30 21:47 ` Christian Franke
2008-05-30 22:23 ` Pavel Roskin
0 siblings, 2 replies; 7+ messages in thread
From: Robert Millan @ 2008-05-30 21:20 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
Hi,
I'm adding this to the Debian package. We need this for backwards
compatibility in case the new update-grub is used in combination with an
older install of GRUB in /boot/grub (which will surely happen a lot).
I'm wondering if it makes sense to commit this in official GRUB too. For
people installing by hand it's not a problem, and distributors can sort it
out themselves, I guess, but it may also be helpful. What do you think?
(we have similar checks like "if font " in 00_header, but this is much
uglier)
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
[-- Attachment #2: compat.diff --]
[-- Type: text/x-diff, Size: 780 bytes --]
diff -x configure -x config.h.in -x CVS -x '*~' -x '*.mk' -urp ../grub2/util/update-grub_lib.in ./util/update-grub_lib.in
--- ../grub2/util/update-grub_lib.in 2008-05-30 22:55:35.000000000 +0200
+++ ./util/update-grub_lib.in 2008-05-30 23:16:53.000000000 +0200
@@ -116,10 +116,9 @@ prepare_grub_to_access_device ()
# If there's a filesystem UUID that GRUB is capable of identifiing, use it;
# otherwise set root as per value in device.map.
+ echo "set root=`${grub_probe} --device ${device} --target=drive`"
if fs_uuid="`grub-probe --device ${device} --target=fs_uuid 2> /dev/null`" ; then
echo "search --fs-uuid --set ${fs_uuid}"
- else
- echo "set root=`${grub_probe} --device ${device} --target=drive`"
fi
# Abstraction modules aren't auto-loaded.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backwards compatibility in grub.cfg
2008-05-30 21:20 backwards compatibility in grub.cfg Robert Millan
@ 2008-05-30 21:47 ` Christian Franke
2008-05-31 9:47 ` Robert Millan
2008-05-30 22:23 ` Pavel Roskin
1 sibling, 1 reply; 7+ messages in thread
From: Christian Franke @ 2008-05-30 21:47 UTC (permalink / raw)
To: The development of GRUB 2
Robert Millan wrote:
> diff -x configure -x config.h.in -x CVS -x '*~' -x '*.mk' -urp ../grub2/util/update-grub_lib.in ./util/update-grub_lib.in
> --- ../grub2/util/update-grub_lib.in 2008-05-30 22:55:35.000000000 +0200
> +++ ./util/update-grub_lib.in 2008-05-30 23:16:53.000000000 +0200
> @@ -116,10 +116,9 @@ prepare_grub_to_access_device ()
>
> # If there's a filesystem UUID that GRUB is capable of identifiing, use it;
> # otherwise set root as per value in device.map.
> + echo "set root=`${grub_probe} --device ${device} --target=drive`"
> if fs_uuid="`grub-probe --device ${device} --target=fs_uuid 2> /dev/null`" ; then
>
Outside of the scope of the patch, but shouldn't '${grub_probe}' be used
instead of 'grub-probe' in the rest of the script?
Same issue is in update-grub.in: grub_probe is set but never used, so
update-grub fails if /usr/sbin is not in PATH.
--
Christian Franke
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backwards compatibility in grub.cfg
2008-05-30 21:20 backwards compatibility in grub.cfg Robert Millan
2008-05-30 21:47 ` Christian Franke
@ 2008-05-30 22:23 ` Pavel Roskin
2008-05-31 9:38 ` Robert Millan
1 sibling, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2008-05-30 22:23 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, 2008-05-30 at 23:20 +0200, Robert Millan wrote:
> Hi,
>
> I'm adding this to the Debian package. We need this for backwards
> compatibility in case the new update-grub is used in combination with an
> older install of GRUB in /boot/grub (which will surely happen a lot).
>
> I'm wondering if it makes sense to commit this in official GRUB too.
I think it's a good idea. Suppose that UUID changes for whatever
reason. Then it would be a fallback.
Maybe we could put a conditional into grub.cfg:
if !search --fs-uuid ...
set root=...
fi
Just make sure that the old GRUB will actually grok it.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backwards compatibility in grub.cfg
2008-05-30 22:23 ` Pavel Roskin
@ 2008-05-31 9:38 ` Robert Millan
2008-06-01 6:21 ` Pavel Roskin
0 siblings, 1 reply; 7+ messages in thread
From: Robert Millan @ 2008-05-31 9:38 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, May 30, 2008 at 06:23:52PM -0400, Pavel Roskin wrote:
> On Fri, 2008-05-30 at 23:20 +0200, Robert Millan wrote:
> > Hi,
> >
> > I'm adding this to the Debian package. We need this for backwards
> > compatibility in case the new update-grub is used in combination with an
> > older install of GRUB in /boot/grub (which will surely happen a lot).
> >
> > I'm wondering if it makes sense to commit this in official GRUB too.
>
> I think it's a good idea. Suppose that UUID changes for whatever
> reason. Then it would be a fallback.
>
> Maybe we could put a conditional into grub.cfg:
>
> if !search --fs-uuid ...
> set root=...
> fi
>
> Just make sure that the old GRUB will actually grok it.
Yeah, that would be the "nice" way to do it, but it doesn't work. And the
funny thing is, that if we fix it and start using it, it defeats the point of
backwards compatibility :-)
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backwards compatibility in grub.cfg
2008-05-30 21:47 ` Christian Franke
@ 2008-05-31 9:47 ` Robert Millan
0 siblings, 0 replies; 7+ messages in thread
From: Robert Millan @ 2008-05-31 9:47 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, May 30, 2008 at 11:47:18PM +0200, Christian Franke wrote:
> Robert Millan wrote:
>
> >diff -x configure -x config.h.in -x CVS -x '*~' -x '*.mk' -urp
> >../grub2/util/update-grub_lib.in ./util/update-grub_lib.in
> >--- ../grub2/util/update-grub_lib.in 2008-05-30 22:55:35.000000000 +0200
> >+++ ./util/update-grub_lib.in 2008-05-30 23:16:53.000000000 +0200
> >@@ -116,10 +116,9 @@ prepare_grub_to_access_device ()
> >
> > # If there's a filesystem UUID that GRUB is capable of identifiing, use
> > it;
> > # otherwise set root as per value in device.map.
> >+ echo "set root=`${grub_probe} --device ${device} --target=drive`"
> > if fs_uuid="`grub-probe --device ${device} --target=fs_uuid 2>
> > /dev/null`" ; then
> >
>
> Outside of the scope of the patch, but shouldn't '${grub_probe}' be used
> instead of 'grub-probe' in the rest of the script?
>
> Same issue is in update-grub.in: grub_probe is set but never used, so
> update-grub fails if /usr/sbin is not in PATH.
Fixed.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backwards compatibility in grub.cfg
2008-05-31 9:38 ` Robert Millan
@ 2008-06-01 6:21 ` Pavel Roskin
2008-06-01 10:43 ` Robert Millan
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2008-06-01 6:21 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, 2008-05-31 at 11:38 +0200, Robert Millan wrote:
> Yeah, that would be the "nice" way to do it, but it doesn't work. And the
> funny thing is, that if we fix it and start using it, it defeats the point of
> backwards compatibility :-)
OK then. And we should make sure that "if !search --future-option" does
the right thing from now on.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: backwards compatibility in grub.cfg
2008-06-01 6:21 ` Pavel Roskin
@ 2008-06-01 10:43 ` Robert Millan
0 siblings, 0 replies; 7+ messages in thread
From: Robert Millan @ 2008-06-01 10:43 UTC (permalink / raw)
To: The development of GRUB 2
On Sun, Jun 01, 2008 at 02:21:35AM -0400, Pavel Roskin wrote:
> On Sat, 2008-05-31 at 11:38 +0200, Robert Millan wrote:
>
> > Yeah, that would be the "nice" way to do it, but it doesn't work. And the
> > funny thing is, that if we fix it and start using it, it defeats the point of
> > backwards compatibility :-)
>
> OK then. And we should make sure that "if !search --future-option" does
> the right thing from now on.
I'm afraid I get terribly confused when it comes to the scripting engine...
FWIW, I committed the backward compatibility support.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-06-01 10:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30 21:20 backwards compatibility in grub.cfg Robert Millan
2008-05-30 21:47 ` Christian Franke
2008-05-31 9:47 ` Robert Millan
2008-05-30 22:23 ` Pavel Roskin
2008-05-31 9:38 ` Robert Millan
2008-06-01 6:21 ` Pavel Roskin
2008-06-01 10:43 ` Robert Millan
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.