Backup: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (trying to start a new wiki page)
(first draft)
Line 1: Line 1:
This page is intended for XO users who want to 'backup' the entire storage memory state of their OLPC XO, i.e., the 1 GB NAND flash memory, so that they can do a later 'restore' if needed to recover from a software disaster. Backup and restore are also useful for development testing of different software builds.
How to backup your XO

===What you will need=== (besides an XO laptop)

-- a 1 GB (or larger) USB flash memory device (priced under Cdn$10 per GB as of Sep-2008)

-- a Developer Key (software access code) that lets you use OpenFirmWare (OFW)

-- 10 minutes to 3 hours (depending on your luck and skill)


===To backup your XO===

-- Ensure the USB memory device is formatted as FAT or FAT32 or VFAT. Factory-formatted devices are apparently preferred or least troublesome.

-- Ensure there is at least 1 GB (1024 MB) of free space available on the USB memory device.

-- Start or restart your XO, while holding down the (X) Escape key at upper-left of the keyboard. This should get you to the OpenFirmWare 'ok' prompt.

-- Insert your USB memory device into one of the USB ports on the XO.

-- At the OFW 'ok' prompt, type: probe-usb <enter>

-- Ensure your USB device shows up as a USB2.0 device. USB1.x is too slow.

-- Type: dir u: <enter>

-- Ensure there is at least 1 GB of available free space.

-- Type: save-nand u:\backup.img <enter>
(The filename 'backup.img' may be something else such as 'my759bak.img'; stay with the .img extension, and use a short 8.3 format filename.)

-- Wait anywhere from a few minutes to a few hours as the XO copies its internal NAND flash memory contents over to the USB memory device. The displayed hexadecimal block count will count from 0 to 1FFF, at a varying speed, then OFW will report 'Done' and report the name of a CRC file such as 'backup.crc'.

-- Type: dir u: <enter> (if you wish to see the final contents of USB memory).

-- Remove the USB memory device. Your backup is now complete.

-- You may copy the two files 'backup.img' and 'backup.crc' from the USB memory onto some other media, such as a Windows PC, for redundant backup or to free your USB memory device for other uses. Always keep the two files together.


===To restore your XO===

-- Start or restart your XO, while holding down the (X) Escape key at upper-left of the keyboard. This should get you to the OpenFirmWare 'ok' prompt.

-- Insert your USB memory device into one of the USB ports on the XO.

-- At the OFW 'ok' prompt, type: probe-usb <enter>

-- Ensure your USB device shows up as a USB2.0 device. USB1.x is too slow.

-- Type: dir u: <enter>

-- Verify that your desired '.img' and '.crc' files are there.

-- Type: copy-nand u:backup.img <enter>

-- Wait til done, then remove the USB memory device, then restart your XO!


===Notes===

Some brands of USB memory work better than others. If save-nand is too slow, try a different brand. Default factory-formatted USB memories are reported to work better than devices that have been reformatted, for example by a Windows PC. If you have a USB memory device that is working well with your XO, try to avoid ever reformatting it; delete files using file delete commands rather than device format commands. Backups in the 10-minute range for half-full XO's are achievable.

There are variations possible, for example using an SD flash memory device. But a USB memory device will generally be more convenient.

Accessing individual files from a backup.img file generally requires you to restore the entire backup to your XO. But perhaps there is some utility software that can access individual files from an .img file (does anyone know?).

Revision as of 21:57, 6 September 2008

This page is intended for XO users who want to 'backup' the entire storage memory state of their OLPC XO, i.e., the 1 GB NAND flash memory, so that they can do a later 'restore' if needed to recover from a software disaster. Backup and restore are also useful for development testing of different software builds.

===What you will need=== (besides an XO laptop)

-- a 1 GB (or larger) USB flash memory device (priced under Cdn$10 per GB as of Sep-2008)

-- a Developer Key (software access code) that lets you use OpenFirmWare (OFW)

-- 10 minutes to 3 hours (depending on your luck and skill)


To backup your XO

-- Ensure the USB memory device is formatted as FAT or FAT32 or VFAT. Factory-formatted devices are apparently preferred or least troublesome.

-- Ensure there is at least 1 GB (1024 MB) of free space available on the USB memory device.

-- Start or restart your XO, while holding down the (X) Escape key at upper-left of the keyboard. This should get you to the OpenFirmWare 'ok' prompt.

-- Insert your USB memory device into one of the USB ports on the XO.

-- At the OFW 'ok' prompt, type: probe-usb <enter>

-- Ensure your USB device shows up as a USB2.0 device. USB1.x is too slow.

-- Type: dir u: <enter>

-- Ensure there is at least 1 GB of available free space.

-- Type: save-nand u:\backup.img <enter>

  (The filename 'backup.img' may be something else such as 'my759bak.img'; stay with the .img extension, and use a short 8.3 format filename.)

-- Wait anywhere from a few minutes to a few hours as the XO copies its internal NAND flash memory contents over to the USB memory device. The displayed hexadecimal block count will count from 0 to 1FFF, at a varying speed, then OFW will report 'Done' and report the name of a CRC file such as 'backup.crc'.

-- Type: dir u: <enter> (if you wish to see the final contents of USB memory).

-- Remove the USB memory device. Your backup is now complete.

-- You may copy the two files 'backup.img' and 'backup.crc' from the USB memory onto some other media, such as a Windows PC, for redundant backup or to free your USB memory device for other uses. Always keep the two files together.


To restore your XO

-- Start or restart your XO, while holding down the (X) Escape key at upper-left of the keyboard. This should get you to the OpenFirmWare 'ok' prompt.

-- Insert your USB memory device into one of the USB ports on the XO.

-- At the OFW 'ok' prompt, type: probe-usb <enter>

-- Ensure your USB device shows up as a USB2.0 device. USB1.x is too slow.

-- Type: dir u: <enter>

-- Verify that your desired '.img' and '.crc' files are there.

-- Type: copy-nand u:backup.img <enter>

-- Wait til done, then remove the USB memory device, then restart your XO!


Notes

Some brands of USB memory work better than others. If save-nand is too slow, try a different brand. Default factory-formatted USB memories are reported to work better than devices that have been reformatted, for example by a Windows PC. If you have a USB memory device that is working well with your XO, try to avoid ever reformatting it; delete files using file delete commands rather than device format commands. Backups in the 10-minute range for half-full XO's are achievable.

There are variations possible, for example using an SD flash memory device. But a USB memory device will generally be more convenient.

Accessing individual files from a backup.img file generally requires you to restore the entire backup to your XO. But perhaps there is some utility software that can access individual files from an .img file (does anyone know?).