Linked by Thom Holwerda on Wed 21st Apr 2010 23:01 UTC
Linux The tools used to boot Linux are changing. Specifically, the Grand Unified Bootloader is now officially in maintenance mode only, and GRUB's developers have abandoned the original GRUB in favor of an entirely rewritten package, known as GRUB 2. Discover GRUB 2's new capabilities and how to use it.
Thread beginning with comment 420365
To view parent comment, click here.
To read all comments associated with this story, please click here.
AnyoneEB
Member since:
2008-10-26

Personally, I find multiple config files much easier to deal with. They certainly make scripts that deal with config files easier, but I also like that I can, for example, enable or disable a site in Apache 2 using ln -s and rm and that to change a single site, I do not have to find it in a config file. (Admittedly, I am not a heavy user of Apache but I do similar things with apt.)

Apt also makes good use of it with the apt.conf.d and sources.list.d directories. Notably, apt will look for the files apt.conf and sources.list and check for the directories only if the files do not exist, so if you prefer to have everything in one file, you can.

I have not looked into the grub2 configuration much as the Debian install of it just worked for me. I just looked and (noting that it may be different on other distros) it appears to be made out of a single config file /boot/grub/grub.cfg which is built by running the shell scripts in /etc/grub.d/ in order, which seems like a pretty sane way to handle things, especially as it includes an example file which just dumps its contents into that place in the config file (which is empty by default) for adding your own directives. If you really wanted to, you could just replace that with a single file pretty easily.

Reply Parent Score: 1

phoenix Member since:
2005-07-11

Some things, it makes sense to split into separate files. Like Apache virtual hosts. But does everything else under /etc/apache2 have to be in separate files? Really?

Same with all the apt.sources.d directories. Is it really easier to manage all those files, then just firing up a text editor and adding/removing a simple # in the first column?

What's even worse, though, is when using separate config files actually breaks features ... like the mess that is logrotate (at least in Debian/Ubuntu). /etc/logrotate.conf is supposed to be the global config file that all the other files under /etc/logrotate.d/ pick up ... yet it doesn't actually work that way, and you still have to duplicate all your monthly/compress options in all the files. Which means you now have to edit dozens of files to change the rotation policy ... instead of just one.

There's a time and a place to separate config files and use includes. Grub configuration is not one of them.

Reply Parent Score: 2

vivainio Member since:
2008-12-26


Same with all the apt.sources.d directories. Is it really easier to manage all those files, then just firing up a text editor and adding/removing a simple # in the first column?


It sure is easier for dpkg...

Just edit /etc/grub.d/40_custom and you should have the old /boot/grub/menu.lst experience.

Reply Parent Score: 2