Talk:Ubuntu Lucid on OLPC XO
 It works
It works!! Just following the instructions, more or less, gave me a running system.
A few details:
There need to be a few more "sudo" commands. I am not sure if it is needed for depmod, but it is certainly needed for the following "ln".
ln -s /lib/firmware/libertas/usb8388_v9.bin /lib/firmware/usb8388.bin
I used qemu, using the USB device as HDA, and with additional memory -- when I tried to install everything using 256MB of RAM, the install would always crash. Here are my two qemu commands, the first one for booting from the cdrom (to be done initially), the second for booting from the hard disk. Pay attention to the stuff in parentheses -- you really do need to check which device your usb drive is on (I did it with
ls -l /dev/disk/by-id/
you may have other methods), and the tftp option was needed to load the develop.sig, which I had on a different device:
sudo qemu -hda /dev/sdc (check) -cdrom ubuntu-10.04-beta2-desktop-i386.iso -m 512 -boot d -net nic -net user sudo qemu -hda /dev/sdc (check) -m 512 -boot c -net nic -net user(,tftp=/home/user/olpc)
to use these, remove the "(check)" (only after checking! :-), and, if you need to transfer files from the host, remove the parentheses around the tftp option, e.g. -net user,tftp=/home/foo/xyz, where the path indicates the root of the tree accessible with the tftp command. Once you have booted ubuntu, you also need to
sudo apt-get install tftp
for this to work.
Finally, make sure your device really does have a label OLPCRoot. I don't think that is emphasized enough in the instructions.
With these considerations, the install actually went very smoothly. I am just afraid my 256MB OLPC may be too small for ubuntu lucid.
Two things that don't work: the wireless network and the battery icon. Battery is not such a big deal. For the wireless network, I may need a new driver, because no wireless networks are detected.
I hope this helps others!
Edo 19:05, 24 April 2010 (UTC)
- Thanks for your input! I added the missing sudos, and tried to emphasize the disk label issue a little more.
- As for the wireless, I had the same problem until i figured out the firmware issue. The driver should already be there. What does "dmesg | grep 8388" say?
- I'm aware that the battery indicator doesn't work; I'm not sure that the XO provides this information by ACPI. In my previous Ubuntu system, I wrote a shellscript that dug out the battery percentage from somewhere in /proc, and displayed it in a custom text-based taskbar widget. Other similar things, such as screen brightness and mapping of the directional/game buttons also need some work.
- I'll look into this when I revise the instructions for the stable 10.04 version, which will be released soon.
- -- Maxxflow 19:53, 24 April 2010 (UTC)
Thank you for your quick response!
"dmesg | grep 8388":
[ 3.029396] usb 1-1: firmware: requesting usb8388.bin [ 3.072286] usb8xxx: firmware usb8388.bin not found
The link in /lib/firmware seems to be correct. There is nothing under /lib/modules that matches 8388 (I used "find"). FYI, here is a list of loaded modules (from lsmod):
Module Size Used by sg 18184 0 usb_storage 21392 1 usb_libusual 7228 1 usb_storage mousedev 6600 0 usb8xxx 10468 0 libertas 116232 1 usb8xxx lib80211 2272 1 libertas ohci_hcd 14992 0 psmouse 16448 0 serio_raw 2520 0 ehci_hcd 23556 0 usbcore 83740 6 usb_storage,usb_libusual,usb8xxx,ohci_hcd,ehci_h cd cs5535_gpio 1552 0 cafe_ccic 12272 0 ecb 1012 0 aes_i586 6568 0 aes_generic 25428 1 aes_i586
uname -a gives 2.6.31_xo1-20100422.1905.olpc.351d67a #1 PREEMPT (hand-typed, so may have errors).
Does this give enough clues? I even tried rebooting under qemu and "sudo apt-get install libertas-firmware", and that did not fix it.
Edo 21:25, 24 April 2010 (UTC)
- Hmm. Try "sudo ln -s /lib/firmware/libertas/usb8388_v9.bin /lib/firmware/libertas/usb8388.bin". If that doesn't work, try doing the symlinking in the initrd's firmware directory as well. Use the instructions on how to unpack and re-pack the initrd from my installation guide. Tell me if you need more instructions on this!
- -- Maxxflow 21:36, 24 April 2010 (UTC)
I repacked the initrd, adding the command
cp -r /lib/firmware/libertas lib/firmware/
after copying the modules but before constructing /boot/initrd.img-xo.
Still no success. Same dmesg, no device.
Edo 22:39, 24 April 2010 (UTC)
Eureka! (meaning "I found it!")
the usb8388.bin has to be under lib/firmware in the initrd, not (just?) under lib/firmware/libertas/
now the wireless is working!
Edo 23:06, 24 April 2010 (UTC)
- That's odd. I just repacked my initrd *without* any of those symlinks to confirm this issue. I now only have /lib/firmware/usb8388.bin in my root. But it still works. When I delete this one symlink that I now have, I get the symptoms. I'm doing a system upgrade now, we'll see what happens after that. What kernel version are you using? (date, id and everything)
- I noticed that your module is loaded very early in the boot process, around time "3" according to your dmesg, as compared to around 26 for me. It definitely seems like your system loads the module in the initrd, while my system loads it later. I'll change the instructions to include the symlink in the initrd for now.
- -- Maxxflow 23:36, 24 April 2010 (UTC)
Is anyone else having a problem with sysvinit? I get the following error on boot: init: invalid option: --init. I read that this is because in Ubuntu 9.04 and higher sysvinit was replaced with upstart. I tried installing sysvinit, but it isn't even in the repository as of 9.10. I downloaded it from 9.04, and when I went to install it, apt wanted to remove more than just upstart, more like half of my installation. Any ideas? Thanks, --catbert62 15:13, 10 August 2010 (UTC)
 Some tips
