moving a drive

Bryan Walls yellowdog-general@lists.terrasoftsolutions.com
Mon Feb 24 16:29:01 2003


Answering for myself, here's how to do it.

First, as I mentioned in my message below, when you change the drive 
number, you have to figure out the new device name. SCSI device 0 is 
/dev/sda, SCSI device 1 is /dev/sdb, and so on. Your partition number 
will still be the same. So, for me, changing from SCSI drive 0 to 
SCSI drive 2, I needed to change the device in BootX to be /dev/sdc8 
(from /dev/sda8).

On booting, I came up in single user mode, with the drive mounted 
read-only. To change that, I did "mount -o remount,rw /" to remount 
the drive so I could write to it.

Now, edit the file /etc/fstab and change the entries there. For me, 
with a vanilla install, that means changing the root entry to 
/dev/sdc8, and the swap entry to /dev/sdc3.

A reboot should get you back in business.

If you need to change the IP address your machine is set to, what I 
do is to do a grep on the old IP domain. My old address was in the 
128.158 domain, so I did:

cd /etc
grep -s 128.158 *

and then change the entries in any files that hit. For me, it was the 
hosts entry, which needed changing, and resolv.conf, which didn't 
because I am using the DNS servers.

Then I repeated with:
grep -s 128.158 */*

which gave me the gateway that needed changing in /etc/sysconfig/network

and

grep -s 128.158 */*/*

which found /etc/sysconfig/network-scripts/ifcfg-eth0 which has all 
the initial values -- IP address, gateway address, and DNS info. This 
is the one that will make a difference in the reboot.



++++++++++++++++
I have YDL 2.3 all patched up on a drive. It was drive 0. I moved it 
to a new machine, where I had to make it drive 2 (SCSI).

So, I know I now have to call it /dev/sdc8 instead of /dev/sda8 in 
BootX. So I can get to single user mode.

Now I need to go in and fix the swap space description and such, as 
well as the IP address.

How do I mount the single user stuff rw instead of read only? Do I 
just need to modify /etc/fstab for the file system mount point stuff?

-- 
Bryan Walls                             My words are not NASA policy.
Bryan.K.Walls@nasa.gov        	       (256)544-3311voice,544-8752fax