billw2 / rpi-clone

A shell script to clone a booted disk.
BSD 3-Clause "New" or "Revised" License
2.52k stars 331 forks source link

Cloning from/to USB drive? #17

Open onkelandy opened 9 years ago

onkelandy commented 9 years ago

Hi there! As I had quite some problems with my SD cards (despite the fact I've bought the recommended ones and written log files, etc. on a different drive..) I've decided to switch to the USB configuration. Booting starts from the SD card first, but then everything is run from USB, maybe in the future from an SSD.+

Anyhow now rpi-clone has some problems finding the partitions of course. I've managed to hardcode the correct values in the script but was wondering if anyone has already come up with a more flexible solution that somehow detects where to copy from..? ;) And.. I get this error message after initializing the target SD card or USB stick (tried both, also a card that was already partitioned correctly): /dev/sdc is initialized and resized. Its partitions are: Error: Can't have a partition outside the disk!

It's possible that this is a result of a smaller sized SD card than USB stick.. but I'm not sure..? Thanks alot guys!

bshure commented 9 years ago

I try to keep minimal IO load on my boot SD cards and store more dynamic data on an external USB stick that is backed up with a different utility.

I had initial problems with corrupting boot microSD cards as well. Not knowing when it was safe to turn off the power was probably the root cause. Switching from black cases to clear cases made a difference!

I would be nervous about changing the script.

My two cents.

Good luck!