Regular Linux desktops on the XO

Me and Bobby Powers have spent a few hours smoothing out the process of getting fully-featured Linux desktops to boot on the XO laptop. On the whole, OLPC developers have been pretty good at getting code upstream, so only a few fixups are needed to get things operational on the XO.

The only caveat is that you need a 4GB (or larger) SD card. The XO itself only has 1GB of storage, which is not big enough for the standard installs of the distributions that we’ve been playing with.

We’ve got Fedora 9 and Ubuntu Intrepid Alpha 3 working. Here is the process, using Fedora 9 as an example:

First, download the regular CD/DVD installation media for your distribution. For Fedora 9, you go to Burn that to CD/DVD.

Next, find a regular PC that is capable of reading SD cards. We’re using a standard desktop plus a USB card reader. Boot that PC from the CD/DVD installation media that you burned earlier. Proceed through the installation as usual, but when asked where you would like to install the operating system, select the SD card.

Choose to setup the disk partitions manually. Do not do any fancy partitioning, just choose one partition that fills up the card. You don’t need to add any swap space.

Select the ext3 filesystem and choose to not install a bootloader.

Wait for installation to complete, and shut down the system.

Next, you need a PC running Linux. This can be the same PC as the one you used to install onto SD, assuming that one has Linux installed on it’s hard disk too. It doesn’t really matter which distribution, as long as you have git and regular development tools installed, and the SD card mounted at a known location.

On this PC, run the following:

# git clone git://

Next, become root and run the script.

# sudo su -
# cd ~dsd/XO-alt-distro
# ./sd_fixup fedora-9 /media/disk

It will now download and compile the OLPC kernel, and perform a few other necessary tweaks to your SD card.

When the script has completed, unmount the SD card and plug it into an XO. Boot the XO, and say hello to your fully-functional Linux desktop.

In future, we plan to publish filesystem images of SD-installed distributions, so that you can avoid much of the above. To simplify further, we could also write a tool which runs on the XO which downloads said filesystem image and flashes onto SD.

Update 19/08/2008: Posted some additional notes

14 thoughts on “Regular Linux desktops on the XO

  1. Jeremy Katz

    We should really just make it so you can use the live image directly just like livecd-iso-to-disk already works.

    I’ll probably start prodding at it some in the next day or two as I think that my life may be getting a little saner.

  2. loki

    That’s really nice stuff! Keep up the good work.
    Just one question: Will I need the 4GB SD-card no matter what or would a smaller one suffice for the upcoming install methods?

  3. Pingback: dsd’s weblog » Blog Archive » Followup notes on XO alternate desktops

  4. Donnie Berkholz

    Gentoo that baby up! Obviously not compiling directly on it … distcc or nfs chrooting… would love to see some performance testing on a low-spec machine.

  5. bronson

    What about using a USB drive? The XO has USB ports, can we use them for the install?

    Thanks for your hard work, I’ll be following closely.

  6. Jim Gettys

    It will take a different olpc.fth file for booting off of usb. Make the obvious changes….

  7. gNewSense

    I’d like to run gNewSense on the XO-1, but I’d prefer to use the gNewSense kernel as all of the non-free parts have been removed.

    Is there a way to make the gNewSense kernel run on the OLPC?


  8. jimson

    I don’t suppose you’ve noticed that suspending and resuming with any of these breaks. A half-assed install like this is useless.

  9. Morad

    Looks easy enough, but I am getting error messages, perhaps I am doing something wrong? I want to create an Intrepid system and followed the instructions (first installed the SD card from the Intrepid alpha 4 live cd, then booted on an Ubuntu 8.04 system to apply your patch). However when I execute the sd_fixup command, after checking out the files, error messages start to appear, as follows:

    Checking out files: 100% (8671/8671), done.
    HEAD is now at cc866cf… OLPC: psmouse: don’t race with irq/resync handlers when recalibrating
    make: Entering directory `/home/morad/XO-alt-distro/build/kernel’
    HOSTCC scripts/basic/fixdep
    scripts/basic/fixdep.c:107:23: error: sys/types.h: No such file or directory
    … (many more error messages, ends with make kerner error 512)

  10. Douglas Goodall

    I bought the SD card from On-Disk. I had no joy until I tried booting up the normal sugar environment. Then I ran su to become the root. I then created a /security directory on the SDcard and put the developer key there. Booting worked a little better after that. Still everything seems very unstable and very sluggish. The system crashed (locks up) a lot at various random times and places. In my opinion, this is unstable and unusable as things are today. I understand that SD cards cost money and that is why On-Disk is selling these things, but as a product the system is not usable and paying cash for something this unstable seems wrong to me. It would have made a lot more sense to have sold SD cards of the right specification and made software available for download with utilities to init the SDcard properly for booting. I have only managed to boot the system once and it crashed after I configured the wifi. I have been unable to get back to that place in the subsequent 4 hours. It looks to me like the only valuable thing I have learned so far is to make the directory and put the key there so booting starts at all. Aside from that I wish I had better news.

  11. Daniel Drake Post author

    Which OnDisk product are you referring to? I only had decent results with SanDisk cards, and I doubt OnDisk are using my process for installing Fedora. Perhaps you should try it before shooting it down. :)
    FWIW, I survived off this setup for about a month in Ethiopia when my main laptop died. Very satisfactory results from a low spec system, but room for improvement, as always.

Comments are closed.