Both Linux and Windows are most easily installed and set up on a Master Drive.
I did these separately, and now I wanted to move the Linux to the 'Slave' spot.
I wanted both drives hooked up physically, so I could switch OSs without physically messing around.
I did not want to use GRUB to boot WINDOWS, because I have found that GRUB can and does
trash Windows 2000 drives, especially the MBR (master boot record), and the time and effort
trying to repair or reinstall Windows just isn't worth it. I now only want to let Linux access DATA partitions.
The solution is simple: Use the BIOS to select which drive to boot up.
Okay I am still not sure how safe these modifications are, but I will tell you what I have found:
To move the Linux Drive from Master (HD0) to Slave (HD1) involves the following steps:
1) Edit the /mnt/gentoo/boot/grub/GRUB file in the BOOT partition.
(my BOOT partition was mounted as /mnt/gentoo/boot following the handbook)
Change the parameters passed to the kernel to reflect the new locations (a becomes b).
2) Edit the /etc/fstab file in your ROOT partition.
Change all the 'a' partitions to 'b' partitions (and vice versa, if you are swapping Slave to Master).
3) Log off and shut down completely (power off) and change the Master jumper to Slave on the Linux Drive.
(If Swapping another drive from Slave to Master make sure you change it too.)
4) Boot into your ROM BIOS and set it up so that you boot off the SLAVE first, CD ROM or Master 2nd.
Save your BIOS settings and complete the Boot into Linux, and test to see that partitions etc are mounted.
All this has to be done in one complete step, so make sure you check that everything is already correct.
Don't experiment, or you won't be able to REBOOT into a working system, and you may have to re-install.
Make backup copies of your original GRUB as GRUB.OLD and FSTAB as FSTAB.OLD,
in case something goes wrong and you have to reboot off the LiveCD and change things back.
Then you can just copy (overwrite) the files again to restore them with the CP command.
Remember to restore jumpers and ROM BIOS settings if you switch back again to recover.
(1) First I had to modify my GRUB file. Here's the new one:
Code: Select all
# GRUB.CONF -for gentoo stage 1
#
# default 0 default menu item
# timeout 30 default time to make selection countdown
default 0
timeout 10
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.11-r6
#Partition where the kernel image (OS) is
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r6 root=/dev/hdb4
I have not altered the 'hd0' part, because apparently, you don't need to.
When you switch your jumpers and make the drive into a Slave (=hd1), it still thinks it is hd0 when booting.
When I altered this, I in fact got errors, at least in one experiment, so I put it back.
(b) Now look at line 11: kernel /kernel-2.6.11-gentoo-r6 root=/dev/hdb4
Here however, since this is a parameter that is used later by the kernel to find the /ROOT partition,
It has to be changed to reflect the real hardware situation, which is that the partition has moved along with the drive.
That is, the partition was on Master(=hd0=hda4) but is now on Slave(=hd1=hdb4)
Your /ROOT partition might be hda3, in which case you would change the 'a' to a 'b' making it hdb3.
(2) Next, I had to change the /etc/fstab file, which tells the OS where and what the other partitions are.
My /ETC/FSTAB file looks like this now:
Code: Select all
# <fs> --------------<mountpoint> ------<type>---------<opts> --------------<dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hdb1 /mnt/gentoo/boot ext2 noatime 1 2
/dev/hdb2 none swap sw 0 0
#========================================================== BEGIN Extended Partition ===
#------------ Windows extended partition: not directly used -holds hda4 & hda5 ---------
#/dev/hdb3 /mnt/idedisk2 auto noatime 0 1
#------------ Linux current install root partition ------------------------------------
/dev/hdb4 / reiserfs noatime,notail 0 1
#------------ Linux partition from previous install with data files --------------------
/dev/hdb5 /mnt/idedisk1 ext3 noatime 0 1
#------------------------------------------------------------ END Extended Partition ===
#=========================================================== BEGIN Win2K BOOT DRIVE ====
#...........Assume Linux Drive has been switched to hdb (HD1) so Win2K is hda (HD0).....
#/dev/hda2 /mnt/secure1 auto noatime 0 1
#/dev/hda3 /mnt/secure2 auto noatime 0 1
#-------------------------------------------------------------------- END Win2K --------
Although I haven't activated the lines, (they're still commented out) I can mount the Win2K drive partitions too.
They are on the new Master (Win2K) Hard drive, as hda2, hda3, etc. ( I don't want Linux to touch hda1.)
(b) I was previously able to access the data partitions on the Windows drive as hdb2, hdb3 etc. (as Slave=hd1).
In summary, making sure the info for each partition is correct, you simply swap b for a and vice versa.
I did this by installing and testing everything with Linux as the Master (HD0) first.
Let me know if this works for you. If anyone sees any errors or has suggestions please post them here! Thanks!
GRUB boot Repair
Easy Firewall with IPtables
Hardware Fixes
CUPS Printer Install

