On Wed, 15 Oct 2008 14:02:02 -0500, "Adam Monsen" <haircut at gmail.com> said: > On Wed, 2008-10-15 at 14:45 -0400, Smith, Craig A wrote: > > Would something like > > #dd if=/dev/hda of=/dev/hdb > > work? > > I think so, assuming > * neither are mounted > * hdb is assigned to the new drive > * the new drive is the same size or larger than the original > > > I assume I would first need to format the replacement drive with > > appropriate partitions (ext3 and swap). > > dd also copies filesystems, so no need to format the new drive unless > you want to change the partition layout. > > After you've done the image transfer, you can use resize2fs to enlarge > the partition. First create the larger partitions on the new drive and then use dd on the devices for those partitions. E.g. #dd if=/dev/hda1 of=/dev/hdb1 #dd if=/dev/hda3 of=/dev/hdb3 resize2fs won't change the partition size but you can use it to extend the filesytem to use the new, larger partition.