LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 07-22-2010, 09:37 AM   #1
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Rep: Reputation: 32
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!
 
Old 07-22-2010, 10:10 AM   #2
yooy
Senior Member
 
Registered: Dec 2009
Posts: 1,219

Rep: Reputation: 139Reputation: 139
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
 
1 members found this post helpful.
Old 07-22-2010, 10:19 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 07-22-2010 at 10:27 AM.
 
1 members found this post helpful.
Old 07-22-2010, 11:26 AM   #4
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
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?
 
Old 07-22-2010, 11:34 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 07-22-2010 at 11:38 AM.
 
1 members found this post helpful.
Old 07-22-2010, 11:36 AM   #6
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
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)?
 
Old 07-22-2010, 11:47 AM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 07-22-2010 at 11:58 AM.
 
1 members found this post helpful.
Old 07-22-2010, 11:57 AM   #8
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
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)

Last edited by QueenZ; 07-22-2010 at 11:59 AM.
 
Old 07-22-2010, 12:14 PM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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

Last edited by saikee; 07-22-2010 at 12:16 PM.
 
1 members found this post helpful.
Old 07-22-2010, 12:25 PM   #10
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
Thank you so much saikee, it worked and I'm back in my Ubuntu I used the 5 commands to do it.
 
Old 07-22-2010, 12:33 PM   #11
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
btw, do you know if fedora 13 uses Grub1 or Grub2? So i don't encounter the same problem again..
 
Old 07-22-2010, 01:32 PM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 07-22-2010 at 01:34 PM.
 
Old 08-11-2010, 11:20 AM   #13
rsrini
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0
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.
 
Old 08-11-2010, 12:56 PM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 08-11-2010 at 12:57 PM.
 
Old 08-12-2010, 02:34 AM   #15
rsrini
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] adding Ubuntu boot entry into openSUSE GRUB menu subuntu Suse/Novell 11 01-28-2010 10:00 PM
I want to remove ubuntu boot loader and use windows boot loader RUshabh55 Linux - Newbie 9 11-29-2009 08:01 PM
Installing Ubuntu boot loader ahmed_as8 Linux - Newbie 9 03-29-2009 08:37 AM
entry of red hat boot loader in mandrake b0nd Linux - Newbie 3 02-01-2005 07:06 AM


All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration