Talk:Ubuntu Lucid on OLPC XO: Difference between revisions

From OLPC
Jump to navigation Jump to search
(→‎audio fix: new section)
m (→‎No space!: new section)
Line 225: Line 225:


cheers! :)
cheers! :)

== 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.

thanks

Revision as of 10:40, 17 June 2010

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".

 depmod 2.6.31_xo1-xxxxxxx
 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)

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)

Xubuntu

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)

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?

yuansun@comcast.net 6/7/2010

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?

--- Rao

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)

cheers! :)

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.

thanks