LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 06-15-2008, 05:32 AM   #1
harsh.911
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Rep: Reputation: 0
master boot record????


i have two physical hard disks on my pc.I had windows xp on one and on other i installed fedora 9.My question is that,Is the master boot record present on both my hard disks as these are physically separate....and also if one MBR is there,it belongs to xp or fedora and where is it located????
 
Old 06-15-2008, 05:43 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,094

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
Each (hard) disk has a boot record as the first sector. The boot code may be missing, in which case the next disk in sequence is checked.
The first disk that has bootable code becomes the disk that contains the MBR (for the duration of that boot).
 
Old 06-15-2008, 05:59 AM   #3
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Quote:
harsh.911

My question is that,Is the master boot record present on both my hard disks as these are physically separate.
It all depends on how you installed linux.

When you installed linux did you physically disconnect the win-xp HD? If so then yes each HD with an OS will have a MBR on it. If on the other hand when you installed linux you left the win-xp disk plugged in, and you just pointed the installer to the put the boot loader the first drive, then no, only the win-xp drive will have it. If you can boot to either OS by plugging in the drive by its self then each drive has a MBR.

Quote:
and also if one MBR is there,it belongs to xp or fedora and where is it located????
Again it depends on how you did the linux install which drive has the MBR on it. The MBR its self is located on the first 512kb of the HD, it hold only enough information for booting the system.

Edit: I should add, each HD has space reserved for the MBR, but which is used depends where you told linux to install grubs first stage to.

Last edited by mrrangerman; 06-15-2008 at 06:07 AM. Reason: add info
 
Old 06-15-2008, 06:12 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You might want to read the Wikipedia article about the MBR. It is very thorough.
 
Old 06-15-2008, 06:17 AM   #5
harsh.911
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
thanx guys...particularly mrrangerman....
i did the install keeping the other drive plugged in...so now if i am
disconnecting any one disk i am not able to boot any os...is there any way i can edit the mbrs of both disks so that even if i disconnect one drive i can still boot into the other os??
 
Old 06-15-2008, 06:38 AM   #6
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Quote:
harsh.911

is there any way i can edit the mbrs of both disks so that even if i disconnect one drive i can still boot into the other os??
Yes but let me tell ya, it's a pain after awhile plugging and unplugging drives. If everything is working fine for you, I would leave it as it is. If you still want to change it though it can be done, you would have to restore the MBR of the windows HD. Then install grub's first stage to the linux drive. Like I said though, if it's working for you now "I would just leave it as it is".

If you are still wanting to change it though, make another thread.

Edit: I just noticed you're new to LQ, so Welcome to the forum!

Last edited by mrrangerman; 06-15-2008 at 06:44 AM. Reason: add info
 
Old 06-15-2008, 06:50 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,094

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
There is no need to actually disconnect the drives - just change the BIOS boot disk order works just as well.
 
Old 06-15-2008, 07:46 AM   #8
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
Yes you can have windoze drive mbr to boot just win, and linux drive mbr to just boot linux, if you do so then you can use a third party boot loader to boot the system,
 
Old 06-15-2008, 07:47 AM   #9
harsh.911
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
yes,i m new to this forum as well to linux...


i just had a thought that if,in case, i had done the install the other way..i.e. unplugging win xp drive and installing linux,i could never boot
linux as the mbr of win xp drive would be read first always..is this correct??
 
Old 06-15-2008, 08:08 AM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by harsh.911 View Post
yes,i m new to this forum as well to linux...


i just had a thought that if,in case, i had done the install the other way..i.e. unplugging win xp drive and installing linux,i could never boot
linux as the mbr of win xp drive would be read first always..is this correct??
The drives are read in the order specified by the BIOS. It does not matter HOW the drives were set up initially, and it does not matter what is on the drives. The BIOS simply looks for boot code wherever it can find it.
 
Old 06-15-2008, 08:25 AM   #11
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
As others have stated, you can pick the hard drive boot order from the bios, (If your mb is not to old) if your going back and forth though this too can get to be a pain.

On my main system I am running a tri-boot system, win-xp on a raid0, Debian, on the first of two scsi drives then Gentoo on the second. I have my system boot to the Debian drive which has Grub installed on it, I then have Grub map the windows-xp, and I also boot Gentoo from this drive. If I disconnect the scsi drive manually my system will default to its original state. (windows only)
 
  


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
Master Boot Record hvywght Linux - Newbie 14 04-20-2008 07:30 PM
master boot record help sfr7 Linux - Laptop and Netbook 10 04-25-2004 08:52 AM
Master Boot Record linuxuser05 Linux - General 3 01-11-2004 06:57 PM
master boot record alaios Linux - General 1 04-22-2003 08:41 AM
master boot record dark_light Linux - General 11 07-03-2002 05:21 AM


All times are GMT -5. The time now is 08:42 PM.

Main Menu
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