Grub2 and multiple boot different ubuntu versions

NoOp glgxg at sbcglobal.net
Wed Mar 24 15:34:09 UTC 2010


On 03/24/2010 02:34 AM, 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
> 

I have Win7, 8.04, 9.10, and 10.04 installed. Unfortunately, I added
8.04 as an afterthought (needed to test a 64bit 8.04 app). Because I
used a liveCD instead of an AlternateCD for the 8.04 install, that
installed the old grub. Having had the same issue as you've mentioned
with the lucid kernel updates, I booted into karmic from the liveCD, and
did a grub reinstall. See:
https://help.ubuntu.com/community/Grub2
[Reinstalling from LiveCD]
That put karmic at the top, then Win7, 8.04, and then 10.04. Ironically
enough, both 8.04 and 9.10 have more kernels installed, so it's a bit of
work to get down to 10.04. I guess it's time to clean :-)

As Goh mentioned, you can opt to have grub2 boot to the last kernel
used. One of the easiest ways I've found to do this (other than editing
the files) is to install startupmanager. From there
(System|Admin|Startup Manager) you can elect to have: 'Last used', or
you can specify the specific grub2 option. You can also limit the number
of kernels in the boot menu (default is 2).





More information about the ubuntu-users mailing list