Adding kernel parameters to _other_ OS in grub

Tom H tomh0665 at gmail.com
Wed May 26 05:20:14 UTC 2010


On Wed, May 26, 2010 at 12:41 AM, NoOp <glgxg at sbcglobal.net> wrote:
> On 05/25/2010 08:46 PM, Tom H wrote:
> ...
>>
>> The configfile option might be of interest to the OP because he could
>> chainload his Kubuntu install through a configfile entry in 40_... and
>> he could have different kernel parameters in his Kubuntu install and
>> update them and his Kubuntu kernels with uodate-grub whilst booted in
>> Kubuntu. (What I don't understand is why anyone would have separate
>> 10.4 installs for GNOME and KDE but that is another matter
>> entirely...)
>>
>
> I think that is missing the point of the OP. It would be quite handy to
> find an "easy" way to do as Dotan is requesting. For example I have
> multiple machines with several OS' & versions on them; 8.04, 9.04, 9.10,
> 10.04, Winx etc. To have to create 40_custom entries for all of them is
> simply too much effort. For the time being I rather just edit the
> grub.cfg if I want to add a kernal option. Additionally, having GNOME
> and KDE on separate partitions is an excellent way to compare between
> the two if you wish to keep the installs clean (i.e., no gnome install
> then install kde so you have both libraries etc., or no kde install that
> you then clutter up by installing gnome). For comparison purposes it
> makes perfect sense to me.

Point taken regarding separate installs for GNOME and KDE although it
would be generous to say that only 10% of users need such clean
installs.

I didn't see the first post in this thread because Dotan's emails go
straight to trash and I wouldn't have posted had I known that it was
his query.

Let's assume that you have Ubuntu, Kubuntu, Lubuntu, and Xubuntu
installed on (hd0,1), (hd0,6), (hd0,7), (hd0,8) respectively and that
it is Ubuntu's grub that controls the boot process.

You would have:

$ cat 40_...
#!/bin/sh
cat <<EOF
menuentry "Kubuntu configfile" {
configfile (hd0,6)/boot/grub/grub.cfg
}
menuentry "Lubuntu configfile" {
configfile (hd0,7)/boot/grub/grub.cfg
}
menuentry "Xubuntu configfile" {
configfile (hd0,8)/boot/grub/grub.cfg
}

I would hardly call this difficult.

Furthermore, assume that you are in the Lubuntu install and the kernel
is updated. With the configfile setup above, if you reboot, you can
boot from the new kernel immediately (assuming that update-grub ran
after the kernel update). Without this setup, unless you press "e" or
"c" at the grub menu and boot manually from the new kernel, you have
to boot into the Ubuntu install and run update-grub for the grub menu
to display the updated Lubuntu kernel as an option.




More information about the ubuntu-users mailing list