75XX MicroSD Recovery: Difference between revisions

From embeddedTS Manuals
No edit summary
No edit summary
Line 6: Line 6:


''' From Workstation '''   
''' From Workstation '''   
----


Backup entire SD card
'''Backup '''
Entire SD card
<source lang=bash>
<source lang=bash>
dd if=/dev/mmcblk0 of=/path/to/backup.dd bs=32k
dd if=/dev/mmcblk0 of=/path/to/backup.dd bs=32k
</source>
</source>


Restore the entire SD card
Kernel
<source lang=bash>
<source lang=bash>
dd if=/path/to/backup.dd of=/dev/mmcblk0 bs=32k
dd if=/dev/mmcblk0p2 of=/path/to/zImage bs=32k
</source>
</source>


Backup Kernel
Initrd
<source lang=bash>
<source lang=bash>
dd if=/dev/mmcblk0p2 of=/path/to/zImage bs=32k
dd if=/dev/mmcblk0p3 of=/path/to/initrd bs=32k
</source>
 
''' Restore'''
 
Entire SD card
<source lang=bash>
dd if=/path/to/backup.dd of=/dev/mmcblk0 bs=32k
</source>
</source>


Restore Kernel
Kernel
<source lang=bash>
<source lang=bash>
dd if=/path/to/zImage bs=32k of=/dev/mmcblk0p2
dd if=/path/to/zImage bs=32k of=/dev/mmcblk0p2
Line 28: Line 37:


''' From SBC '''
''' From SBC '''
 
----
Backup entire card from SBC
'''Backup'''
Entire card
<source lang=bash>
<source lang=bash>
dd if=/dev/nbd5 of=/path/to/backup.dd bs=512 conv=sync
dd if=/dev/nbd5 of=/path/to/backup.dd bs=512 conv=sync
</source>
</source>


Restore the entire card from SBC
Kernel
<source lang=bash>
<source lang=bash>
dd if=/path/to/2gbsd-noeclipse-latest.dd bs=512 conv=sync of=/dev/nbd5
dd if=/dev/nbd7 of=/path/to/zImage bs=512 conv=sync
</source>
</source>


Backup Kernel
Initrd
<source lang=bash>
<source lang=bash>
dd if=/dev/nbd7 of=/path/to/zImage bs=512 conv=sync
dd if=/dev/nbd8 of=/path/to/initrd bs=512 conv=sync
</source>
</source>


Restore Kernel
'''Restore'''
 
The entire card from SBC
<source lang=bash>
<source lang=bash>
dd if=/mnt/root/zImage bs=512 conv=sync of=/dev/nbd7
dd if=/path/to/2gbsd-noeclipse-latest.dd bs=512 conv=sync of=/dev/nbd5
</source>
</source>


Backup Initrd
Kernel
<source lang=bash>
<source lang=bash>
dd if=/dev/nbd8 of=/path/to/initrd bs=512 conv=sync
dd if=/mnt/root/zImage bs=512 conv=sync of=/dev/nbd7
</source>
</source>


Restore Initrd
Initrd
<source lang=bash>
<source lang=bash>
dd if=/mnt/root/initrd bs=512 conv=sync of=/dev/nbd8
dd if=/mnt/root/initrd bs=512 conv=sync of=/dev/nbd8
</source>
</source>

Revision as of 15:47, 10 August 2011

If backing up on a separate workstation, keep in mind windows does not have direct block device support needed to write these images. You will also need to determine the SD card device. You can usually find this in the output of 'dmesg' after inserting the SD card and you will typically see something like '/dev/sdb' as the block device and '/dev/sdb1' for the first partition. On some newer kernels you will see '/dev/mmcblk0' as the block device and '/dev/mmcblkop1' for the first partition. For these examples I will use the '/dev/mmcblk0' format.

If you are backing up directly on the board you will likely need to use some kind of offboard storage like a thumbdrive or external hard drive. Make sure you have any nbd devices unmounted before trying to restore new ones.

You can find the latest SD card image here.

From Workstation


Backup Entire SD card

dd if=/dev/mmcblk0 of=/path/to/backup.dd bs=32k

Kernel

dd if=/dev/mmcblk0p2 of=/path/to/zImage bs=32k

Initrd

dd if=/dev/mmcblk0p3 of=/path/to/initrd bs=32k

Restore

Entire SD card

dd if=/path/to/backup.dd of=/dev/mmcblk0 bs=32k

Kernel

dd if=/path/to/zImage bs=32k of=/dev/mmcblk0p2

From SBC


Backup Entire card

dd if=/dev/nbd5 of=/path/to/backup.dd bs=512 conv=sync

Kernel

dd if=/dev/nbd7 of=/path/to/zImage bs=512 conv=sync

Initrd

dd if=/dev/nbd8 of=/path/to/initrd bs=512 conv=sync

Restore

The entire card from SBC

dd if=/path/to/2gbsd-noeclipse-latest.dd bs=512 conv=sync of=/dev/nbd5

Kernel

dd if=/mnt/root/zImage bs=512 conv=sync of=/dev/nbd7

Initrd

dd if=/mnt/root/initrd bs=512 conv=sync of=/dev/nbd8