home
clear breadcrumbs
search
login
 
dd
sudo dd if=/path/to/img of=/dev/block/device status=progress using gparted delete the swap partition, delete the extended partition, resize the primary partition, create a new extended and swap partition dd - dd stands for "Copy and Convert". Some might say it stands for 'Data Destroyer' (in case you mislead the command some serious damage can happen) or Data Duplicate or Data Description. Use whatever description suits your needs! if - the source disk (in/input file) bs - Sector size value from fdisk output (Block Size or number of bytes to be read/write one time) count - Last "End" sector from fdisk output incremented by one integer (+1) - How many 512 size blocks should copy before it stops. Here, it should transfer 44099584 sectors of 512 bytes in size. conv=sync,noerror - sync I/O and don't stop in case you encounter block errors on the source disk | - Linux pipe (interprocess communication channel in Linux or FIFO) pv -s 21GB - monitor the cloning progress - Approximately 21GB should be transferred through the pipe of - the target disk where the piped data is actually written (out/output file) In case you want to operate with a larger Block Size than the standard disk block size (512), let's say up to four times the size of standard block size (2048), for speeding up things, you can do some simple math and multiply by four the standard block size of the disk (512x4) and then divide the total number of blocks +1 of the last partition by four. Example: In this example the "End" of sda2 : 44898303+1 divided by 4. dd will operate with a block size of 2048 bytes. sudo dd if=/dev/sda bs=2048 count=44898303 conv=sync,noerror | pv -s 21G |sudo dd of=/dev/sdb