[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving to different HDD



-----BEGIN PGP SIGNED MESSAGE-----

On Mon, 15 Mar 1999, Fraser Campbell wrote:

> I have installed a Debian system on a 1.2 GB hard drive.  I now want to move
> it to a much smaller drive (200 MB).  Is there some way to do this other than
> reinstalling ... dd perhaps?

Once you've formatted the new drive and created a filesystem on it, mount
it to some directory ('mount -t ext2 /dev/hdb /mnt').  Then you could
actually use the following command:
Try 'cp -ax / /mnt'

See the manpage for cp for info on the -a flag.  I used -x in this case to
tell cp to not copy stuff on other filesystems.  In this case, it's
important to keep cp from copying the contents of /mnt back over itself.

Of course, this is by no means the cleanest way of doing things...But it's
relatively quick and painless.  There are other ways to do this involving
tar or cpio that work just as well.  I moved my Debian installation from a
single partition on a 1.2 gig drive to 6 different partitions on a 6.4 gig
drive without any trouble using cp -a.  That was over a year ago, and
things have worked flawlessly ever since.

noah

  PGP public key available at
  http://lynx.dac.neu.edu/home/httpd/n/nmeyerha/mail.html
  or by 'finger -l frodo@ccs.neu.edu'

  This message was composed in a 100% Microsoft free environment.


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNu3B0odCcpBjGWoFAQHnFgP/amti5OD6DHnUPWXDTD2VKIkbNxMOOEvW
ViN7YdnSN23ltnAV52SsEcTOayGYQ+8QN4KZIeFjLbbxU2wS9pykZL7hIEl0xM4m
MW9c7LM0hKox+8x+/LfPomQSdKX4tai5z5fwHyQHHdDnfe6+vKFArGMTgMWwPG05
I5/OXbrwPsw=
=wxFw
-----END PGP SIGNATURE-----


Reply to: