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.
PGP public key available at
or by 'finger -l firstname.lastname@example.org'
This message was composed in a 100% Microsoft free environment.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----