Monday, July 23, 2012

Linux Copy One Hard Disk to Another Using dd Command

Q. How can I copy one hard disk to another using dd command?
A. dd command can copy disk in raw format. It will copy partition table and bootloader and all partitions within this disk. For example, you can copy /dev/sdai to /dev/sdbj (same size) using the following dd command. dd should complete with no errors, but output the number of records read and written.

Login as the root user (use sudo or su command)

Open terminal or shell prompt and type the following dd command:
# dd if=/dev/sdai of=/dev/sdbj

No comments:

Post a Comment

The Open Source Web Hosting company