Some tips as I worked:
- You may do
sudo apt-get install xserver-xorg-video-geode xserver-xorg-video-vesa
before installing the desktop environment (no matter ubuntu-netbook, or lubuntu-desktop which I used), so you don't need to install all other display card drivers you don't need, except the Geode and VESA drivers, for starting X in XO-1 and the virtual machine respectively.
- In addition to create /boot/olpc.fth by hand, you may find the boot script as used on DebXO useful, that you don't need to hard-code the device (u:\ or sd:\) you will boot Ubuntu from.
- Techniques as used by some eeePC users to reduce unnecessary flash writes, e.g. mounting /tmp as tmpfs, specifying noatime option on mounting the root partition, may also be useful to us.
This is how my /etc/fstab looks like (I used lucid as my volume label):
LABEL=lucid / ext3 defaults,noatime 1 1 tmpfs /tmp tmpfs defaults 0 0 tmpfs /var/log tmpfs defaults 0 0 none /ofw promfs defaults 0 0
It is safe to skip mounting /ofw unless you need to, and safe to skip mounting /var/log if you want to keep the logs.
--airwave209gt 08:13, 26 April 2010 (UTC)
does anyone know or use this packages for hardware support? http://packages.ubuntu.com/lucid/admin/olpc-xo1-hw
Can xubuntu be substituted for ubuntu in these instructions?
- I have not tried it, but I can't see why it shouldn't work. If you do try, please tell us how it works out for you! -- Maxxflow 23:49, 11 May 2010 (UTC)
 Updated for 10.04 stable
I have now updated the Howto for the stable version 10.04.
Also, referencing an SD card by root=mmcblk0p1 in the boot script did not seem to work (looks like it's a bug in Ubuntu's initrd), so we're now using the LABEL method for SD cards as well.
-- Maxxflow 14:33, 15 May 2010 (UTC)
Referencing SD card as root=/dev/mmcblk0p1 in the boot script and fstab works for me. --catbert62 13:29, 10 August 2010 (UTC)
 DCON Freeze fixed
It seems that I figured out the issue with the DCON remaining in freeze mode. The line "dcon-unfreeze" in the boot script seemed to do it. Just "unfreeze" didn't seem to work. Can anyone confirm this?
-- Maxxflow 01:00, 28 May 2010 (UTC)
 Lubuntu distro installed
I can confirm that these instructions worked for installing a Lubuntu 10.04 distro on a 4GB SDHC card through Virtualbox running on a Lucid desktop, with only audio not working and some video problems.
I had to disable media automounting to prevent my host Lucid desktop from mounting the card half way through the install, though, by editing the nautilus config properties through gconf-editor.
Following that I had some trouble which seemed to be associated with a corrupted filesystem (which remained corrupted after running fsck once), but I think these may have been combined/complicated by the mounting behaviour, the fact my clock battery seems to have died, and the time was 10 years out, and the fact I have a G1G1 security setup. After disabling the bootloader security, resetting the clock and fscking the sd card on the host a couple of times I got up and running.
I have wireless, and the trackpad works, though sensitive. Some video issues exist with e.g. window decorations not being repainted for some reason.
I have no audio, unfortunately, and I'm not familiar enough with alsa audio to know how to solve this problem. Mplayer stalls at 0 seconds when trying to play an MP3. 'aplay -L' simply reports 'null'. Any ideas how to begin.
Suggestions on the video repaint issue and the audio issue are welcome.
 created lucid for olpc
