LinuxQuestions.org
Help answer threads with 0 replies.
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 03-02-2011, 06:34 AM   #1
Soji Antony
Member
 
Registered: Jul 2010
Posts: 54

Rep: Reputation: 1
Dual boot Ubuntu - Rhel


Hi
I am trying to install a dual boot system. I have installed RHEL 5.4 (sda1) first and then installed Ubuntu 9.10 (sda3). Now only Ubuntu is booting. Before installing Ubuntu the boot flag (* ) was set to first partition. This is my fdisk –l o/p: [ Before installing Ubuntu]
Code:
Device  Boot  Start  End  Blocks   id    System
/dev/sda1      *     1     765  6144831  83     Linux
/dev/sda2   	     766   1020 2048287+ 82     Swap
If I am not wrong os from partition marked as active[*] in MBR will be loaded into memory. But when I install Ubuntu the boot flag is still set to sda1 though Ubuntu is installed in sda3. This is my fdisk –l o/p after installing Ubuntu.
Code:
Device  Boot  Start  End  Blocks   id    System
/dev/sda1     *      1     765  6144831  83    Linux
/dev/sda2   	     766   1020 2048287+ 82    Swap
/dev/sda3            1021  2088 8578710  83    Linux
Q1: Will MBR rewritten each time when we install a new os?
Q2. Why MBR boots sda3 [Ubuntu] even though first partition is marked as active?
Q3. Please tell me what happens to MBR that makes first os unbootable after installing a second os?
Thanks in advance….

Last edited by Soji Antony; 03-02-2011 at 06:56 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-02-2011, 09:24 AM   #2
rizzy
Member
 
Registered: Mar 2004
Distribution: Debian
Posts: 283

Rep: Reputation: 68
Q1: Yes if you answer yes to "write grub to MBR?" question that appears on virtually all linux installers. Answer no and it won't write to MBR. But you'll need to run update-grub after installation to detect new OS if you chose not to write to MBR.
Q2: because Ubuntu wrote to MBR the partition table and where to boot from. grub will use that info to look for sda3 to boot from.
Q3: It got overwritten by ubuntu installer.

Question for you: why you use RHEL? Do you pay for support and updates? if not you are better off using CentOS
 
2 members found this post helpful.
Old 03-02-2011, 10:06 AM   #3
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18 at present.
Posts: 1,192

Rep: Reputation: 204Reputation: 204Reputation: 204
I've just done exactly what you've been doing but with Centos 5. (100% Red Hat Code apparently)

Because I loaded Ubuntu second I've got Grub2 installed which doesn't appear to like Centos. This may be because Centos has arranged itsself in two partitions; /boot and a LVM partition. The latter may be due to the fact Centos is installed on a three disk hardware RAID 5 (HP Smartarray 600, I think)

I managed to fix it last night by running up Ubuntu and editing the Grub 40-Custom file which is read when
Code:
update-grub
is run. In /etc/grub.d I think, check the Ubuntu page mentioned below.

