grub sees 2 out of 3 systems...lucky me

Lucio M Nicolosi lmnicolosi at gmail.com
Fri Apr 23 03:35:01 UTC 2010


On Wed, 2010-04-21 at 23:12 -0700, Robert Holtzman wrote:
> On Sun, 18 Apr 2010, Lucio M Nicolosi wrote:
> 
> >[snip]

> > Perhaps you installed Grub2 on Karmic and formatted the new partition w/
> > ext4.
> >
> > If this is the case I recommend checking Grub2 docs, because it has
> > nothing to do with Grub1.
> 
> I have never used ext4 and since Karmic was an upgrade from Jaunty, it 
> preserved Grub1....I think.
> 
[snip]
> If you will notice in my post:
> 
> "With the Jaunty and Karmic installs I tried copying the grub stanzas 
> for Hardy to the respective menu.lst files but got "files not found" 
> (approx wording) when I tried booting Hardy. With Hardy I copied the 
> Jaunty stanzas and got the same result when I tried to boot Jaunty."
> 
> They all gave a "files not found" error.

Below a sample of an old Grub1 menu.lst:

# linux installation on /dev/sda9 kernel AMD64 9.04 current

title		Ubuntu 9.04, kernel 2.6.28-15-generic (rm) on /dev/sda9 AMD64
9.04 
root		(hd0,8)
kernel		/boot/vmlinuz-2.6.28-15-generic
root=UUID=f5423578-1d1e-42f5-adbd-05148e82f17f ro  single 
initrd		/boot/initrd.img-2.6.28-15-generic

savedefault
boot

I suppose that if the files can't be found they haven't been called
correctly.

I guess the first thing to do is check whether the HD definitions are
correct (since the uuids do not easily change)

Boot your system with GParted live CD and check the right parameters
(hdx,x) for each partition, Lenny, Jaunty, Hardy and Karmic. You already
know for sure (from your menu.lst) the correct id of your working
partition. Perhaps it would be a nice time to label each partition with
proper nickname.

Then, enter the system that is still accessible and run: 

    ls -l /dev/disk/by-uuid/

to get every UUID of your partitions. Since this command also gives you
the number of the partition (sda1, sda3, etc) the first step is not
really needed but you have to remember that in Grub1 (hd0,0) is in fact
sda1, like in the example above where (hd0,8) was sda9. Grub2 changed
this.

Then you'll have to mount every single partition that contains a Linux
version to get every kernel version you may find at
media/[partition]/boot. Or you can check each /boot/grub/menu.lst and
extract the commands lines for each kernel (like I roughly did above)

With these informations you are now prepared to edit your menu.list in
your working system, so that it addresses each kernel found in you
computer with the proper HD Identification and UUID.

Remember that in a computer with several system partitions the menu.lst
has to be manually updated every time a (secondary) system has a kernel
upgrade.

I believe that by properly editing your menu.lst there's no way your
systems can keep "hiding themselves".

But I'm not sure.

Good luck,

Lucio



-- 
L M Nicolosi, Eng.
Lat.: 23°34'4.79"S - Long.: 46°39'59.53"W
Linux Regist. User #481505 - http://counter.li.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100423/61be056d/attachment.sig>


More information about the ubuntu-users mailing list