Backup your flash memory

From IGEP - ISEE Wiki

(Redirected from How to backup the Flash)
Jump to: navigation, search

Overview

This How-To is meant to be a starting point for people to learn to backup and restore the flash memory from IGEP Boards.

Requirements

There are some requisites to follow this guide:

Backup

  • Boot your IGEP Board using a microSD card
  • Log as a root user
  • Mount flash memory partition using the following commands:
mkdir /tmp/mtdblock1
mkdir /tmp/mtdblock2
mount -t jffs2 /dev/mtdblock1 /tmp/mtdblock1
mount -t jffs2 /dev/mtdblock2 /tmp/mtdblock2
  • Backup your flash memory:
mkdir /home/root/backup
tar -cvf /home/root/backup/igepinikernel.tar /tmp/mtdblock1/
tar -cvf /home/root/backup/rootfs.tar /tmp/mtdblock2
  • Backup IGEP X-Loader binary:
cp /media/mmcblk0p1/MLO /home/root/backup/MLO
  • Shutdown your system

Restore

  • Boot your IGEP Board using the same microSD card used when you backup your system
  • Log as a root user
  • Erase flash memory using the following commands:
flash_eraseall /dev/mtd0
flash_eraseall /dev/mtd1
flash_eraseall /dev/mtd2
  • Mount flash memory partition using the following commands:
mkdir /tmp/mtdblock1
mkdir /tmp/mtdblock2
mount -t jffs2 /dev/mtdblock1 /tmp/mtdblock1
mount -t jffs2 /dev/mtdblock2 /tmp/mtdblock2
  • Restore igep.ini, Kernel and rootfs:
cd /
tar xvf /home/root/backup/igepinikernel.tar
tar xvf /home/root/backup/rootfs.tar
  • Copy IGEP X-Loader binary to flash memory:
 writeloader -i /home/root/backup/MLO -o /dev/mtd0
  • Shutdown your system

Test results

Once you restored your system image. Boot up IGEP Board using flash memory device and test the results.