Backing up with dd, and creating a file system on a new drive.

Tom H tomh0665 at gmail.com
Fri Dec 18 13:55:12 UTC 2009


> I just got my new 500 GB drive, and am excited about being
> able to back up my 160 GB old drive. Since I am new to the
> LInux camp, I need to know how to set up the new drive, and
> how to use dd to image the 160 GB drive to the 500 GB drive.

> After I do back up the small drive, and create partitions
> beyond what dd writes there, will there be a problem with
> using dd to rewrite the back up at a later date with the new
> partitions beyond the backup partitions?

> Can I use gparted to create an ntfs volume of the drive
> first, then use dd to image the small one, or can I run dd
> on the unformatted drive first to create the backup
> partitions?

Since you are new to Linux, you may be better off installing KK anew
on your new disk and copying your data over. However, if you want to
copy your old disk to your new one:

1st and 3rd para answer:

I assume that you have Karmic on one partition (the default setup).

You can add the 500gb disk, boot from a Ubuntu CD, create an ntfs
partition, create another partition >160gb (no need to format it) , dd
your old install onto this partition, create a swap partition,
shutdown, remove the 160gb disk, boot from the Ubuntu CD again, mount
the new KK partition, run "grub-install --root-directory=<mountpoint>
/dev/sd<newdisk>", umount the partition, reboot.

The reason for the two boots that I am suggesting is that I expect the
"grub-install ..." to pick up the 160gb disk and to create device.map
that will be incorrect after the 160gb disk is removed.

PS: I prefer (although it is not necessary) to chroot the new disk's
mount before running "grub-install" but it is most probably
unnecessary...

2nd para answer:

If you want to create a backup of the 160gb disk, you will have to
boot from a CD, create a partition on the 500gb disk > 160gb, create a
file (eg 160gbbackup), and dd the 160gb disk to 160gbbackup (you could
also pipe the dd to gzip/bzip2 to compress the image.




More information about the ubuntu-users mailing list