used vmware workstation 7 to create lucid lynx image for olpc.
8gb sdhc card connected via usb and assigned to virtual machine as /dev/sda.
when memory was reduced to 256 mb (from 1gb), the vm ran at a crawl.
does anyone know what can be turned off in order to fit/usable with 256mb ram?
- There is a bunch of system services running by default that you, depending on what you need, might be able to do without. First, go to "Startup Applications" in Gnome's "Preferences" menu. Uncheck everything that seems unnecessary, for example:
- * Bluetooth Manager
- * Check for new hardware drivers
- * Disk Notifications
- * Evolution Alarm Notifier
- * GNOME Login Sound
- * Print Queue Applet
- * PulseAudio Sound System (sound drivers don't seem to work out-of-the-box anyway)
- * Remote Desktop
- * Ubuntu One
- * Visual Assistance
- Then, open a terminal and take a look in /etc/init.d. Use "sudo update-rc.d -f <name> remove" to disable services, for example the following:
- * bluetooth
- * brltty
- * cups (unless you need printing)
- * fancontrol (no such thing in the XO ^^)
- * gdm (I think this is a bit of a resource hog - disable it if you feel adventurous and know how to write your own .xinitrc)
- * pcmciautils
- * pppd-dns
- * pulseaudio
- * saned
- * speech-dispatcher
- Ubuntu sure comes with a lot of stuff/junk preinstalled. Tell us whether this change makes a noticeable difference, and I'll include it in the article if it does any good. Good luck!
- -- Maxxflow 12:54, 8 June 2010 (UTC)
 Booting from a USB drive
I installed Ubuntu Lucid following the Howto but it seems that my HP 2000 Vectra Desktop (OS Ubuntu Lucid) cannot be booted from a USB device!
Any suggestions will be appreciated. Is it possible to partition my desktop HD and install on the new partition and in some way (dd or other) move the OS from the HD to the SD card?
- You shouldn't need to boot your desktop computer from the USB drive at all. Everything is done in the virtual machine.
- Sure, if you can't (or for some reason don't want to) use a virtualizer, you could boot the installer CD directly on your desktop computer, install Ubuntu on an empty partition, and then copy the contents to the USB/SD drive. I personally would then first partition the USB/SD drive, and then simply use "cp -a" to copy your new Ubuntu installation onto the flash drive. This way, you don't have to mess with different partition sizes and things as you would using "dd". The boot records would normally be a problem, but aren't here since the XO firmware does the booting - we don't use GRUB.
- -- Maxxflow 16:02, 8 June 2010 (UTC)
 Nice work
...Nice work. My skills are below being useful here, but I'll be tracking progress. Using Xubuntu now. w9zsj
 audio fix
thank you for an excellent install guide!
got the audio to work by doing the following...
-disable pulseaudio (system>preferences>startup apps) -remove and reinstall alsa-base and alsa-utils (i did this in xterm) -reboot -open alsamixer and uncheck mute (or click on audio icon in panel and go to to uncheck mute)
- The above instructions did not seem to have an effect for me, and did not allow me to get my audio to work. I did find what seems to be the problem, and a solution, although I'm not sure what originally causes the issue. The problem is exactly the one described here. The solution was to add my user account to the
audiogroup. I did this with the following command:
sudo usermod -a -G sound account_name
- After that, log out and log back in. The mixer now detects both the internal sound card, as well as my Logitech USB headphones. gnome-sound-recorder worked flawlessly for capturing and playing back audio. I'm going to test it with Skype and sflphone soon, but I expect results to be similarly positive. -jbeard
- jbeard, I think you meant
sudo usermod -a -G audio account_nameThis should be added to the main wiki. - Maxolasersquad
- jbeard, I think you meant
 No space!
