Linux - NewbieThis 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!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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.
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:
# 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).
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.
First check to see if your bios will allow you to set the slave to boot, it should.
Any easy way to do this?
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.
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.
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.
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.
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.
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.
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.
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.