LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No boot loader entry for Ubuntu 10.04 after installing openSUSE 11.3! (https://www.linuxquestions.org/questions/linux-newbie-8/no-boot-loader-entry-for-ubuntu-10-04-after-installing-opensuse-11-3-a-821491/)

QueenZ 07-22-2010 08:37 AM

No boot loader entry for Ubuntu 10.04 after installing openSUSE 11.3!
 
Hi,
When I installed openSUSE 11.3 I already had Ubuntu 10.04 installed and I installed these 2 OS's side by side but openSUSE didn't seem to add a Ubuntu menu entry in GRUB boot list :( So now I can only boot into openSUSE 11.3 and not Ubuntu 10.04. How can I fix this?

I found in YaST an option to add extra boot menu entries but i don't know how to use it... or maybe there's also another way i can add Ubuntu entry to my GRUB boot menu?

Thanks!

yooy 07-22-2010 09:10 AM

Yes there is a way to add grub entry. If your ubuntu installation is intact you can try adding entry to some file like grub.conf or just hit esc to add entry during boot process

saikee 07-22-2010 09:19 AM

If you know Ubuntu's partition you can edit OpenSuse's /boot/grub/menu.lst to include it as a booting choice.

Say your Ubuntu is in the 1st partition and you have only one hard disk then the partition will be known to Linux as sda1 and to Grub1 as (hd0,0) so the necessary entries are just
Code:

title Ubuntu in sda1 or known to Grub1 as (hd0,0)
root (hd0,0)
kernel /vmlinuz ro root=/dev/sda1
initrd /initrd.img

You can test Ubuntu's partition in Grub1 (Grub1 is used by Open Suse) in the following way

When you see Open Suse booting screen donot boot a system, press "esc" key to change to text mode and then press "c" key to get a Grub1 prompt.

In a Grub1 prompt you can ask Grub1 to find out which partition has /boot/grub/grub.cfg by command
Code:

find /boot grub/grub.cfg
Ubuntu 10.04 uses Grub2 so its configuration is /boot/grub/grub.cfg.

Grub1 should return the partition something like "(hdx,y)" where x=disk No. and y=partition No. Grub1 counts both from 0 so for sda1 x=0 and y=0. In a Grub1 prompt you can fire it up manually to test it by commands
Code:

root (hdx,y)
kernel /vmlinuz ro root=/dev/sda1
initrd /initrd.img
boot

Just make sure you substitute the correct x and y values in the above.

Booting instructions for Grub are same for manually and for using menu.lst except in the former you omit the "title" statement and add "boot" as the last statement.

Ubuntu leaves both kernel vmlinuz and ramdisk file initrd.img in / ready to facilitate easy booting.

----------------------------------------------------------

How to use Grub2 in Ubuntu

Too much to explain here but if you want to use grub2 you need to supply the output in OpenSuse of
Code:

su
fdisk -l

If you do it in Ubuntu replace "su" with "sudo su".
If you can tell us the exact partition reference of both Ubuntu and OpenSuse then we can advice how you can use Grub2 (from Ubuntu) to dual boot OpenSuse.

QueenZ 07-22-2010 10:26 AM

I added that entry to menu.lst but now something gone really bad...

Now when i restarted my computer, and boot loader started up it said "No Operating System found" and some other info... It left me without boot menu where i can choose between os... I'm now writing from my ubuntu usb live stick.. is there anything i can do at this point?

saikee 07-22-2010 10:34 AM

I think if you unplug the USB stick it will go back to normal.

The error is consistent with you upsetting the boot disk order resulting the Bios trying to boot off another disk otherb than the internal disk.

If you make an error in the Grub menu Grub will either boot to a Grub prompt if your menu.lst is unusable or complains about an error if the menu.lst could not be executed.

Did you try to verify the Ubuntu partition? You shoould have booted the Ubuntu manually, verified the ubuntu partition before putting the entry into menu.lst.

QueenZ 07-22-2010 10:36 AM

nope... i didn't have my usb drive plugged in when it happened... Only afterwards i was looking for my live usb stick... must be something else.

Can i make MBR to use the boot loader that is on my ubuntu partition (sda1) instead of that that is on opensuse partition (/sda6 i believe)?

saikee 07-22-2010 10:47 AM

Yes but you need to boot up Ubuntu first. With Grub2 the only way you can put it in the MBR is to execute this command in Ubuntu terminal
Code:

sudo grub-install /dev/sda
You can do this by booting up Ubuntu and use it as a Live CD. The above command needs to be slightly alter to
Code:

sudo su
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
mount --bind /dev  /mnt/sda1/dev
grub-install --root-directory=/mnt/sda1 /dev/sda

In the above I have assumed that your Ubuntu is located in sda1. I then make a mounting point, mount this partition, bind it with the /dev directory of the booted up Live CD and do a grub-install while pointing the Grub2 from your mounted Ubuntu partition.

If you are unsure of the location of your Ubuntu post here the output of "fdisk -l".

You should check the Bios page to make sure the hard disk is your first booting device. Do you have more than one hard disk? Have you satisfied that (hd0,0) or sda1 is your Ubuntu partition?

If you manage to break up Grub it would hang and thus "no operating system found" can only occur if you boot to a different media other than the original hard disk.

QueenZ 07-22-2010 10:57 AM

Quote:

Yes but you need to boot up Ubuntu first.
Which one? The one that is installed on my hard drive and i don't have access to or the one that is on my usb stick (live cd)?

I can't boot into the one that is on my hard drive but i am running from a live cd. will this do?

I have only 1 hard drive, sdb is my usb drive.

Ubuntu is installed on sda1. on the rest of the partitions is openSUSE 11.3

Quote:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x40c132b1

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4670 37511743+ 83 Linux
/dev/sda2 4671 7296 21092352 f W95 Ext'd (LBA)
/dev/sda5 4671 4933 2103296 82 Linux swap / Solaris
/dev/sda6 4933 5928 7991296 83 Linux
/dev/sda7 5928 7296 10994688 83 Linux

Disk /dev/sdb: 2001 MB, 2001731584 bytes
16 heads, 32 sectors/track, 7636 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 16 7636 1950784 e W95 FAT16 (LBA)

saikee 07-22-2010 11:14 AM

I gave you two alternative.

The first one is for booting up Ubuntu in the hard disk as your root directory will be available and need not be declared when doing a grub-install.

The second one with 5 commands in Post #5 is for any booted up Linux. Running Ubuntu from a USB stick as a Live CD is for this alternative.

-----------------------------------------
You can ignore the following if you cannot understand it. It is a suggestion of using the USB stick to boot up sda1.

If my guess is right you will have Grub2 inside the USB stick so when you boot it up you can press "c" to get a Grub2 prompt to boot up Ubuntu in the hard disk. You will likely be using sdb as the 1st disk (hd0) in order for it to have been booted and so sda would be 2nd disk (hd1). Thus the manual instructions of booting the hard disk Ubuntu in sda1 by the Grub2 (obtained from sdb1) should be
Code:

set root=(hd1,1)
configfile /boot/grub/grub.cfg
boot


QueenZ 07-22-2010 11:25 AM

Thank you so much saikee, it worked and I'm back in my Ubuntu :) I used the 5 commands to do it.

QueenZ 07-22-2010 11:33 AM

btw, do you know if fedora 13 uses Grub1 or Grub2? So i don't encounter the same problem again..

saikee 07-22-2010 12:32 PM

Fedora 13 is still with Grub1.

I have it installed in a gpt 2TB hard diosk and Grub1 cannot boot itself beyond 1.3TB approximate. Thus I have to use Grub2 to fire it up.

You can use Grub2 to fire up Grub1. Both Grub can boot each other by chainloading.

The easiest is to boot up OpenSuse in sda6 and put Grub1 in the root partition of sda6 by these commands in a terminal
Code:

su
grub
root (hd0,5)
setup (hd0,5)
quit

Grub1 counts partitions from 0 but Grub2 does them from 1.

You then boot to Ubuntu and amend its /boot/grub/grub.cfg with addition of these entries
Code:

menuentry 'OpenSuse in sda6 known to Grub2 as (hd0,6)' {
set root=(hd0,6)
chainloader +1

You can do the same thing to Fedora by telling its installer that you want its Grub installed in the root partition (not MBR) and then add entries to Ubuntu Grub.cfg.

rsrini 08-11-2010 10:20 AM

I have ubuntu 10.4 with grub2. Installed suse 11.3 with grub1. But suse not able to find ubuntu. I have a separate boot partition /dev/sda2 which has ubuntu image files. Ubuntu / is /dev/sda5. Suse / is /dev/sda7 and inside sda7 grub1 is there. If i install grub2 from ubuntu live cd the suse booting with lot of error messages and not giving prompt. telling "error in service module". What should i do.

saikee 08-11-2010 11:56 AM

rsrini,

You will have perfect boot if

in Suse you set up Grub in sda7 by root terminal command
Code:

su
grub
root (hd0,6)
setup (hd0,6)
quit

You then boot up Ubuntu and add these lines to its /boot/grub/grub/cfg
Code:

menuentry 'OpenSuse in sda7 booted by Grub2'{
set root=(hd0,7)
chainloader +1
}

In the above you place Grub1 in the root partition of sda7. Ubuntu can then boot Grub1. Grub1 fires up OpenSuse.

This is both water tight and bomb proof.

rsrini 08-12-2010 01:34 AM

I did not reinstall grub1 in suse as you suggested. I assumed it was fine. I did added the chainload +1 in grub2 menu by pressing 'e'. It worked well. Booted suse 11.3 through grub1 menu. At least i fixed the issue. Previously i was doubting video problem or some other driver issue with suse 11.3.

But i don't want two chain loading. Single grub menu should boot all the oss (three or many - xp, ubuntu, suse, fedora). I had one more pc which has grub1 which boots xp, fedora 11, mandriva 2009, suse 11.1 and ubuntu 9.04 from single grub menu.

Now because of grub2 in ubuntu i have this problem. If i give the suse 11.3 image path it is loading but with errors. That i am not able to understand. Is it possible to upgrade the grub1 in suse 11.3 to grub2. Then from the grub2 in ubuntu 10.04 i can able to boot all os i guess. Currently grub2 in ubuntu able to boot fedora and xp. Only suse has problem.


All times are GMT -5. The time now is 02:38 AM.