I mounted the Centos /boot "disk" and checked the entry in /boot/grub/grub.cfg (that's the one on the /boot "disk", not the Ubuntu /boot!) . Copied the Centos entry and pasted it into the 40-Custom file which I edited using nano.

You have to modify the entry as Centos uses Grub1 and the entry is a bit different. I googled "grub2 Ubuntu" and came up with a really good Ubuntu howto page. It'll also explain where the files; 40_custom, etc, live.

There's one line I added to the 40_custom file that mentions a floppy and a disk UUID... I used GParted to find the UUID No to allow me to insert this line and change the UUID. Note the pasted in line which is changed from "kernel" to "Linux" has a /dev/sdxn pointer rather han a UUID like the Ubuntu entry... Leave it with the /dev... entry.

I then ran
Code:
update-grub
which found my other OS'; Ubuntu 10.10, Ubuntu 10.10 Server, Fedora 15 and NO Centos This is because you're manually entering it! Rebooted the system and picked Centos from the Grub menu... Tah Dah! All appeared OK.

If you can make any sense of my inane ramblings, I hope you get your system to work!

Play Bonny!

Last edited by Soadyheid; 03-02-2011 at 10:07 AM.
 
1 members found this post helpful.
Old 03-04-2011, 06:47 AM   #4
Soji Antony
Member
 
Registered: Jul 2010
Posts: 54

Original Poster
Rep: Reputation: 1
Hi Rizzy , Soadyheid

Thank you so much for clearing my doubt ...
 
Old 05-15-2012, 07:04 PM   #5
chalcogenide
LQ Newbie
 
Registered: May 2012
Location: New Mexico
Distribution: Ubuntu
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by Soadyheid View Post
I've just done exactly what you've been doing but with Centos 5. (100% Red Hat Code apparently)

Because I loaded Ubuntu second I've got Grub2 installed which doesn't appear to like Centos. This may be because Centos has arranged itsself in two partitions; /boot and a LVM partition. The latter may be due to the fact Centos is installed on a three disk hardware RAID 5 (HP Smartarray 600, I think)

I managed to fix it last night by running up Ubuntu and editing the Grub 40-Custom file which is read when
Code:
update-grub
is run. In /etc/grub.d I think, check the Ubuntu page mentioned below.

I mounted the Centos /boot "disk" and checked the entry in /boot/grub/grub.cfg (that's the one on the /boot "disk", not the Ubuntu /boot!) . Copied the Centos entry and pasted it into the 40-Custom file which I edited using nano.

You have to modify the entry as Centos uses Grub1 and the entry is a bit different. I googled "grub2 Ubuntu" and came up with a really good Ubuntu howto page. It'll also explain where the files; 40_custom, etc, live.

There's one line I added to the 40_custom file that mentions a floppy and a disk UUID... I used GParted to find the UUID No to allow me to insert this line and change the UUID. Note the pasted in line which is changed from "kernel" to "Linux" has a /dev/sdxn pointer rather han a UUID like the Ubuntu entry... Leave it with the /dev... entry.

I then ran
Code:
update-grub
which found my other OS'; Ubuntu 10.10, Ubuntu 10.10 Server, Fedora 15 and NO Centos This is because you're manually entering it! Rebooted the system and picked Centos from the Grub menu... Tah Dah! All appeared OK.

If you can make any sense of my inane ramblings, I hope you get your system to work!

Play Bonny!
Could you post your entry into 40_custom? We are wrestling with a similar problem.

Thanks
 
Old 05-16-2012, 07:52 PM   #6
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18 at present.
Posts: 1,192

Rep: Reputation: 204Reputation: 204Reputation: 204
Wow! This was over a year ago!!!

I'm afraid it's a bit late just now (Nearly 01:00am) so, providing I remember, I'll have to run up my Centos box and have a look. I need to sleep now.

Play Bonny!
 
Old 05-17-2012, 10:38 AM   #7
chalcogenide
LQ Newbie
 
Registered: May 2012
Location: New Mexico
Distribution: Ubuntu
Posts: 2

Rep: Reputation: Disabled
Soadyheid:

I abandoned raiding the Centos installation and everything worked. In fact, grub2 even saw the bootable image on the second drive.

Thanks
 
  


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
How to dual boot RHEL 5.2 and RHEL 5.4 tongar Red Hat 5 03-28-2013 04:20 PM
Dual boot Dual hdds, Download of ubuntu 10.1, no vista or dual boot jim d Linux - Newbie 4 11-25-2010 05:18 PM
Dual boot RHEL 5 and Ubuntu 10.04 LTS thewhiteeye Linux - Software 4 08-28-2010 03:48 PM
Dual Boot RHEL 5 With Ubuntu 8.4 htabesh Linux - Enterprise 1 04-27-2008 02:29 PM
Dual-Boot problem:ubuntu and RHEL aloktherocker Linux - General 1 11-04-2007 11:54 AM


All times are GMT -5. The time now is 07:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration