Click to See Complete Forum and Search --> : From master (hda) to slave (hdb)
blackbelt_jones
04-12-2007, 03:20 PM
Okay, I've been screwing around with my system again, and I've changed one of my harddrives (let's call it "hard drive X" from a master to a slave by switching the jumper, and installing a new XP and SUSE system on a new hard drive, "hard drive Y" which in now hda.
Right now, this means that the SUSE system that is installed on hard drive X has delusions of grandeur, since it thinks it is the master, but the overall system knows better. Right now, with the SUSE system on hard drive X (hda3) booted an running, I can mount hard drive X (hdb2), I can read from it, and I can write to it with superuser access, but I can't boot it.
I added the SUSE system on harddrive X to the boot menu, but I believe that in order to actually boot the SUSE system on Hard Drive X, I need to learn how to edit the etc/fstab file. I've never done that before, but it seems like it'll be a lot easier than say, spiltting the atom, or eating one pistachio. WIll editing fstab do the trick, or is there anything else involved?
IsaacKuo
04-12-2007, 04:07 PM
It's easy. Just edit Drive X's etc/fstab file, replacing any references to "/dev/hda" to "/dev/hdb". For example, change /dev/hda2 into /dev/hda3.
You seem to have already figured out the other half of the equation, adding drive X's OS to the boot menu.
If I recall correctly, no other changes should be necessary. However, depending on how you've mounted partitions, the mount points might look a bit confusing.
For example, my habit is to create data partitions, and to name them according to their device. Thus, I could have /dev/hda5 mounted to /mydata/hda5. In order to make sure all symbolic links still work, if I moved the drive to device B, then I'd leave the mount point alone. Thus, I'd have /dev/hdb5 mounted to /mydata/hda5. A symbolic link to /mydata/hda5/mypics/ would still work, even though the device is now hdb5.
blackbelt_jones
04-12-2007, 04:48 PM
It's easy. Just edit Drive X's etc/fstab file, replacing any references to "/dev/hda" to "/dev/hdb". For example, change /dev/hda2 into /dev/hda3.
You seem to have already figured out the other half of the equation, adding drive X's OS to the boot menu.
If I recall correctly, no other changes should be necessary. However, depending on how you've mounted partitions, the mount points might look a bit confusing.
For example, my habit is to create data partitions, and to name them according to their device. Thus, I could have /dev/hda5 mounted to /mydata/hda5. In order to make sure all symbolic links still work, if I moved the drive to device B, then I'd leave the mount point alone. Thus, I'd have /dev/hdb5 mounted to /mydata/hda5. A symbolic link to /mydata/hda5/mypics/ would still work, even though the device is now hdb5.
Fortunately for me, I'm an idiot. :)
Since I usually have 3-4 different OSs installed on two hard drives (or in this case, the same OS installed twice, and since I like to be able shuffle data from one to ther, around, I try to keep the partitioning as simple as possible, which means one partition for each operating system, with / as the mountpoint... and I must confess that I have yet to get my mind around symbolic links.
saikee
04-12-2007, 06:52 PM
If it helps I can confirm moving a Linux is easy from partition to partition or hard disk to hard disk.
Only two things need to be done, (1) the booting menu.lst and (2) the /etc/fstab of the moved Suse.
I start with (2) first as it is easier.
The partition reference has been changed so all the hda should be changed to hdb. In fact as you should be using the same swap and the only alteration is the "/". According to your description you will need to change /dev/hda2 to /dev/hdb2 for the mounting point of "/". This alteration allows at boot time the source of Suse is obtained from hdb2 which is now the correct partition reference.
You will have a difficulty to tell which Suse you are booting to and so I recommend booting the version in hdb2 "indirectly" as it is easier.
Since you can mount this partition you can edit the /boot/grub/menu.lst in hdb2 by changing
(a) root statement should point to (hd1,1) because hdb is (hd1) and so hdb2 should be now (hd1,1). Your current old root should be (hd0,1).
(b) In the kernel statement there is a "root=" parameter. The corect entry is similar to the /etc/fstab and that should now be "root=/dev/hdb2".
After you save the menu.lst of hdb2 you can activate Grub and restore hdb2's Grub in the root partition by commands (executable in any booted up Linux with Grub inside)
Sudo Grub
root (hd1,1)
setup (hd1,1)
quit
Your Suse in hdb2 is now chainloadable and can be booted if you add these lines in your currently booted up Linux's /boot/grub/menu.lst
title My Suse in hdb2
root (hd1,1)
chainloader +1
If you want to tell the difference between the two systems try to put a "#" in front of the fgxmenu statement in one of the two menu.lst. That would disable the graphic on the boot up screen of the one you put the "#" in without changing anything in Suse.