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

rpi-clone messes up partition table #2

Open vyruz1986 opened 11 years ago

vyruz1986 commented 11 years ago

I've tried running rpi-clone with several SDcards and readers but am always getting the same result: a corrupt partition table. This is the output of the script: [root@rpi-01 rpi-clone]# rpi-clone -f sda

* Forcing a partition initialization of destination 'sda' * The existing partitions on destination disk 'sda' are: Model: SanDisk SDDR-113 (scsi) Disk /dev/sda: 7948MB Partition Table: msdos Disk Flags:

Number Start End Size Type File system Flags 1 4.19MB 7946MB 7941MB primary fat32

This script can initialize the destination disk with a partition structure copied from the currently booted filesytem and then resize partition 2 (the root filesystem) to use all space on the SD card. Do you want to initialize the destination /dev/sda? (yes/no): y

Imaging the partition structure, copying 1296 megabytes... 1296+0 records in 1296+0 records out 1358954496 bytes (1.4 GB) copied, 525 s, 2.6 MB/s Sizing partition 2 (root partition) to use all SD card space... Ignoring extra data in partition table 6. Ignoring extra data in partition table 6. Ignoring extra data in partition table 6. Value out of range.

Do you really want to quit? mke2fs 1.42.8 (20-Jun-2013) Could not stat /dev/sda2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

/dev/sda is initialized and resized. Its partitions are: Error: Can't have a partition outside the disk! Model: SanDisk SDDR-113 (scsi) Disk /dev/sda: 7948MB Partition Table: unknown Disk Flags: e2label: Attempt to read block from filesystem resulted in short read while trying to open /dev/mmcblk0p2 Couldn't find valid filesystem superblock.

Your booted /dev/mmcblk0p2 rootfs existing label: You may enter a label for the destination rootfs /dev/sda2: ^C

[root@rpi-01 rpi-clone]# parted /dev/sda print Error: Can't have a partition outside the disk! Model: SanDisk SDDR-113 (scsi) Disk /dev/sda: 7948MB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: [root@rpi-01 rpi-clone]#

Thansk for any help you could offer!

platini76 commented 9 years ago

same error here!

merlinxl5 commented 9 years ago

I'm getting the exact same error and situation. Has there been any progress made?

robustini commented 5 years ago

Same here with version 2.

bwims commented 1 year ago

5 years later and it is still buggered?