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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
09-09-2007, 01:19 AM
|
#1
|
LQ Newbie
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8
Rep:
|
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
|
|
|
09-09-2007, 01:31 AM
|
#2
|
Senior Member
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079
Rep:
|
why don't you want the grub in the mbr?, if you have grub set up right it will boot windows just fine
|
|
|
09-09-2007, 01:38 AM
|
#3
|
LQ Newbie
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8
Original Poster
Rep:
|
Quote:
Originally Posted by AceofSpades19
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
|
|
|
09-09-2007, 01:49 AM
|
#4
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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).
|
|
|
09-09-2007, 01:55 AM
|
#5
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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.
|
|
|
09-09-2007, 02:05 AM
|
#6
|
LQ Newbie
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8
Original Poster
Rep:
|
Quote:
Originally Posted by Junior Hacker
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
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.
|
|
|
09-09-2007, 02:25 AM
|
#7
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
09-09-2007, 02:32 AM
|
#8
|
LQ Newbie
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8
Original Poster
Rep:
|
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?
|
|
|
09-09-2007, 02:35 AM
|
#9
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
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.
|
|
|
09-09-2007, 02:42 AM
|
#10
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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.
|
|
|
09-09-2007, 02:56 AM
|
#11
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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 03:07 AM.
|
|
|
09-09-2007, 03:03 AM
|
#12
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
And of course, it was also probably also looking for Win 2000 boot code in Fedora's partition boot sector.
|
|
|
09-09-2007, 03:20 AM
|
#13
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
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.
|
|
|
09-09-2007, 03:24 AM
|
#14
|
LQ Newbie
Registered: Sep 2007
Distribution: Fedora 7
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
09-09-2007, 04:03 AM
|
#15
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
All times are GMT -5. The time now is 11:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|