Broken Grub
Michael Hirsch
mdhirsch at gmail.com
Sat Nov 22 04:33:49 UTC 2008
On Fri, Nov 21, 2008 at 4:08 AM, David <davidp540 at gmail.com> wrote:
> Assistance please.
> I have the following:
>
> Dual boot with Grub Windows XP and Ubuntu 8.10 (64 bit)
> AMD 64 processor
> two cd roms
> one older SCSI Maxtor 60 gig hard drive mounted as hda formatted win ntfs
> two 80 gig SATA drive one formatted ntfs (hdb) and the other native Linux
> (forget the file name but Linux native) (hdc)
>
> I happily had Ubunto (upgraded) installed and runing fine on the hdc drive
> but as is usual needed to re-install Windows XP.
>
> I did so and lost Grub.
>
> Maybe incorrectly but I booted up the Ubuntu 8.10 on the CD ROM and
> eventually installed a clean copy of 8.10 onto a new partition on hdc.
> But now I've completely lost my orginal perfectly fine (upgraded) install of
> Ubuntu 8.10 with all my docs and add-ons etc!
>
> When I boot into the new 8.10 install I can even see the hdc drive.
>
> How do I get Grub to see my old install (it doesn't list it as an option on
> boot).
> How do I get to mount the drive hdc that I can't even see.
So you'd like to get your old install back. If I understand
correctly, you now have grub working, but it only knows about your new
ubuntu and your new XP, but not your old Ubuntu. Also, There is some
confusion with hdc.
Let's start with hdc. Somehow you can see it cause you can boot the
new Ubuntu, unless I misunderstood you.
My guess is that you don't have hdc anymore because almost all drives
now show up as scsi drives, even if they are IDE. boot your new
ubuntu and run "mount". I bet you'll see that you have /dev/sda,
/dev/sdb, and /dev/sdc. Probably your old /dev/hdc is now /dev/sdc.
Once you find the right device name you should be able to mount that
partition and see that the files are all there.
To get your old installation back you can either use your currently
working grub (in the new Ubuntu) and tell it about the old Ubuntu, or
you can restore the old one.
To add the old Ubuntu to the new grub you just have to add the
corresponding stanza to the /boot/grub/menu.lst file. It will be just
like the current booting stanza, but with a different partition.
There will be a stanza like
title kubuntu
kernel (hd2,3)/boot/vmlinuz root=/dev/sda1 resume=/dev/hdc3
initrd (hd2,3)/boot/initrd.img
and you should copy it and make it read
title kubuntu
kernel (hd2,1)/boot/vmlinuz root=/dev/sda1 resume=/dev/hdc3
initrd (hd2,1)/boot/initrd.img
Where (hd2.3) means hard drive 2, partition 3 and I've changed it to
hard drive 2 partition 1. Your actual numbers will differ.
But the better solution is to reinstall grub. Use grub-install for
this. You need to know the boot device. Do you boot from the windows
HD which is probably /dev/sda, or the Ubuntu disk, or I should say
which did you old installation boot to? I'm guessing that you to boot
from /dev/sda.
What I usually do is boot with your new ubuntu or a boot CD. Mount
the old ubuntu somewhere--lets say it is /media/hdc1. Now run "sudo
chroot /mdedia/hdc1 bash"
You will now be in your old ubuntu. If you run "grub-install
/dev/sda" I think that will install grub on the boot drive, but since
you are chrooted to your old Ubuntu install it will use the menu.lst
from your ubuntu installation.
I think that is right, but whenever this happens to me I spend some
time reading up on grub again, so I can't swear to it. But something
very like this will work.
Good luck,
Michael
More information about the kubuntu-users
mailing list