All of lore.kernel.org
 help / color / mirror / Atom feed
* grub-install hidden options weirdness
@ 2014-06-25 14:13 Phillip Susi
  2014-06-25 17:33 ` Andrey Borzenkov
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2014-06-25 14:13 UTC (permalink / raw)
  To: The development of GNU GRUB

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A user complained that grub-install has some undocumented options such
as --root-directory.  I started looking into it and noticed a lot of
weirdness here.

1)  It seems that --root-directory used to just be used to find the
boot directory by appending "boot" to rootdir.  --boot-directory was
added as a more appropriate way to directly specify that.  Shouldn't
the man page mention that it still accepts --root-directory for
backwards compatibility but it's use is depreciated?

2)  It seems that --root-directory has been overloaded to specify the
efi system directory.  This seems like it was the wrong thing to do
and again, is totally undocumented.

3)  It appears that --grub-setup used to allow you to specify an
alternate program to run instead of grub-setup.  Now it seems to check
if its argument is "setup" and if so, has the same affect as
- --no-bootsector, and otherwise has no effect.  This seems completely
wrong.

4)  The similar arguments --grub-mkrelpath, --grub-probe,
- --grub-editenv, and --font are accepted and completely ignored.  If
the option no longer works, it should be removed rather than silently
ignored.  At least that way you don't have people using it and
wondering why it isn't working.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTqtknAAoJEI5FoCIzSKrwT9oH/0CKCkImM4xkbS91CbX4vEWa
Dj+wV9U+4/F48M19TGsPOwAxawE6NQRb67UDrarNNEacFWy5UpTMdpfYX+x4cr1a
Tih2n0OLC/FQyxjKNoqqak+MOjA6tnN/sgJck0BZ8wCt3UN4XsJTMzATFK+iVFM4
YGCj72/F2w7wd9HMYqyy5iQKXEIyPJi31T1F5wsYWtbGsOwS1tnNubNeHgSFJ0wo
jkIjgLZWYjB73RQzZ8nrMOaLfPMiKHq2ynl8JAL8kYteSVKmuH7M3C3raDPIW/2S
sq4Vgqv+aUrVzbQAdU+3e+ispYcpf7mHi5WX4/0RomSZa0hX0yaylfPNb1VC9oQ=
=zoPB
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grub-install hidden options weirdness
  2014-06-25 14:13 grub-install hidden options weirdness Phillip Susi
@ 2014-06-25 17:33 ` Andrey Borzenkov
  2014-06-25 17:44   ` Phillip Susi
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2014-06-25 17:33 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: psusi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

В Wed, 25 Jun 2014 10:13:59 -0400
Phillip Susi <psusi@ubuntu.com> пишет:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> A user complained that grub-install has some undocumented options such
> as --root-directory.  I started looking into it and noticed a lot of
> weirdness here.
> 
> 1)  It seems that --root-directory used to just be used to find the
> boot directory by appending "boot" to rootdir.  --boot-directory was
> added as a more appropriate way to directly specify that.  Shouldn't
> the man page mention that it still accepts --root-directory for
> backwards compatibility but it's use is depreciated?
> 

This could be considered as endorsement to continue to use it ...  

> 2)  It seems that --root-directory has been overloaded to specify the
> efi system directory.  This seems like it was the wrong thing to do
> and again, is totally undocumented.
> 

We already have --efi-directory. Why would you want to endorse this
archaic usage?  

> 3)  It appears that --grub-setup used to allow you to specify an
> alternate program to run instead of grub-setup.  Now it seems to check
> if its argument is "setup" and if so, has the same affect as
> - --no-bootsector, and otherwise has no effect.  This seems completely
> wrong.
> 

This covers two common use cases known to me a) using it from within
build directory with --grub=setup=./grub-setup and b) using it to
disable actual installation with --grub-setup=/bin/true. Current code
is compatible with them.

I know that some people did creative things with grub-setup
replacement ... but it normally can be done using grub-mkimage +
whatever replaces grub-setup. The only thing I miss in this case is
autodetection of necessary modules and prefix. May be grub-probe can
be extended.

> 4)  The similar arguments --grub-mkrelpath, --grub-probe,
> - --grub-editenv, and --font are accepted and completely ignored.  If
> the option no longer works, it should be removed rather than silently
> ignored.  At least that way you don't have people using it and
> wondering why it isn't working.
> 

Again - common use case is using just built grub without installing it.
Do you have example of other non-trivial use cases?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlOrB+8ACgkQR6LMutpd94wHhACeL06y+EWV8QX1Ifyye4WknL3m
+H8AoK7KXkhuAotkSD/Pjz4J7Ls3pHSn
=YCwP
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grub-install hidden options weirdness
  2014-06-25 17:33 ` Andrey Borzenkov