When I ran the command, sudo apt-get upgrade
an error message appeared to the effect that there was not enough space in /var/cache/apt/archives.
This message appeared both when I used an SD card (8GB) and and 20GB USB disk drive.
Appreciate any help with this problem.
I believe this is because there is an entry in your fstab limiting the size of your /var/cache folder (probably something like 50 or 100 mb). Edit your fstab to remove this limit, and you should be good to go. --catbert62 14:22, 10 August 2010 (UTC)
 No such file or directory /boot/initrd.img-2.6.xxxxxxx.gz
Everything was fine in the process until I got to this command:
$ zcat /boot/initrd.img-2.6.xxxxxxx | cpio -idmv
I get an error saying "gzip: /boot.initrd.img-2.6.xxxxxxx.gz: No such file or directory", and then cpio squawks and says "premature end of archive". I'm obviously not a Linux guru but I can usually figure out enough to accomplish the task at hand. -- Boy412
- Based on that error message you had typed a period (.) instead of a slash (/) after boot, or you had not replaced xxxxxxx with what was truly the file name. Try again. I suggest pressing tab after typing .img so that you see what the file might be named as. There should only be one file. The squawk from cpio is expected when zcat fails to find input file. -- Quozl 00:33, 16 July 2010 (UTC)
- Doh! Thanks for catching my typo. But when I list the contents of the /boot directory I don't see any file that looks relevant. Here is the output of the directory listing:
stephen@XO:~$ cd /boot && ls -l total 31544 ... -rw-r--r-- 1 root root 115905 2010-06-11 08:53 config-2.6.32-23-generic drwxr-xr-x 3 root root 4096 2010-07-15 11:07 grub -rw-r--r-- 1 root root 7963107 2010-07-14 10:16 initrd.img-2.6.32-21-generic -rw-r--r-- 1 root root 7967693 2010-07-15 11:07 initrd.img-2.6.32-23-generic -rw-r--r-- 1 root root 160280 2010-03-23 05:37 memtest86+.bin ... stephen@XO:/boot$
- So what command (from the previous steps) would have placed the kernel image in the /boot directory? -- Boy412
- Any one of those two initrd.img* files. So the command would be:
- zcat /boot/initrd.img-2.6.32-23-generic | cpio -idmv
- (At this point in the instructions you are dealing with a kernel initialisation ramdisk, an initrd, which is a file that contains a set of kernel modules needed for the kernel to boot the rest of the operating system.) -- Quozl 23:41, 20 July 2010 (UTC)
- Hurray ... that worked just fine and I was able to proceed with the rest of the install. Thanks for the assist! -- Boy412
 XO doesn't boot from USB drive, Forth can't open disk label package
I've followed the directions and have a fully functional netbook-ubuntu install on a 4Gb USB drive that works in VirtualBox. As far as I can tell I haven't deviated from what the directions say but the XO won't boot from the USB drive. When it's plugged in and I just let it go, it ignores the USB drive and goes about booting normally.
When I boot holding the O-game button, I end up at a forth prompt. If I type "dir" at it, I get "Can't open directory" and if I type "dir u:" I get "Can't open disk label package" and then on the next line the other error. Does anyone know what I'm doing wrong? -- Micseydel (1 September 2010)
- You might not have set up the boot/olpc.fth file on the USB drive. VirtualBox doesn't need that file, but OpenFirmware does. On the other hand, "Can't open disk label package" means the USB drive doesn't contain a partition table in the correct format for OpenFirmware to use, or OpenFirmware was unable to read the partition table from the USB drive. This might be a problem with the USB drive, or you might need to update the firmware. What firmware version are you using? Try the latest version, see Firmware. Once you get the "dir u:" to work, then the boot/olpc.fth file should work ... or rather it won't work until you get the "dir u:" to work. -- Quozl 23:19, 1 September 2010 (UTC)
 Works on Kubuntu 10.04.1 Netbook Edition
As described, with the 2.6.35 kernel using VirtualBox on an 8GB SD card. Note that audio worked in this setup by adding the user to the audio group (edit /etc/group add your username to the audio line). Note that Kubuntu Netbook Edition is unusable without a swap file on a 256MB XO, so expect to have to replace the SD card if the swap wears a hole in it. -- Anonymous
- Thanks for testing. Instead of editing /etc/group with vigr, you can add your username to audio group using adduser USERNAME audio where USERNAME is your username. -- Quozl 04:07, 9 September 2010 (UTC)
 Unstable Wireless
