Create Backup Image

I am trying to create a backup image, based on the stock ubuntu server image, so that all my configurations and custom settings can be easily dropped onto other CM3’s. i was able to do it in a convoluted way (mount mass storage to the device while it was running, dd the live image to a .img file on the storage device, then mount the storage device to a normal linux box, and flash the dd’d image file to another CM3 using rkdeveloptool). that method works fine, but is a little round-a-bout. I would liek to just use the rkdeveloptool to pull the image, but whenever i do, the image that is created wont boot after i write it to a CM3. to pull the image, i run the commands:

sudo rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin
sudo rkdeveloptool rl 0 9280000 image.img

the 9280000 number is coming from the partition sizes when i run fdisk on the original image while it is live, getting an end sector of 9273343, so the 9280000 should be plenty big enough (the image fiel created by dd is showing as 4.74G, the one created by rkdeveloptool is 4.75G. i write either image the same way, by running the commands

sudo rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin
sudo rkdeveloptool wl 0 image.img

but the dd’d image will boot, while the one created by rkdeveloptool will not. i do not have access to the debug console, so i cannot see what the bootloader might be saying. anyone else having this problem?

Hi,

I’m facing the same problem -
rkdevelop successfully downloads the image from the module. the “boot” - partition from the image is successfully mounted, but all files inside are corrupted / unreadable:

 ./rkdeveloptool rl 0 2000000 test1.img
Read LBA to file (100%)

 ls -l test1.img
-rw-r--r-- 1 root root 1024000000 Dec  4 17:53 test1.img

losetup -o  16777216 --sizelimit 536870912 /dev/loop1 test1.img
mount /dev/loop1  /mnt/
cd /mnt/
ls -l
ls: cannot access 'extlinux': Input/output error
ls: cannot access 'dtbs': Input/output error
total 31692
-rwxr-xr-x 1 root root   175540 Oct 18 14:36 config-4.19.193-58-rockchip-gbac1feba87f0
-rwxr-xr-x 1 root root      595 Oct 31 18:03 config.txt
d????????? ? ?    ?           ?            ? dtbs
d????????? ? ?    ?           ?            ? extlinux
-rwxr-xr-x 1 root root  6672955 Oct 31 17:58 initrd.img-4.19.193-58-rockchip-gbac1feba87f0
-rwxr-xr-x 1 root root    22958 Nov 24 23:28 md5sum
-rwxr-xr-x 1 root root  4754166 Oct 18 14:36 System.map-4.19.193-58-rockchip-gbac1feba87f0
-rwxr-xr-x 1 root root 20813832 Oct 18 14:36 vmlinuz-4.19.193-58-rockchip-gbac1feba87f0


ls -l /home/am/rock3/md5sum
-rwxr-xr-x 1 am am 22958 Dec  4 18:06 /home/am/rock3/md5sum
md5sum -c /home/am/rock3/md5sum
md5sum: ./extlinux/extlinux.conf.orig: Input/output error
./extlinux/extlinux.conf.orig: FAILED open or read
md5sum: ./extlinux/extlinux.conf: Input/output error
./extlinux/extlinux.conf: FAILED open or read
./config-4.19.193-58-rockchip-gbac1feba87f0: OK
md5sum: ./dtbs/4.19.193-58-rockchip-gbac1feba87f0/rockchip/overlay/README.rockchip-overlays:         Input/output error
./dtbs/4.19.193-58-rockchip-gbac1feba87f0/rockchip/overlay/README.rockchip-overlays: FAILED open or read
md5sum: ./dtbs/4.19.193-58-rockchip-gbac1feba87f0/rockchip/overlay/audioinjector-isolated-soundcard.dtbo: Input/output error
./dtbs/4.19.193-58-rockchip-gbac1feba87f0/rockchip/overlay/audioinjector-isolated-soundcard.dtbo: FAILED open or read
md5sum: ./dtbs/4.19.193-58-rockchip-gbac1feba87f0/rockchip/overlay/cm3-io-sata.dtbo: Input/output error
....

PS: similarly, the “dd” from running module works fine