Help - Search - Members - Calendar
Full Version: Change Grub To Put Mbr On Different Hd
Linuxhelp > Support > Technical Support
I have a 15 GB hard drive with Windows98 on it as the first hard drive in my computer and a 30 GB hard drive with RedHat 9 as my second hard drive. When I installed RH9, I had grub install on the Master Boot Record of the 1st hard drive (the windows drive). If I ever need to pull the first hard drive for any reason, how can I (prior to pulling the drive of course) change Grub to put the Master Boot Record on what is now my second hard drive (the 30 GB with Linux)? This will be necessary since this will then be the only hard drive in my system and Linux would be the sole choice into which to boot. Is this even at all possible?

All you have to do is run fdisk and select a ... the command is:

fdisk /dev/hdx

(substitute the correct device ... hda is primary IDE channel master drive, hdb is primary channel slave, hdc is secondary channnel master, hdd is secondary slave.).

Once you are at the prompt, type p to print the drive partitions (to make sure you have the right drive) ... then select a to toggle the boot partition flag ... and select 1 (for first partition) to write to the MBR of that drive.

Then select w to write and exit fdisk....

You can even do it now .... as long as the Windows drive is primary master ... it will continue to boot from that drive.
A side note is that if you remove the windows drive ... and if you move the other hard drive to Primary channel master drive (may be required for your BIOS to boot from it), you will have to edit your menu.lst file in the /boot/grub directory and setup everything to boot from the proper drive. You would also need to edit the /etc/fstab file for proper mounting....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.