LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 09-09-2007, 12:19 AM   #1
wingsrule
LQ Newbie
 
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8

Rep: Reputation: 0
Dual Boot without overwriting the MBR


Hey everyone,

Appreciate all the help in advance.

Here's my deal. I have 2 hard drives.
- Master: Windows 2000 (1 partition, NTFS)
- Slave: Fedora 7 (2 partitions, boot & the rest)

After I installed Fedora and foolishly allowed it to put Grub into the MBR on the Master drive, Windows gave me BSODs on every startup. I used Recovery to restore the original NTLDR into the MBR. Now Windows works fine, Linux obviously does not.

I want to have a functional dual-boot however: I want to mess with my Master drive and its NTFS partition as little as possible. I don't want to install Grub into the MBR again, nor do I want to use something like Partition Magic to carve out a boot partition for Grub and then have NTLDR in the MBR load Grub on master which would then in turn load the Linux from slave.

Ideally, I want to have Grub on a bootable partition of my slave drive that can either load Linux or Windows off of the master drive.

Is that doable? If so, how? If not, is there a better way to accomplish what I want?

If worst comes to worst, I could mess with my Windows drive but, since for the next few months Windows will continue to remain my primary OS, I am really risk-averse.

Thanks,
wingsrule
 
Old 09-09-2007, 12:31 AM   #2
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
why don't you want the grub in the mbr?, if you have grub set up right it will boot windows just fine
 
Old 09-09-2007, 12:38 AM   #3
wingsrule
LQ Newbie
 
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AceofSpades19 View Post
why don't you want the grub in the mbr?, if you have grub set up right it will boot windows just fine
Two reasons, one less valid than the other:

1. Protect Windows from Linux: I would need some detailed instructions on how to configure Grub correctly so that Windows doesn't give me BSODs. I tried to do it on my own, with the help of Google, and it didn't work.

2. Protect Linux from Windows: Whenever you install a Service Pack or sometimes even less major updates to Windows, it has an occasional habit to overwrite the MBR and put what was there originally. Now, yeah, I know MS won't release any more win2k service packs, but still, I don't want to have my Grub under threat, so to speak.

Of course, if you (or someone else) could help me with #1 and assuage my fears regarding #2, this solution would work.

Thx,
wingsrule
 
Old 09-09-2007, 12:49 AM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You could just install grub to the MBR of the slave drive and reset the bios to boot the slave drive instead of the master first. There are various ways to install grub in the MBR of the slave drive. First check to see if your bios will allow you to set the slave to boot, it should.
With the master drive still set to boot first, boot up the Fedora DVD or first CD, at the installation splash, get yourself to a boot prompt by selecting the appropriate selection (not sure which, even though I'm half way through a fresh Fedora 7 installation at the present). When you get a prompt type: linux rescue ... and press Enter. The installer will ask you a few questions like the language you would like to use, the type of keyboard etc. Then, if you have linux previously installed on your machine, the Fedora installer will automatically detect it and mount it in the /mnt/sysimage directory. Once the linux partition is mounted, you are dropped into the command shell prompt. The next step is to make your newly mounted directory the root (or parent) directory. This you do by running the chroot command as follows:
Code:
# chroot /mnt/sysimage
# _
Now you are in the shell with respect to the parent directory which is the linux partition on your hard drive. If you have PATA disks (/dev/hda and /dev/hdb) you would now issue command: # grub-install /dev/hdb, for SCSI disks: grub-install /dev/sdb, then type: exit to reboot and change the order of the boot device in the bios to boot the slave drive first (after the floppy and optical drive, which are usually set to be seen before hard drives).
 
Old 09-09-2007, 12:55 AM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You can also do it the normal way and install it to the master drive and back up your grub MBR where it can easily be replaced if Windows does overwrite it, someone said that when they put Windows in hibernate it overwrote grub in the MBR.
How about you find a way to post these "BSOD" errors, not sure what your talking about here.
 
Old 09-09-2007, 01:05 AM   #6
wingsrule
LQ Newbie
 
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Junior Hacker View Post
First check to see if your bios will allow you to set the slave to boot, it should.
Any easy way to do this?

Quote:
Originally Posted by Junior Hacker View Post
If you have PATA disks (/dev/hda and /dev/hdb) you would now issue command: # grub-install /dev/hdb, for SCSI disks: grub-install /dev/sdb
Hm, I recall my drives being sd* but I'm dead sure they're EIDE (which would make them PATA, right?) Is it not normal for Linux to be seeing them as SCSI?

One of the partitions on the slave drive right now is the 107mb one with the "/boot" flag. Does grub-install put Grub in there?

Sorry for the questions. I just had some bad luck following instructions blindly today, so I am trying to understand more about what it is I am actually doing to my poor PC.

Thx,
wingsrule

P.S. As for the BSOD, they are the Inaccessible Boot Device ones. Happened every time I tried to start Windows after installing Linux and letting it put Grub in the master drive MBR. Errors gone and Windows works fine now after the Recovery Console's "fdisk /mbr" command.
 
Old 09-09-2007, 01:25 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Google for "grub nt boot". There are several webpages on using the ndldr for booting. This entails 1) using the root partition or the second disk for the MBR. 2) Saving the grub boot strap loader (MBR) to a file on the windows disk 3) editing the C:\BOOT.INI file to contain an entry containing the grub MBR so that it chainloads grub. This process only edits the hidden system text file (BOOT.INI) and does nothing to the mbr of the main drive. If you have two drives and the second contains Linux, many computers have a key you can press to select the boot device. That would be another way, of doing it if the mbr were on the mbr of the second disk.

