billw2 / rpi-clone

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

Error: Can't have a partition outside the disk! #60

Open mrgw454 opened 6 years ago

mrgw454 commented 6 years ago

Hello. Been using this great utility for a while on many SD cards (64GB or less). Tried my first 128GB card today and received this error. I have to CTRL-C to exit. Any idea on what would cause this? Thanks!

smrfeld commented 5 years ago

Same problem!

trevjonez commented 5 years ago

Same issue here, thinking it is due to the source disk being larger than the destination so partition map of the source doesn't fit within destination space. I'm going to give a spin at shrinking the partition on the source first

trevjonez commented 5 years ago

I believe a bad partition table on the destination is what is triggering the issue as I was getting the same issue just trying to list partitions in gparted.

Here is what I did to get around it.

  1. Used cfdisk to delete all the partitions from destination drive.
  2. Used cfdisk to reduce the partition size of the source drive partition such that they fit within the destination drive ***dangerous depending on where data is written?
  3. rerun the rpi-clone command.

My clone command is still running but seems as though it is going to work.