> Is there a simple way to migrate a Debian system to another hard drive? > > 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?
My suggestion, since you already have the 2 drives on the machine, is to use "cp -a -x" to copy all of / over to the other drive. Of course, the second drive will be mounted somewhere, like /mnt. I believe that the -x option will make cp ignore the second hard drive, and just copy the root partition over. The -a will make it handle all the symlinks and special files properly. I've done similar things with cp -a -x, and it always worked fine. Of course, once you get it copies over, you'll need to make sure that lilo is installed on the MBR (or whatever) of the second drive so you can boot from it. -- #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj # RSA-3-lines-perl $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 # Joey Hess lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) # [EMAIL PROTECTED] "true - do nothing, successfully" - - true (1)