|
|
Subscribe / Log in / New account

grub support?

grub support?

Posted Jun 13, 2011 12:22 UTC (Mon) by HelloWorld (guest, #56129)
In reply to: grub support? by cmccabe
Parent article: Fedora 16 to use Btrfs as its default filesystem

> However... the grub->grub2 transition annoyed me in several ways. There were a lot of changes that just seemed gratuitous. Why did partitioning numbering change to start at 1 rather than 0?
I understand that people dislike unnecessary changes, but you must admit that this is hardly a reason for calling grub2 a "total mess".

> With the old grub, I only had to edit one config file, /boot/grub/grub.conf. My changes took effect immediately after editing this file. That was touted as one of the big benefits of grub over lilo-- with lilo, you had to re-run lilo every time you edited the lilo.conf. But now, I have to re-run update-grub every time I edit the grub2 configuration files.
When your distro installs a new kernel, a new entry needs to be generated in the boot loader, which is usually done by generating a new configuration file from scratch, overwriting the old one. On Ubuntu at least, it works that way for both grub legacy and grub2, so there's really no difference in that respect.

Also, unlike grub legacy, grub2 offers a simple and clean mechanism to add custom entries: just put them in /boot/grub/custom.cfg. You don't need to run update-grub in order to pick up changes in that file.

> Also, the number of configuration files for grub2 seems excessive. I only need one file to configure sshd, but just passing control to the kernel is now so complex that it needs an entire directory worth of shell scripts-- some of which are generated by other shell scripts?
Shell scripts aren't configuration files but code, and besides that, all the scripts in /etc/grub.d are hand-written, not generated. That leaves only two configuration files, namely /etc/default/grub and /boot/grub/custom.cfg. That seems sensible to me: the first one controls the auto-generated grub entries, the second one contains the hand-written ones. And it's even easy to extend the code that auto-generates grub entries by dumping additional scripts in /etc/grub.d.


to post comments

grub support?

Posted Jun 13, 2011 13:58 UTC (Mon) by tzafrir (subscriber, #11501) [Link]

With grub1 in Debian (and IIRC also Ubuntu), /boot/grub/menu.lst was both a configuration file and a generated file. A special section of it was re-generated by update-grub . Configuration for update-grub was in lines beginning with a single '#' mark.

Works well. But not really a standard way to handle configuration.

grub support?

Posted Jun 13, 2011 20:43 UTC (Mon) by cmccabe (guest, #60281) [Link] (2 responses)

> I understand that people dislike unnecessary changes, but you must
> admit that this is hardly a reason for calling grub2 a "total mess".

I never said that grub2 was a "huge mess". That was a different poster. Please read more carefully. I do think the transition could have been managed better, though.

> When your distro installs a new kernel, a new entry needs to be generated
> in the boot loader, which is usually done by generating a new
> configuration file from scratch, overwriting the old one. On Ubuntu at
> least, it works that way for both grub legacy and grub2, so there's really
> no difference in that respect

The way grub-legacy works for me on Fedora is that I can edit /boot/grub/grub.conf, and the distribution can also edit that file during software upgrades. I suppose you can argue that having part of a file be auto-generated, and another part be hand edited isn't "clean," but it is simple and it does work pretty well for me. In grub2, obviously, I have to remember not to change that file, because it will be completely destroyed by the auto-generation system.

I guess maybe the biggest benefit of the new multi-file structure will be to people doing package management. For some reason, that isn't mentioned a lot in these discussions.

grub support?

Posted Jun 13, 2011 21:04 UTC (Mon) by HelloWorld (guest, #56129) [Link] (1 responses)

> I never said that grub2 was a "huge mess". That was a different poster. Please read more carefully.
I never said explicitly or implicitly that you did. Please read more carefully.

> The way grub-legacy works for me on Fedora is that I can edit /boot/grub/grub.conf, and the distribution can also edit that file during software upgrades.
Yes, that is because Fedora developed a utility named grubby that is able to read and edit configuration files for grub legacy, lilo and elilo, but not grub2. So your problem has nothing to do with grub2 but with grubby.

grub support?

Posted Jun 14, 2011 19:16 UTC (Tue) by k8to (guest, #15413) [Link]

> > I never said that grub2 was a "huge mess". That was a different poster. Please read more carefully.
> I never said explicitly or implicitly that you did. Please read more carefully.

Bystander, it was defenitely implied by the text.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds