Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399265 - genkernel should use menu.lst as default for GRUB_CONF
Summary: genkernel should use menu.lst as default for GRUB_CONF
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 08:31 UTC by Vladimir Berezhnoy
Modified: 2017-09-13 18:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Berezhnoy 2012-01-18 08:31:03 UTC
Default grub config file is menu.lst, genkernel should use it.
Comment 1 Homer 2012-04-11 22:50:32 UTC
Why?

IIRC menu.lst was only ever distributed as an example config, not intended to be used, but simply a fallback if --config-file was not specified. The historical use of the "grub.conf" seems to have originated with Red Hat, but it seems perfectly reasonable, which is probably why most distros now use it. Additionally, after users being accustomed to grub.conf for all these years, removing it and replacing it with menu.lst would cause confusion and chaos, with absolutely no benefit whatsoever.

Also consider that grub-1.x is now officially a legacy product, and grub-2.x doesn't even use menu.lst or grub.conf at all, so the question is largely moot.

+1 INVALID.
Comment 2 Vladimir Berezhnoy 2012-04-11 23:03:13 UTC
From man grub

       --config-file=FILE
              specify stage2 config_file [default=/boot/grub/menu.lst]

From info grub

   To enable the menu, you need a configuration file, `menu.lst' under
the boot directory. We'll analyze an example file.


AFAIK grub.conf was an attempt to introduce some human friendly naming for grub config, but has mostly failed since upstream uses menu.lst and not grub.conf. So basically grub.conf is not related to grub, I wonder where this once comes from and why gentoo sugegst using it instead of grub default menu.lst.
Comment 3 Sebastian Pipping gentoo-dev 2012-04-12 00:00:21 UTC
Is this about Grub 1.x or 2.x?

For Grub 1.x I have been using /boot/grub/menu.lst since I can remember.
Comment 4 Vladimir Berezhnoy 2012-04-12 00:49:21 UTC
I believe it's 1.x, at least I'm using genkernel to auto-configure 1.x
Comment 5 Xake 2012-04-12 05:41:34 UTC
So now when a lot of people seems to have added comments without fully reading those before (both which version of grub we are talking about have been "rediscovered" as well as two different takes on why grub.conf). So I should add mine.

Firstly: menu.lst does not make sense at all with grub-2, so this is all grub-legacy (there never was a grub-1.xx which was not a beta of grub-2, just grub-0.xx. So talking about grub-1.xx when we talk about grub-legacy is just confusing).


menu.lst is what upstream suggests in their docs. It seems also to be what Debian and SUSE uses.
grub.conf is what at least currently is used by RedHat/Fedora and Ubuntu.


But that does not matter as much as grub.conf is what our own grub-0.9x-packages uses.

In fact, if you have a menu.lst but no grub.conf our grub-0.9x ebuilds "migrates" that to grub.conf (i.e. mv -f menu.lst grub.conf && ln -snf grub.conf menu.lst).

This means that every system using grub-legacy from one of our ebuilds has the following in their /boot/grub:
* One file named grub.conf
* One symlink named menu.lst pointing to grub.conf

The ebuilds may contain the following comments in this regard:
# XXX: we need to review menu.lst vs grub.conf handling.  We've been converting
#      all systems to grub.conf (and symlinking menu.lst to grub.conf), but
#      we never updated any of the source code (it still all wants menu.lst),
#      and there is no indication that upstream is making the transition.

But the question is if this review is something that ever going to happen, it will just cause to much problem to revert this conversion. And this problem/question does not even exist with grub2 which I think makes it a lesser prioritized question.


With this in mind I say: forget about menu.lst. Use grub.conf. If you have something else then grub.conf you have a setup that is unsupported/undocumented wrt Gentoo (also the handbook talks about grub.conf).

And if you are using this kind of Non-Gentoo setup, just send us a patch making the grub config file customizable.


+1 INVALID because grub.conf is the Gentoo default. It is not something failed.
Comment 6 Vladimir Berezhnoy 2012-04-12 06:03:59 UTC
grub2 is masked at the moment, and grub-legacy is both in stable and ~ arches so the question is still very much actual. And the question is why gentoo uses some random file for grub config instead of default menu.lst.

As for the genkernel - since what it does is addin entry to grub configuration file, then it should use grub config file, which is menu.lst. grub.conf may not even exist and that will make no difference for grub.
Comment 7 Xake 2012-04-12 19:41:51 UTC
(In reply to comment #6)
> grub2 is masked at the moment, and grub-legacy is both in stable and ~
> arches so the question is still very much actual. And the question is why
> gentoo uses some random file for grub config instead of default menu.lst.
> 

Yeah, a random file that is in the default configfile in Gentoo since, well the grub-0.92.ebuild was commited to portage Mon Jun 24 19:43:07 2002 UTC (9 years, 9 months ago) by azarah.

The configfile by since then used by at least Gentoo, Ubuntu (which did not even exist back then), Red Hat, Fedora (these are the ones I have confirmed), and other dists built on their foundation.

So, yeah. A totally random file which is the only file being officially documented for those distribution the last 9 to 10 years.


And yeah, GRUB2 may be KEYWORDed for Gentoo, but have you asked yourself why?
The answer is simple: *you do not fsck with peoples bootloaders*.
The only exception is if you are willing to take the fallout (by either have support teams ready, or have extensive documentation telling you how to fix the things that break).
For Fedora, Ubuntu, Debian and some other binary distributions with stable releases this fallout is easier to predict and handle then for a rolling distribution like Gentoo where there are not even a real "default disk layout".
And now you come along and tell us to possible break our users boot system since, well a decision 9 years ago was wrong because it made us deviate from upstream?

Have you asked yourself if the process of stabilizing this change (not counting in the time it takes to change the Gentoo Handbook and other documentation) for that change may very well take longer then stabilizing GRUB2? On what do you think the the non-paid Gentoo devs should spend their time?


(In reply to comment #6)
> As for the genkernel - since what it does is addin entry to grub
> configuration file, then it should use grub config file, which is menu.lst.
> grub.conf may not even exist and that will make no difference for grub.

As explained above, grub.conf MUST exist on every grub-legacy running Gentoo system which has done a grub-install the last 9 years, else your computer would not boot.
Everything else is a grub-legacy *not* coming from Gentoo portage, and thus not something I see a reason to have as default in a Gentoo package.
Now if there was a magic patch posted here making it possible to either at runtime or with the help of genkernel.conf change the grub-legacy config file
Genkernel tries to change, then I am willing to review that patch.
But to write it just because you think that a change to the Gentoo grub-legacy package made over 9 years ago was wrong?


I am still +1 INVALID.
Comment 8 Vladimir Berezhnoy 2012-04-12 20:03:00 UTC
>So, yeah. A totally random file which is the only file being officially documented for those distribution the last 9 to 10 years.

Yup, grub config file has always been menu.lst, if menu.lst is missing - your system will not boot. if grub.conf is missing no one will notice, well, unless grub ebuild has already broken your system by doing some weird and uneccessary manipulations.
Even in gentoo grub doesn't use grub.conf, it uses menu.lst just like it should according to doc.

>As explained above, grub.conf MUST exist on every grub-legacy

Not true as explained above.
Comment 9 Xake 2012-04-13 05:44:28 UTC
(In reply to comment #8)
> >So, yeah. A totally random file which is the only file being officially documented for those distribution the last 9 to 10 years.
> 
> Yup, grub config file has always been menu.lst, if menu.lst is missing -
> your system will not boot. if grub.conf is missing no one will notice, well,
> unless grub ebuild has already broken your system by doing some weird and
> uneccessary manipulations.
> Even in gentoo grub doesn't use grub.conf, it uses menu.lst just like it
> should according to doc.
> 

Ok. So I actually did some more digging.
And it seems like I was partially wrong.
So sorry for misleading you. Patch grub-0.90-configfile.patch was only in use for about two versions (and a lot of revisions) of grub. It was during that time for example bug #6300 was filed.

However the point still stands.
* grub.conf is the *default* config file generated and handled by the grub-legacy ebuilds
* grub.conf is the *only* config file mentioned in the Gentoo handbook.
* the grub-legacy ebuild *only* provides grub.conf.sample and documentation on how to edit said sample

As long as at least those points stands, grub.conf *is* the default configuration file for grub-legacy in Gentoo, chosen by the grub-legacy maintainers.

And as long as they have declared that file as the default config file, I see no reason to start screwing with our defaults.


So I see two things happen here.
Either you:
* File a bug against grub-legacy, to convinces the maintainers to rewrite their ebuilds, their documentation and everything else to match upstream
* You write a patch against Genkernel making it possible to at runtime/in genkernel.conf change the configfile our grub-legacy logic tries to edit

After that you can post patch here. I will happily review it. But as long grub.conf is the Gentoo default, grub.conf should stay the Genkernel default.
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-09-13 18:03:23 UTC
grub-legacy is going away, genkernel will only support grub2 in future.