steps to create DD image file from usb and restore image to a DIFFERENT usb
Solution 1:
You cloned "sdc1" which is a single partition however it sounds like you are attempting to clone an operating system which means you also need the boot-programs.
The location of that information will vary depending on how you have things setup. For example if you are using an MBR partition table then it's stored in the drive MBR, if you are using GPT with BIOS then it's stored in the drive's protected MBR, if you are using GPT with UEFI then it's stored on the ESP, and if you are chain-loading then you could have boot-data on a partition MBR, and the drive MBR.
DD can be used to clone MBR sectors, or an ESP. Alternatively you could just clone the entire drive to save yourself the trouble of making multiple images. I personally recommend avoiding the cloning of MBRs as I've only tried it once, and without success. ESPs or entire drives have always worked fine for me no problem.
My examples below use the creation of an image, and then restoring from it since that's the approach that you are using, but for the record if you can connect both usb sticks to the computer at once you can directly clone from 1 to the other without making an image.
Steps:
Backup Drive MBR & Partition Table:
In terminal type "
sudo -i
".In terminal type "
dd if=/dev/sda of=/media/location/backup.img bs=512 count=1
".
Restore Drive MBR:
In terminal type "
sudo -i
".In terminal type "
dd if=/media/location/backup.img of=/dev/sda bs=446 count=1
".
Backup Partition MBR & Partition Table:
In terminal type "
sudo -i
".In terminal type "
dd if=/dev/sda1 of=/media/location/backup.img bs=512 count=1
".
Restore Partition MBR:
In terminal type "
sudo -i
".In terminal type "
dd if=/media/location/backup.img of=/dev/sda1 bs=446 count=1
".
Backup An ESP:
In terminal type "
sudo -i
".In terminal type "
dd if=/dev/sda1 of=/media/location/backup.img
".
[This process is exactly the same as cloning any other partition.]
Restore An ESP:
In terminal type "
sudo -i
".In terminal type "
dd if=/media/location/backup.img of=/dev/sda1
".
Backup A Partition:
In terminal type "
sudo -i
".In terminal type "
dd if=/dev/sda1 of=/media/location/backup.img
".
Restore A Partition:
In terminal type "
sudo -i
".In terminal type "
dd if=/media/location/backup.img of=/dev/sda1
".
[RECOMMENDED ACTION] Backup A Drive:
In terminal type "
sudo -i
".In terminal type "
dd if=/dev/sda of=/media/location/backup.img
".
[RECOMMENDED ACTION] Restore A Drive:
In terminal type "
sudo -i
".In terminal type "
dd if=/media/location/backup.img of=/dev/sda
".
Notes:
It's recommended that DD be run as root, not sudo as otherwise interruptions could potentially occur. On Ubuntu this is difficult given you cannot login as root.
When restoring MBRs you can use 512 or 446. 446 will just restore the MBR (where your boot-strap code & boot-loader are written). 512 will restore the MBR and the partition table.
You don't have to make an image; you can clone directly from source to destination.
Sources:
http://postbin.per.red/pages/article22/page.php
http://www.cyberciti.biz/faq/howto-copy-mbr/
Additional Resources:
- This isn't about DD, but it discusses boot-loaders: Proposal For A New Tag & Synonym Tags To Help Prevent Misuse Of The Bootloader Tag?