4700 Backup/Restore XNAND
From embeddedTS Manuals
This needs to be done directly on the SBC. Please note that all NBD partitions from the NAND card must be dismounted before attempting to image the NAND on the SBC.
WARNING: | Since there is no locking mechanism, it is not safe to run 2 copies of nandctl on this board. Make sure you unmount your filesystems and stop running nandctl if you prefer to backup/write data with that. These examples use 'dd' which is safe to use while nandctl is running. |
You can find the latest xnand image here.
Backup
Entire Image
# Compressed
dd if=/dev/nbd0 bs=131072 count=2048 | gzip > backup.dd.gz
# or uncompressed
dd if=/dev/nbd0 bs=131072 count=2048 of=backup.dd
Kernel
dd if=/dev/nbd1 bs=512 count=5119 of=/path/to/backup/zImage
Initrd
dd if=/dev/nbd2 bs=512 count=5120 of=/path/to/backup/initrd
Restore
Entire Image
# If compressed
gunzip xnand-4700-latest.dd.gz
# or uncompressed
dd if=xnand-4700-latest.dd bs=131072 count=2048 of=/dev/nbd0
Kernel
dd of=/dev/nbd1 bs=512 count=5119 if=/path/to/backup/zImage
Initrd
dd of=/dev/nbd2 bs=512 count=5120 if=/path/to/backup/initrd