problem with grub

Asked by J A G A N

I had dual os suse 10.1 & ubuntu 8.04 in my laptop. i completely formated suse partition from ubuntu patition manager.But the default seems to be suse in grub line. next i tried to install windows xp professional in seperate partition but i had problems with that so i quit that installation.Now the problem is UBUNTU OS IS NOT SHOWING UP IN GRUB LINE WHILE LOADING. it goes to default suse,but i formated suse partition so it says unable to detect hard disk.
so how to boot ubuntu? how to bring that in grub line?
note: i had not modified ubuntu partition or file system
help pleeease..............

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Whiteboard:
This is an Ubuntu question, not a Launchpad question.
Revision history for this message
quantenemitter (quantenemitter) said :
#1

You can boot ubuntu without problems, it's just a little complicated.

The idea is to use the command line (!) in grub. For that, press "c" while the grub-menu shows up. Now we tell grub from wich partition it should boot. Of course, we need the ubuntu-partition here.

===========
(1) The grub way
===========

Assuming ubuntu is on your fist harddisk on the third partition, you need to enter
> root (hd0,2)
Without the ">". The first number ist (harddisk-1), the second (partition-1).
Now, we need to tell grub wich kernel to boot. If you don't know wich one, I'll tell you later what to do.
> kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda3 ro quiet splash
> initrd /boot/initrd.img-2.6.27-7-generic
Here, you have to correct the kernel version and enter the correct partition of your ubuntu-system again, this time in linux-style (/dev/...).
Now, Tell grub to fire your ubuntu up:
> boot
that's it! Now your system runs. Let's correct grub. Edit /boot/grub/menu.lst in that way, that the lines you entered above appear in it. Then, enter
> grub-install --recheck --no-floppy /dev/sda
Now, your problem should have vanished.

If you don't know what kernel and/or initrd you are using, You're not lost. First, get access to your ubuntu-files. Do this by using a live CD or acessing them with windows (http://www.fs-driver.org/ , http://www.linuxjournal.com/article/9449). Now, go into /boot/grub/menu.lst and look up the correct values for the lines above.

If there is no ubuntu-entry in menu.lst, look up your kernel by reading the contents of the /boot - directory.

===========
(2) The live-cd way
===========

Boot a linux live-cd and mount your ubuntu partition to /mnt:
> mount /dev/sda3 /mnt
while subtituting "sda4" with the correct partition. Then, fire up an editor and correct /mnt/boot/grub/menu.lst by removing the suse-lines and entering the ubuntu lines like above. After that, enter
> grub-install --recheck --no-floppy --root-directory=/dev/sda3 /dev/sda
Don't forget to exchange "sda3" and "sda" with the correct values.

If you get problems here, look at my comments at the end of (1).

Have fun.

Can you help with this problem?

Provide an answer of your own, or ask J A G A N for more information if necessary.

To post a message you must log in.