Image

Imagediscordian wrote in Imagelinux 🙂awake

More on the subject of dd

This was sort of touched on in the last post, but I'm still a little confused by using dd to copy full volumes - and googling is proving to be less than specific enough. Lets say I have a fully functional installation of Linux on a single physical drive (hda). It has a fairly standard partition schema

hda1 - /boot
hda2 - /
hda3 - swap

If I wanted to create an exact duplicate on a second drive (hdb) - what would the required steps be? Do I need to partition and format hdb manually and then do dd if=/dev/hdaX of=/dev/hdbX - for each partition? Or would dd if=/dev/hda of=/dev/hdb take care of everything on its own (including partitioning and formatting)?