Grub2 and multiple boot different ubuntu versions

Colin Law clanlaw at googlemail.com
Wed Mar 24 21:25:59 UTC 2010


On 24 March 2010 18:53, sam <srf10130 at vtc.vsc.edu> wrote:
> On 03/24/2010 11:30 AM, Colin Law wrote:
>>
>> On 24 March 2010 15:21, Colin Law<clanlaw at googlemail.com>  wrote:
>>>
>>> On 24 March 2010 14:41, Goh Lip<g.lip at gmx.com>  wrote:
>>>>
>>>> Colin Law wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I had a double boot setup with XP and Karmic.  I installed Lucid Beta
>>>>> 1 in a separate partition and on boot it gives me the menu with Lucid
>>>>> at the top followed by Karmic kernels and XP, and all works well.  As
>>>>> Lucid is just for testing, however, I want it do default to Karmic
>>>>> boot so I set GRUB_DEFAULT=5 in /etc/default/grub, run sudo
>>>>> update-grub and again all is well.
>>>>> Each time the Lucid kernel is updated, however, I need to add two to
>>>>> GRUB_DEFAULT as there are new kernels above it.  I wonder whether it
>>>>> is possible to rearrange the grub menu so Karmic is at the top and I
>>>>> can leave the default at 0.  I have contemplated booting into Karmic
>>>>> and running update-grub but I hesitate to do this in case it is a bad
>>>>> idea, not really understanding how grub works.
>>>>> It would be nice if grub allowed a regex setting for the default boot
>>>>> when specifying a string, defaulting to the first matching name, but I
>>>>> have not seen this in the docs.  It would seem like a trivial
>>>>> extension.
>>>>>
>>>>> Colin
>>>>
>>>>
>>>> Try 'saved' as default. Yes, it will boot last booted entry not a
>>>> 'preselected' entry.
>>>
>>> I thought of that, but it is not really what I want.  If I boot into
>>> lucid then power off I generally still want it to boot to karmic next
>>> time.  Also, presumably, if there were a new karmic kernel (when
>>> booted to karmic of course) on reboot it would presumably go to the
>>> old one not the new one.
>>>
>>> I am about to try update-grub from karmic since Sam said it should be
>>> ok and no-one has said otherwise.  If you don't here from me again
>>> then I am presumably in the proverbial.
>>
>> Well that did not do any harm, in fact it did not change the boot
>> menu, Lucid is still at the top.
>>
>> Colin
>>
> Sorry Colin,
>
> What you really need to do is grub-install (not update-grub) from the karmic
> partition. I didn't look it up before responding. The grub-install command
> will install grub to the MBR with the /boot/grub/grub.cfg that you want to
> use (karmic's) which will give you the karmic options first then it will
> list the other OSes you have installed on other partitions.

Many thanks to all for the suggestions, I have learned a lot from
working through them.  I hope you will all not be upset if I decide to
wimp out and just live with what I have, editing /etc/default/grub
occasionally as required.  I think possibly the possibility of causing
myself grief outweighs the benefit.

Thanks again

Colin




More information about the ubuntu-users mailing list