This has also been covered many times on this site so you can use the search function here as well.
 
Old 09-09-2007, 01:32 AM   #8
wingsrule
LQ Newbie
 
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8

Original Poster
Rep: Reputation: 0
Junior Hacker,

I followed your instructions without waiting for your answers (why not, worst that can happen is my brand-new Linux installation gets messed up, oh well).

After switching to boot from my slave drive, I get to Grub and here's what happens:

Windows 2000: It says it will load Windows in 4...3...2...1...0, and then just restarts the cycle.

Fedora: It spits out the part of the menu.lst file that deals with Fedora with errors:

Code:
root (hd1,0)
 Filesystem type unknown, partition type 0x44
kernel /vmlinuz-... ro root=/dev/VolGroup00/LogVol00 rhgb quiet

Error 17: Cannot find selected partition
I have no clue as to why Windows isn't loading, but the output for Linux has me wondering what "VolGroup00/LogVol00" is. Shouldn't it be something like sdb?
 
Old 09-09-2007, 01:35 AM   #9
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
I have had good luck with first LILO and now GRUB. They are both excellent boot managers. Configuring and using GRUB would be my first choice.

You can consider trying to boot Linux from Windows.

Create a Windows 2000 boot floppy as a backup.
 
Old 09-09-2007, 01:42 AM   #10
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Any easy way to do this?
Depends on what make and model of computer. Usually when you first boot up you may see something that says to press Fx or Del. key to enter setup, once in setup (bios) you would go to the boot section to see the current boot priorities and change if you want. Some computers, like HP Pavillions usually have the bios set to "quiet boot or quiet splash" where all you see is the HP splash and no messages during the first part of the boot process, you have to enter the setup (bios) before the POST (Power On Self Test) which is the first part of the boot process that is sometimes hidded by the quiet splash or quiet boot.
When you are in a terminal, perhaps in the steps provided above, you can type: fdisk -l when in a terminal to see what drives are installed and partitions they contain. Here you would also find what they are called. It may be best to try and reinstall it to the master drive first and leave bios settings alone as you already know how it only takes two minutes to restore Windows boot loader in the MBR. It might work properly this time, if not, you can try putting it in the MBR of the slave and make the changes in the bios or go with jschiwal's suggestion, which has been known to be a little more complicated, but works also. You would then be using the Windows boot loader rather than Grub.
 
Old 09-09-2007, 01:56 AM   #11
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
According to the code you posted, if you were set to boot the slave drive, grub is looking for Fedora's boot code in the Windows boot sector (hd1,0), Error 17 means the partition exist but the file system is not recognized, likely because it's looking in the Windows partition boot sector for Fedora's kernel. Maybe the bios should have been set to boot the slave first before going through the motions so the Fedora /boot partition would be (hd0,0), which is what it would be once it's drive is set to boot first. Hd1,0 is what it was before the switch. Remember to type: fdisk -l before setting up grub to see the order of the drives by device name, grub starts counting from 0, the first drive for grub is hd0 and the first partition is 0. You would then be installing grub to the first drive, example: grub-install /dev/hda or /dev/sda

Last edited by Junior Hacker; 09-09-2007 at 02:07 AM.
 
Old 09-09-2007, 02:03 AM   #12
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
And of course, it was also probably also looking for Win 2000 boot code in Fedora's partition boot sector.
 
Old 09-09-2007, 02:20 AM   #13
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You may also have to make changes to Fedora's /boot/grub/menu.lst file entry for Windows if Windows won't boot. Not sure if it will need to be mapped if it's still the master drive but the slave is set to boot first. If you get Fedora to boot when the slave drive is set to boot first, but Windows won't boot, post the contents of this file and we can tell you how to edit it to map Windows to make it think it's in the first drive.
 
Old 09-09-2007, 02:24 AM   #14
wingsrule
LQ Newbie
 
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks so much for your help.

It's about 3.30AM here on the East Coast right now, and I'm becoming less and less able to process new information.

I'll get a few hours of sleep and try what you suggest first thing in the morning and let you know if it worked -- it does seem that the problem lies in the fact that the driver order changed after anaconda generated menu.lst. I'll run the fdisk and I can probably manually edit the menu.lst file, since vi works in rescue mode.

Again, thanks for basically being my tech support -- I'll let you know if it worked tomorrow.
 
Old 09-09-2007, 03:03 AM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you have a boot disk which uses grub, you can enter the interactive mode and use autocompletion to locate the kernel and initrd files and enter one line for each and then enter "boot" to boot up into Linux. From there you can correct any changes needed in your menu.lst file.
 
  


Reply

Tags
solution



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
Attempted Dual Boot of XP and Fedora. Now MBR will boot straight to Linux.How to fix? mdorries Fedora 7 05-27-2007 06:22 AM
How to dual boot without using MBR royeo Linux - Newbie 4 09-11-2006 07:22 PM
Ubuntu not overwriting MBR on my SATA drive, still getting LILO Timestampmismatch portwolf Ubuntu 2 07-27-2006 12:50 PM
How to reinstall Windows without overwriting the MBR? zero79 Linux - General 3 08-05-2004 06:33 PM
Windows Overwriting MBR Need help.. Nukem Linux - General 2 04-07-2004 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:51 AM.

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
Open Source Consulting | Domain Registration