Adding kernel parameters to _other_ OS in grub

Tom H tomh0665 at gmail.com
Wed May 26 01:32:14 UTC 2010


On Tue, May 25, 2010 at 8:05 PM, Luis Paulo <luis.barbas at gmail.com> wrote:
> On Tue, May 25, 2010 at 10:38 PM, Dotan Cohen <dotancohen at gmail.com> wrote:
>>
>> I must be missing something obvious. I have read the docs [1] but I
>> cannot figure out how to add a kernel parameter to the second OS on a
>> dual-boot system with Grub2.
>>
>> Specifically, I have Kubuntu 10.04 on sda2 and Ubuntu 10.04 on sda1.
>> The Ubuntu install on sda1 was done last, and grub was installed. I
>> added a kernel parameter to the Ubuntu install in the
>> /etc/default/grub file's GRUB_CMDLINE_LINUX line, but it was only
>> added for the sda1 (Ubuntu) entries, not for the sda2 (Kubuntu)
>> entries. I then booted sda2 (Kubuntu) and tried editing it's own
>> /etc/default/grub (then running update-grub) but that did not add the
>> kernel parameter either.
>>
>> What am I missing? Thanks.
>>
>> [1] These:
>> https://wiki.ubuntu.com/Grub2
>> https://help.ubuntu.com/community/Grub2
>> http://ubuntuforums.org/showthread.php?t=1195275
>> http://members.iinet.net/~herman546/p20/GRUB2%20Bash%20Commands.html
>> http://www.justlinux.com/forum/showthread.php?t=152790
>
> The way seems to be
> https://wiki.ubuntu.com/Grub2#User-defined%20Entries
>
> Copy the entries you need from grub and put them on
> /etc/grub.d/40_custom (or a new file), add there the kernel
> parameters. Change the names (menuentry), so you may identify them
> from the ones produced automatically.
>
> Do grub-update. Note you'll have to maintain that (new or 40_custom) file.

+1

grub2's GRUB_CMDLINE_LINUX only sets the update-grub kernel parameters
for the install where grub is installed (the output of 10_linux; in
your case Ubuntu) in the same way that grub1's defoptions only sets
the update-grub kernel parameters for the install where grub is
installed (the entries in between the "AUTOMAGIC KERNELS LIST"
markers).

So Luis' 40_... solution is the one to use. If 30_... is only
generating the Kubuntu entries and you do not ant them, you can set
"GRUB_DISABLE_OS_PROBER=yes" in "/etc/default/grub" before running
update-grub.




More information about the ubuntu-users mailing list