User:NeoAmsterdam/10.1.3/Bootable SD

From OLPC
Jump to navigation Jump to search
If only it were this easy

There is no cheat code or OpenFirmware command for installing an OS image to an SD card on an XO-1, though there is for an XO-1.5. This document explains how make a bootable SD card with Release 10.1.3 (Build 860) on an XO-1.

Before you Begin

  • This procedure will erase any data stored on the XO-1.
  • This procedure will erase any data stored on the SD card.
  • Do not execute these instructions on battery power.
  • This procedure requires the SD card to be partitioned.
    Disk partitioning is beyond the scope of this document.
  • The SD will be formatted as an ext3 filesystem.
    This is not an optimal arrangement for SD cards.
  • Refrain from altering the volume label.
    /boot/olpc.fth expects it to be "OLPCRoot".
  • Children should get permission from a parent, guardian, teacher, and/or Linux guru before attempting this procedure.
    Adult supervision is not required, but it is highly recommended.

Requirements

  • An XO-1
  • A USB drive with ≥1GB capacity and formatted as FAT-32
  • An SD card with at least 1GB of storage capacity
  • A Developer's key ("Dev Key")
  • Internet access

Procedure

Pre-Installation

  1. Back up your data!
    I take no responsibility for preventable data loss.
  2. Download build 860 and its associated filesystem information:
  3. Copy os860.img, os860.img.fs.zip, and your Dev Key to the root directory of the USB drive
  4. Rename os860.img.fs.zip to fs.zip
YamaKeep.JPG

First Phase

  1. Shut down the XO-1.
  2. If there is an SD card in the SD card slot, eject it now.
  3. Insert the USB drive.
  4. Hold down all four game keys ( + + O + ×) while pressing the power button.
    Keep all four game keys depressed until the XO-1 prompts you otherwise (see illustration).

Release 10.1.3 will now "automagically" be installed to the XO-1's internal storage. When it finishes, the XO-1 will restart. Wait until you are presented with the "Name" screen (see illustration) before starting the second phase.

The second phase can't begin until you see this on your screen

Second Phase

  1. Drop into a console.
    ♦ ctrl + ♢ alt + Mesh key f1 small.png f1
  2. Drop runlevels.
    /sbin/init 3
  3. Insert the SD card into the SD slot.
    If you have not partitioned the SD card, do so now. See the 10.1.2 Bootable SD note for more information.
  4. Initialize a filesystem on the SD card.
    mkfs.ext3 -L OLPCRoot /dev/mmcblk0p1
  5. Create a mount point for the SD card.
    mkdir /mnt/sd
  6. Mount the SD card.
    mount -t ext3 /dev/mmcblk0p1 /mnt/sd
  7. Copy the files from the pristine build directory to the SD card.
    This can take as long as three hours. Have patience.
    cp -pr /versions/pristine/860/* /mnt/sd/.
  8. Copy your Dev Key to the SD card now
    cp /mnt/usb/develop.sig /mnt/sd/security/develop.sig
  9. Create the home directory.
    mkdir -p /mnt/sd/home/olpc
  10. Change ownership of the home directory.
    chown -R olpc:olpc /mnt/sd/home/olpc
  11. Unmount the SD card.
    umount /mnt/sd
  12. Remove the SD card's mount point.
    rmdir /mnt/sd

Release 10.1.3 has now been grafted onto the SD card. shutdown -r now and your XO-1 should reboot from the SD card.