@ 2014-06-25 17:44   ` Phillip Susi
  2014-06-25 18:48     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2014-06-25 17:44 UTC (permalink / raw)
  To: Andrey Borzenkov, The development of GNU GRUB

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/25/2014 1:33 PM, Andrey Borzenkov wrote:
> This could be considered as endorsement to continue to use it ...
> 
No, saying "dont' use this because it is depreciated" is exactly the
opposite endorsing its continued use.

>> 2)  It seems that --root-directory has been overloaded to specify
>> the efi system directory.  This seems like it was the wrong thing
>> to do and again, is totally undocumented.
> 
> 
> We already have --efi-directory. Why would you want to endorse
> this archaic usage?

I don't: I'm pointing out that this usage seems like it was an
undocumented mistake and it should be removed.

>> 3)  It appears that --grub-setup used to allow you to specify an 
>> alternate program to run instead of grub-setup.  Now it seems to
>> check if its argument is "setup" and if so, has the same affect
>> as - --no-bootsector, and otherwise has no effect.  This seems
>> completely wrong.
> 
> 
> This covers two common use cases known to me a) using it from
> within build directory with --grub=setup=./grub-setup and b) using
> it to disable actual installation with --grub-setup=/bin/true.
> Current code is compatible with them.

No, it is not.  The current code ignores all values of --grub-setup
other than --grub-setup=setup.

>> 4)  The similar arguments --grub-mkrelpath, --grub-probe, -
>> --grub-editenv, and --font are accepted and completely ignored.
>> If the option no longer works, it should be removed rather than
>> silently ignored.  At least that way you don't have people using
>> it and wondering why it isn't working.
> 
> 
> Again - common use case is using just built grub without installing
> it. Do you have example of other non-trivial use cases?

Again, they are now completely ignored and have zero effect.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTqwp8AAoJEI5FoCIzSKrwhYsH/00j0500OF7ItHiwtFlLrQVz
qyKw+fbjEr3YpesLza9x9ov2T8Peh6Z1sQVFc6RqZwl5KtfF7Tf4lWJ2ktmpzW7q
qQMe/5njOd0Z0p68WOYPjz5kQU6Bsn6KqGgkSadDwISo+pLfeRazmGPmGKZTJ60B
PCDK4ksT8DU3rbn5446mqpAJuWOGTn+R5ijdkCxYVJG6aKild7vc1aEXOW7gkzFF
8R5xREB+RE//LY5eEtms2++xXej107hkS1Jv/bIaNBGuqrFQGjfjOPxmo0Ag9tP8
AM6pGZyxniGJgWg8S7kL6mGi13jK8j/JhQejpEp5DXEJf2osHUFP0lK0qkogjFM=
=9o/P
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grub-install hidden options weirdness
  2014-06-25 17:44   ` Phillip Susi
@ 2014-06-25 18:48     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-06-25 18:48 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]

On 25.06.2014 23:44, Phillip Susi wrote:
> On 6/25/2014 1:33 PM, Andrey Borzenkov wrote:
>> This could be considered as endorsement to continue to use it ...
> 
> No, saying "dont' use this because it is depreciated" is exactly the
> opposite endorsing its continued use.
> 
People ignore "don't"s.
>>> 2)  It seems that --root-directory has been overloaded to specify
>>> the efi system directory.  This seems like it was the wrong thing
>>> to do and again, is totally undocumented.
> 
> 
>> We already have --efi-directory. Why would you want to endorse
>> this archaic usage?
> 
> I don't: I'm pointing out that this usage seems like it was an
> undocumented mistake and it should be removed.
> 
It's a mistake. That's why all reference to old usage has been deleted.
The option is preserved only for compatibility with old scripts.
>>> 3)  It appears that --grub-setup used to allow you to specify an
>>> alternate program to run instead of grub-setup.  Now it seems to
>>> check if its argument is "setup" and if so, has the same affect
>>> as - --no-bootsector, and otherwise has no effect.  This seems
>>> completely wrong.
> 
> 
>> This covers two common use cases known to me a) using it from
>> within build directory with --grub=setup=./grub-setup and b) using
>> it to disable actual installation with --grub-setup=/bin/true.
>> Current code is compatible with them.
> 
> No, it is not.  The current code ignores all values of --grub-setup
> other than --grub-setup=setup.
> 
You're wrong. Read code.
>>> 4)  The similar arguments --grub-mkrelpath, --grub-probe, -
>>> --grub-editenv, and --font are accepted and completely ignored.
>>> If the option no longer works, it should be removed rather than
>>> silently ignored.  At least that way you don't have people using
>>> it and wondering why it isn't working.
> 
> 
>> Again - common use case is using just built grub without installing
>> it. Do you have example of other non-trivial use cases?
> 
> Again, they are now completely ignored and have zero effect.
> 
It's the intent. They're still present in scripts but shouldn't be used
anymore.
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-25 18:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 14:13 grub-install hidden options weirdness Phillip Susi
2014-06-25 17:33 ` Andrey Borzenkov
2014-06-25 17:44   ` Phillip Susi
2014-06-25 18:48     ` Vladimir 'φ-coder/phcoder' Serbinenko

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.