Rkdeveloptool Image-Backup

I tried to use rkdeveloptool to backup the onboard flash.

checking to size with
fdisk -l show
Disk /dev/mmcblk1: 964 MiB, 1010827264 bytes, 1974272 sectors

so we have 1974272 sectors here.
So i run
rkdeveloptool rl 0 1974272 dump_with_rk_tool.img
and try to write it on a second device. The second device will not boot.

So i create a second image using
dd if=/dev/mmcblk1 of=/mnt_USB_stick/dump_with_dd.img
Write this to a new device works. The device boot.

1010827264 dump_with_dd.img
1010827264 dump_with_rk_tool.img

fdisk -l dump_with_rk_tool.img
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Disk dump.img: 964 MiB, 1010827264 bytes, 1974272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A330076C-5D56-49B2-8D57-1B1332C7517B

Device Start End Sectors Size Type
dump.img1 32768 262143 229376 112M EFI System
dump.img2 262144 1972319 1710176 835M Linux filesystem

fdisk -l dump_with_dd.img
Disk /mnt/dmp.img: 964 MiB, 1010827264 bytes, 1974272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A330076C-5D56-49B2-8D57-1B1332C7517B

Device Start End Sectors Size Type
/mnt/dmp.img1 32768 262143 229376 112M EFI System
/mnt/dmp.img2 262144 1972319 1710176 835M Linux filesystem

Why will dumping the image using rkdevtool break the gpt or did i missed something?

1 Like

is read from the OS, what if you rkdeveloptool rl 0 1974272 more than that?

Hello Jack,

sorry, i didn’t understand your reply.

I mean if you read more than 1974272 sectors with rkdeveloptool rl, maybe add 1000 sector more? Will you see the backup gpt partition is corrupted? The backup gpt partition info is stored in the last 34 sectors of the end.

1 Like