Cloning/imaging drives/disks using linux pv command (Ubuntu example)

Posted: October 9, 2016 in Linux
Tags: , , , ,

Warning: Linux utilities tend to be simple but very powerful i.e. typing incorrect commands (especially the directions of < and > below) can result in your source drive being wiped out – suggest to back up important files before proceeding. Proceed with instructions below at your own risk.

1) Install pv;


sudo apt-get install pv

2) Determine source/destination drives/disks;


sudo parted

Enter print all in the parted command line then look for /dev/sda, /dev/sdb etc. and associated partition descriptions to determine source/destination drives/disks.

3) Start the actual cloning/imaging (assumes /dev/sda is source and /dev/sdc is destination);


sudo su
pv < /dev/sda > /dev/sdc

4) Install new drive then use linux gparted utility to extend partition sizes.

Above was tested using an Ubuntu 14.04 LiveUSB with an internal source drive containing a Windows 10 and an Ubuntu 14.04 partition. Windows did report a strange error during initial boot after new drive was installed but sorted itself after restarting. No issues found booting into the Ubuntu partition.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s