On Tue, 3 Sep 1996, Tim Egbert wrote: > On our Debian system, we have two hard drives. The primary drive has the > root directory and swap partition and is bootable. It also contains the > various Debian software packages, programs, libraries, etc. The second > drive just has the /home directory tree. > > Our problem is that the primary drive is starting to make some "expensive > sounding noises" and may not last much longer. We would like simply to > migrate the entire system to the second hard drive and disconnect the > first drive. Is there an easy way to do this without reinstalling the > entire system and fixing up all the configuration files?
I've used dd() to essentially do the same thing, but only in cases where the system partitions I've copied have been of the same size. I'll describe the situation I've used: /dev/hd*1 is a 32-meg swap partition /dev/hd*2 is a 815-meg ext2 partition /dev/hd*3 is a 70?-meg partition for NT (currently unused) With the active partition being /dev/hda, I'll attach the target drive as /dev/hdc, bring the system up, and execute 'dd if=/dev/hda2 of=/dev/hdc2' to do the copy. Because the source partition is active when the duplication is done, you'll need to "fisk" the target partition, a la 'e2fsck /dev/hdc2' afterward. I've shut the machine down, put /dev/hdc back into its own machine as /dev/hda, bring it back up, and modify /etc/hostname, /etc/init.d/network, and a number of other files to give the target machine its own identity. (Presumably, you won't have to change any files in this manner.) I don't know what would happen if the source and target partitions aren't of the same size. Some pretty nasty things are probably possible, but all of my partitions were identical. David [EMAIL PROTECTED] Office: 3503 WeH, x86720 MTFBWY