Adding kernel parameters to _other_ OS in grub

NoOp glgxg at sbcglobal.net
Wed May 26 06:19:56 UTC 2010


On 05/25/2010 10:20 PM, Tom H wrote:
> 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.

Really?

Your first reply:

> 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