Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Change Grub To Put Mbr On Different Hd, Master Boot Record on wrong hard disk
post Aug 8 2003, 02:44 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 9
Joined: 7-August 03
Member No.: 1,222

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?

Go to the top of the page
+Quote Post
post Aug 8 2003, 06:22 PM
Post #2

Its GNU/

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151

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....

Johnny Hughes
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 21st May 2018 - 03:31 PM