Adding kernel parameters to _other_ OS in grub

NoOp glgxg at sbcglobal.net
Wed May 26 01:55:16 UTC 2010


On 05/25/2010 06:32 PM, Tom H wrote:
> On Tue, May 25, 2010 at 8:05 PM, Luis Paulo <luis.barbas at gmail.com> wrote:
...
>> 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.
> 

I know that grub.cfg states:
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub

I wonder if in this case it might be easier to just add them to the end
of the linux line(s) in /boot/grub/grub.cfg. Of course you'd need to
check/duplicate on new kernel updates. But you'd need to do similar with
40_custom as well.

*Normal disclaimers for backing up et al apply*

A better solution would be to have the ability for /etc/default/grub
'GRUB_CMDLINE_LINUX' to recognise where to apply the parmeter. For example:

GRUB_CMDLINE_LINUX=2,"quiet splash"

where the '2' would reference the 2nd menuentry.

You could then run:

$ grub-mkconfig -o test.cfg

to output a test.cfg file to see if the action is applied properly. Or
simply:

$ $ grub-mkconfig

to view what the result would be on the terminal screen.








More information about the ubuntu-users mailing list