The wifi has been extremely unstable, disassociating with the AP every 10 seconds. Also, it seems the driver will often enter a state where it is no longer recognized by network-manager. The only solution to this is to restart the machine. This has been true for kernels 7223ce6 (currently referenced on the main page), and 12d64069981699a, which is the latest in http://dev.laptop.org/~kernels/olpc-2.6.31-xo1/ Maybe there is a better kernel version to use. I've asked on OLPC News Forums to find out what kernel the official OLPC Build 850 is using: http://www.olpcnews.com/forum/index.php?topic=4867.msg32553#msg32553
- If the problem is suspected to be the kernel, then you should test with the official build to see if the problem also reproduces there. If it doesn't, then it certainly isn't the kernel. To see which kernel version was used on a particular build, read the packages file in the build downloads directory.
- You've described incorrect data, xo1-20100823.1641.1.olpc.12d64069981699a is used by os852 not os850. os850 uses xo1-20100804.1841.1.olpc.72481b500bcb92f. Neither show a disassociating problem in general. None of the recent changes relate to wireless. The wireless firmware also has not changed. Please try a complete power removal for one minute; battery and external. -- Quozl 22:24, 19 September 2010 (UTC)
 SanDisk Cruzer Power Issues
As soon as the OpenFirmware screen is gone, the flash drive powers off, (flash drive not lit) and it sits there until it drops to a BusyBox shell. I suspect that this has to do with U3, (as I don't remember if I removed it or not) which has a hidden partition that acts like a CD drive. Here is some of the output, however ordinary it is, I assume it can help:
Loading, please wait... mount: mounting none on /dev failed: No such device Begin: Loading essential drivers... ... udevadm trigger is not permitted while udev is unconfigured. Done. Begin: Running /scripts/init-premount ... Done Begin: Mounting root file system... ... Begin: Running /scripts/local-top ... Done. Gave up on waiting for root device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Check root= (did the system wait for the right device?) - Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/disk/by-label/OLPCRoot does not exist. Dropping to a shell!
Then, I recall having a similar problem with a modified version of Fedora (with gnome) that was made for the XO awhile back. It had the oddest problem, When I booted the system with the charger plugged in, it would not mount the root device. (maybe the opposite for ubuntu?)
 How was upstart worked around?
My previous attempts to use ubuntu on the olpc had required me to replace upstart by sysvinit which disappeared after 9.04 I think. The main page said this issue was resolved, but I don't see where or how.
 Adapting instructions for mac?
I would like to install ubuntu netbook remix (either 10.04 or 10.10) on my olpc xo-1. These directions look like what I would like to do, except I don't have a linux box running Virtual Box. I do have VirtualBox installed on my iMac (running mac os), however, a lot of these steps don't seem to translate. For example: $ cd ~/.VirtualBox/HardDisks $ VBoxManage internalcommands createrawvmdk -filename olpc-xo.vmdk -rawdisk /dev/sdX -register
Does anyone know how I can do the same thing on a mac?
--Infomofo 01:00, 2 March 2011 (UTC)
See where your SD card or USB drive is mounted. You should see the name of the card or drive, preceded by /dev/devXsX, where X is a number.
Unmount the card or drive:
$ sudo umount /dev/diskX
Create the virtual hard drive:
$ cd /Users/<username>/VirtualBox\ VMs $ VBoxManage internalcommands createrawvmdk -filename olpc-xo.vmdk -rawdisk /dev/diskX
Note that this is based on the default location of the "VirtualBox VMs" folder; if your location is different, then change accordingly. Also note that the "-register" option no longer exists.
When you are creating your virtual machine and you get to the part about the hard disk, choose use existing disk and navigate to the folder where you created olpc-xo.vmdk.
--Marathonjon 08:20, 24 July 2011 (UTC)
 Firmware version
I ran through the installation several times, but kept getting issues when trying to boot. I eventually updated my main olpc installation to the latest stuff, which included an update for the firmware/bootloader - and then the Ubuntu install worked perfectly. I was previously using a fairly old olpc firmware - probably at least a couple years old. So you might want to mention somewhere that a newish firmware is needed.
In any case, thanks for the instructions! Very helpful. Am now up and running on Lucid :)
- That's great. But can you tell me what version of firmware you had, and what version you updated to? I've edited the page, but it would be better for the page to show what version doesn't work. Also, can you describe what the issues were when trying to boot? --Quozl 01:39, 4 April 2011 (UTC)
 Kernel 2.6.35
Y si queremos instalar kernel 2.6.35 como seria? If i want install Kernel 2.6.35 how i do it?