User:NeoAmsterdam/Installing build 8.0.2 to a bootable SD card
Jump to navigation
Jump to search
This document will explain how to make a bootable SD card for use with your XO (and then abuse your newfound storage capacity).
Read Me First
Warnings
- This procedure will erase and overwrite everything stored on the XO and the SD card. Back up your data!
- Do not execute this procedure on battery power. Any power interruption could lead render your XO irrecoverable.
- This procedure requires the use of fdisk for partitioning. Do not attempt this procedure if you are a Linux novice.
- Execute this procedure at your own risk. I will provide clarifications and explanations if requested, but I will not provide tech-support-style help.
Caveats
- The SD card will be formatted as an ext3 filesystem. This is not an ideal filesystem for SD cards.
- This document assumes you already have a developer key.
- This document assumes that fdisk automatically recognizes the starting and ending cylinders for the SD card.
Notes
- This document assumes that the USB drive is already formatted as a vfat/ms-dos file system.
- All the instructions on this page are verbose. Even though it takes longer, it'll allow you to keep tabs on the XO's progress.
- Children should get permission from a parent, guardian, teacher, and/or Linux guru before attempting this procedure.
Adult supervision is not required, but is highly recommended.
Requirements
- An XO
Obviously. - A USB drive
512 MB is barely large enough, 1 GB will do nicely. - An SD card
512 MB is barely large enough, 1 GB will do, but larger will always be better. - A developer's key
The instructions for obtaining a developer's key can be found here. - Internet connectivity
You will need to download two files.
Optional
- You will probably want to use a second computer to download two required files and to back up the XO's data.
The Procedure
Safeguarding Your Data
- Plug in the USB drive, insert the SD card.
- Backup your data by copying files/activities to your USB drive.
- Drop into the the console.
Press ◆ ctrl + ◇ alt + f1 to enter the console, then press enter to log in as root. - Determine the USB drive's mount point.
mount will output a series of mounted devices. Look for something like /dev/sda1 on /media/USB type vfat: make note of the mount point (/media/USB in this example). - Copy the developer key to the USB drive.
mkdir -pv /media/USB/security ; cp -v /security/develop.sig /media/USB/security - Return to the graphical environment.
Press ◆ ctrl + ◇ alt + f3. - Enter the Journal and unmount the USB key.
Unmounting is explained here - Unplug the USB drive.
Acquiring the Software
The directions in this section assume that you're using a second computer.
- Backup your data by copying files/activities from your USB drive.
- Download fs.zip and os802.img to your USB drive.
You should now have fs.zip, os802.img, and a folder called security which contains develop.sig on the USB drive. - Eject the USB drive.
The remainder of this document assumes that you're using the XO.
Preparing for Installation
- Drop into the the console.
- Stop Sugar and the automounting daemon by lowering the runlevel.
/sbin/init 3 - Determine mounted devices
mount
will list all the mounted devices.
If you see /dev/mmcblk0p1 mentioned, run umount /dev/mmcblk0p1.
If the XO responds with the device is busy error message, try cd / ; umount /dev/mmcblk0p1.
If the device still can't be unmounted, stop what you're doing - you cannot proceed any further. - Quick-format the SD card
dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=8 - Paritition the SD card.
fdisk /dev/mmcblk0
You will now be running fdisk interactively. Create a new primary partition that runs the length of the drive, flag it as bootable, make sure it's type 83 (Linux), and write the changes. - Format the SD card
mkfs.ext3 -L "OLPC-SD" /dev/mmcblk0p1 - Turn off the XO
shutdown -h now
Installing the OS
- With the XO powered off, plug in the USB drive.
- Hold down all four game keys (╳, ✓, ○, and ◻) while your power on the XO.
Do note release the four game keys until you see "Release the game keys to continue" at the top of the screen.
Once you release the game keys, the XO will begin installing the OS to the NAND. - Wait.
- I recommend setting up a fresh pot of coffee during this intermission. By the time you turn on the coffee machine, the XO will present you with the registration screen.
- Drop into the the console.
◆ ctrl + ◇ alt + f1. - Mount the USB drive.
mkdir /mnt/USB ; mount -t vfat /dev/sda1 /mnt/USB - Mount the SD card.
mkdir /mnt/SD ; mount -t ext3 /dev/mmcblk0p1 /mnt/SD - Copy the developer key from the USB drive to the SD card.
cp -rv /mnt/USB/security /mnt/SD - Copy the OS from the NAND to the SD card.
cp -prv /versions/pristine/802 /mnt/SD - Wait.
- Remember that fresh pot of coffee you set up a short while ago? Now is the time to pour yourself a cup. By the time you're halfway through the coffee, the XO will be ready for you.
- Create the olpc user's home directory.
mkdir -pv /mnt/SD/home/olpc ; chown -rv olpc:olpc /mnt/SD/home/olpc - Unmount the USB drive and SD card.
umount /mnt/USB ; unmount /mnt/SD - Remove the temporary directories.
rmdir -v /mnt/USB /mnt/SD - Restart.
shutdown -r now
You should now be booting off of the SD card.
See Also
To Do: Install activities from USB, make a swapfile, tweak olpc.fth (maybe).