|
From: | Bruce Dubbs |
Subject: | Re: grub2 back to lilo ? |
Date: | Sat, 15 May 2010 00:51:41 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080722 SeaMonkey/1.1.11 |
Colin D Bennett wrote:
Perhaps instead of pre-generating the entire GRUB configuration (e.g. from a particular Distro like Ubuntu 9.10) things could be inserted into the main grub.cfg at GRUB boot time. Here's just a portion of what Ubuntu 10.04 puts in the generated grub.cfg (of course with a stern warning not to hand modify the file):
The warning is a bit too strong. It should be more like "Don't modify by hand unless you know what you are doing."
I personally think that grub-mkconfig goes too far. At least the distros go too far in completely overwriting grub.cfg. They make assumptions that the users don't know what they're doing. That is not always true. If there is an existing grub.cfg, the user should at least be given a prompt that grub.cfg is going to be overwritten and given a chance to bail out.
### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,3)' search --no-floppy --fs-uuid --set 534672c7-9930-407e-a13d-66a8e873a842 linux /vmlinuz-2.6.32-22-generic root=UUID=a5c8657b-e206-47d5-8cc2-30cc6cbfc77e ro quiet splash initrd /initrd.img-2.6.32-22-generic } ### etc. etc. Now what if specific OS parts could be separated out into another file, which could be referred to by GRUB at boot time. Something like: --- grub.cfg # General settings set timeout=10 set root='(hd0,3)' # OS-specific parts include ubuntu-10.04.cfg include macos.cfg include windows_xp.cfg
This is a reasonable thing to do, but where are the include files found? I would suggest grub/config.d/
Is there anything that goes in these include files other than menuentries?One problem is that many distros install in one partition, including /boot. You then have the same problem of having to access another partition of various types (reiser, ext4, jfs, xfs, etc) on possibly a different drive to find the other /boot partitions. If we can educate user and distros to always have a dedicated small /boot partition, then there are several good options.
-- Bruce
[Prev in Thread] | Current Thread | [Next in Thread] |