PDA

View Full Version : [ubuntu] GRUB trouble : I lost my GRUB!!!



kauboy
September 15th, 2008, 03:17 PM
I installed Fedora Core 9.0 on my HDD containing Ubuntu 8.04 and WinXP, but on a different partiton. During the installation, I chose the Fedora Core's /boot partition as the install location for its Boot Loader, as I din't want it to overwrite the GRUB 1.5 of my Ubuntu from my MBR. Now, when I boot my system, I see "Loading GRUB 1.5 ....." for just one second, the same I used to see earlier during my Ubuntu 8.04 + WinXP times, but it doesn't load completely and instead, it loads the Fedora Core GRUB 0.97 or something. Here, I can only boot Fedora or Other (WinXP), I don't know how to get my GRUB 1.5 back!! I just want to get back to my Ubuntu!! Help please... :(

Tatty
September 15th, 2008, 03:19 PM
Try re-installing grub via the Ubuntu LiveCD, that should detect all your OS's for you.

https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

kauboy
September 15th, 2008, 03:24 PM
How do I install the GRUB alone from the LiveCD?

Guess that's what the link was for! Sorry!!

kauboy
September 15th, 2008, 03:33 PM
Is there a way to get into Ubuntu without having to re-install my GRUB, because I'm quite sure that my old GRUB 1.5 is still present, just that it isn't loading. Then maybe, I can edit the menu.lst file in Ubuntu and get Fedora to load. I just want to load my Ubuntu GRUB 1.5, without re-installation if possible. GRUB 1.5 is still there, it just comes up for coupla seconds, then the Fedora GRUB loads up :(.

bumanie
September 15th, 2008, 03:40 PM
Post output of
cat /boot/grub/menu.lst

caljohnsmith
September 15th, 2008, 03:41 PM
Is there a way to get into Ubuntu without having to re-install my GRUB, because I'm quite sure that my old GRUB 1.5 is still present, just that it isn't loading. Then maybe, I can edit the menu.lst file in Ubuntu and get Fedora to load. I just want to load my Ubuntu GRUB 1.5, without re-installation if possible. GRUB 1.5 is still there, it just comes up for coupla seconds, then the Fedora GRUB loads up :(.
You have to reinstall Grub to the master boot record (MBR) and point it to your Ubuntu partition again if you want your Ubuntu's menu.lst to be used instead of Fedora's. Just do like Tatty recommended. Boot your Live CD, and do:

sudo grub
grub> find /boot/grub/stage1
If that returns two partitions in the form (hdX,Y), decide which is your Ubuntu partition and use it in the commands below. If it only gives one output in the form (hdX,Y), use that:


grub> root (hdX,Y)
grub> setup (hdX)
grub> quit
You can then add Fedora's menu.lst to your Ubuntu menu.lst with the following syntax:

title Fedora
root (hdX,Y)
configfile /boot/grub/menu.lst

Of course (hdX,Y) needs to be your Fedora partition, and you also need to make sure you give the correct path to the menu.lst or grub.conf, whichever Fedora uses. If you need help with that, let me know, otherwise let me know how it goes.

Tatty
September 15th, 2008, 03:41 PM
Im not really sure, im not sure how having multiple grubs works. Re-installing is just the easiest option as it should sort it all out for you.

If you really want to just fix it by hand then this page should help you.

https://help.ubuntu.com/community/GrubHowto

Bucky Ball
September 15th, 2008, 03:42 PM
If you have another comp online you could try this:

www.supergrubdisk.org

Steve1961
September 15th, 2008, 03:43 PM
Is there a way to get into Ubuntu without having to re-install my GRUB, because I'm quite sure that my old GRUB 1.5 is still present, just that it isn't loading. Then maybe, I can edit the menu.lst file in Ubuntu and get Fedora to load. I just want to load my Ubuntu GRUB 1.5, without re-installation if possible. GRUB 1.5 is still there, it just comes up for coupla seconds, then the Fedora GRUB loads up :(.

It looks like Fedora's grub has installed to the mbr. You need to reinstall the ubuntu grub to the mbr using the live cd, as per the link. Only takes a couple of seconds so it's not a big job. Then you can edit menu.lst to add Fedora

edit: looks like we all replied at once

kauboy
September 15th, 2008, 03:44 PM
Evidently, I'm now running only Fedora Core 9.0 or something, as I've no means of loading my Ubuntu 8.04 yet.


# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,8)
# kernel /vmlinuz-version ro root=/dev/sda11
# initrd /initrd-version.img
#boot=/dev/sda9
default=0
timeout=5
splashimage=(hd0,8)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.25-14.fc9.i686)
root (hd0,8)
kernel /vmlinuz-2.6.25-14.fc9.i686 ro root=UUID=d870ef70-ef17-48b2-bffc-2855c237fec2 rhgb quiet
initrd /initrd-2.6.25-14.fc9.i686.img
title Other
rootnoverify (hd0,0)
chainloader +1


Pardon me, 8 ) without the space in-between, is what shows up as 8) (without the space!!)

kauboy
September 15th, 2008, 03:48 PM
Alright, I'll try re-installing the grub from LiveCD and let you know how it goes.

kauboy
September 15th, 2008, 05:44 PM
I did as suggested, booted in LiveCD, did sudo grub, find /boot/grub/stage1. Not found. I then looked up elsewhere and found that I had to mount the volume /dev/sda7 (/root for my Ubuntu) in some place using mkdir blah. Did all that. Did chroot in blah directory after mounting. Then did sudo grub, find /boot/grub/stage1. Not found. Anyway. My question is this : I've formatted both my Ubuntu 8.04 old installation and the new Fedora Core 9.0 installation. I've installed Fedora Core again, with some wise space allotments for /, /boot and swap. I'm gonna do the same for Ubuntu 8.04 now. Will my Ubuntu GRUB 1.5 recognise Fedora 9.0 after installation???? Or will I run into the "Fedora GRUB doesn't know Ubuntu" problem the other way around this time : "Ubuntu GRUB doesn't know Fedora"?? "Does Ubuntu GRUB detect Fedora"?? Anybody??? :(

caljohnsmith
September 15th, 2008, 05:49 PM
I did as suggested, booted in LiveCD, did sudo grub, find /boot/grub/stage1. Not found. I then looked up elsewhere and found that I had to mount the volume /dev/sda7 (/root for my Ubuntu) in some place using mkdir blah. Did all that. Did chroot in blah directory after mounting. Then did sudo grub, find /boot/grub/stage1. Not found. Anyway. My question is this : I've formatted both my Ubuntu 8.04 old installation and the new Fedora Core 9.0 installation. I've installed Fedora Core again, with some wise space allotments for /, /boot and swap. I'm gonna do the same for Ubuntu 8.04 now. Will my Ubuntu GRUB 1.5 recognise Fedora 9.0 after installation???? Or will I run into the "Fedora GRUB doesn't know Ubuntu" problem the other way around this time : "Ubuntu GRUB doesn't know Fedora"?? "Does Ubuntu GRUB detect Fedora"?? Anybody??? :(
I'm not sure if Ubuntu will correctly set up the Fedora entries you need in your menu.lst, but if you use that technique I gave in my previous post using the "configfile" syntax, then it shouldn't be a problem.