DebXO: Difference between revisions
Line 151: | Line 151: | ||
=== Updating the distribution === |
=== Updating the distribution === |
||
The <tt>apt</tt> package manager command should Just Work for the majority |
The <tt>apt</tt> package manager command should Just Work for the majority |
||
of the distribution, but there are a few custom packages that are put on hold by default. This requires some extra steps. Also, the kernel package can not yet be upgraded, as power management support is not in newer kernels. The instructions below are for DebXO 0.5. |
of the distribution, but there are a few custom packages that are put on hold by default. This requires some extra steps. Also, the kernel package can not yet be upgraded, as power management support is not in newer kernels. The instructions below are for upgrading a DebXO 0.5 system to Debian Squeeze or Sid (Squeeze is recommend, of course, as Sid is unstable and could break your system). |
||
1 - First, we'll take some packages off hold: |
1 - First, we'll take some packages off hold: |
Revision as of 18:47, 17 September 2009
DebXO is a set of OS images of the Debian Linux distribution that you can run on your XO. It is maintained by Andres Salomon; bug reports should be sent to: dilinger AT queued DOT net
Latest images
The latest release (described below) can be found at http://lunge.mit.edu/~dilinger/debxo-latest . See the Installation section below for instructions on using these images.
New features/changes in DebXO 0.5
- OFW q2e30+ freezes the DCON on boot, so DebXO's olpc.fth now unfreezes it. If you upgraded your machine to q2e30 and it looked like DebXO no longer worked.. this version of DebXO will work. Alternatively, you can just edit your /boot/olpc.fth to add the line "dcon-unfreeze" before the "boot" line.
- The Sugar desktop has gotten an upgrade, from Sugar 0.81 to 0.82.
- There's a new XFCE desktop, courtesy of Erik Garrison.
- Desktops will now auto-start X. Gdm and Kdm have been dropped from the images. If you want them back, just 'apt-get remove autox' and 'apt-get install gdm' (or kdm).
New features/changes in DebXO 0.4
- Gnome improvements: the battery applet shows up properly, GUI apps that require root access (ie, the stuff in System->Administration) should launch properly despite lack of a password, auto-mounting of SD and USB keys is now enabled.
- A new geode Xorg driver (2.11) is included. This fixes font issues with a number of applications, and things simply look better. With 0.3, the default fonts in LXDE looked terrible; in 0.4, this is no longer the case. Applications like NetSurf (where font size cannot be overridden) are now usable.
- Better hardware support; the MIC LED no longer is on by default, the ALSA driver saw a bunch of updates, and the gamekeys now work. I've mapped the gamekeys to scroll on the right, and support pageup/pagedown on the left. This could change later on, depending upon feedback and what HAL ends up accepting upstream. The brightness and sound adjustment keys on the keyboard now work.
New features/changes in DebXO 0.3
- Disable LZO compression in the JFFS2 driver. This was causing machines to fail to boot after upgrading the kernel. If you're still running DebXO 0.2 on the nand, do not upgrade the kernel. Instead, reflashing is recommended.
- A new 'base' desktop has been added. This is a minimal install, with no graphics or X at all. It's good for rescue situations, or where you have a local package mirror and don't want to waste bandwidth downloading a graphical desktop image.
- Some programs (including kde and gnome's logout/reboot functions) had problems in previous releases due to lack of loopback interface (oops). Thanks to James Cameron for spotting this. 0.3 sets up 'lo' properly.
- Custom DebXO packages are put on hold; this means you can safely entery apt-get dist-upgrade without having to fear things like initramfs-tools being upgraded.
- JFFS2 images uses DOS 8.3 filenames. This is primarily to ensure that when running update-nand disk:\gnome.img using a USB flash drive that's been formatted using vfat, OFW won't complain about not being able to find the gnome.dat file. As such, the JFFS2 images are named with their desktop names — awesome.img, kde.img, etc. EXT3 images still retain the old naming scheme.
- James Cameron added a script that is capable of creating an auto-install USB key (onto nand).
- A debxo-latest symlink now points to the latest release. Please use that in wiki/doc pages for download links.
New features/changes in DebXO 0.2
- The JFFS2 images now have partition support. While this shaves a number of seconds off of the boot time, we can take better advantage of it in the future (doing things like using UBIFS). JFFS2 is well past its prime; moving away from it will help performance a lot.
- EXT3 images are available. This allows for booting off of USB and/or SD. Note that the image size I chose is 2GB, so you'll need a USB flash drive or SD card of at least that size.
- The kernel is now almost completely modular, and includes every module under the sun. For those of you with random USB hardware that wanted to use it with DebXO.. if it's in 2.6.25, it should work with DebXO.
- New desktops! DebXO 0.1 only had a Gnome desktop; this release includes options for KDE, LXDE, Sugar, Awesome and Gnome desktops. I personally run (and work on) the Gnome desktop. Holger Levsen is to thank for the Sugar and Awesome desktops. James Cameron did the work for the KDE and LXDE desktops. A huge thanks to both of them!
Known bugs
- When running DebXO off the NAND, every once in a while the machine will fail to boot (display CRC Node errors). It's not a critical error, and a reboot should fix it. It's been there all along, as some people have seen. It's still unclear whether it's a jffs2 bug or a cafe_nand bug.
- Power management has not really been worked on. It's in the roadmap for 0.5.
Installation
Prerequisites
You need a developer key to run this release! Start by jailbreaking the XO if you haven't already. Then when you reflash your machine and unplug your USB memory stick, the system will boot Debian rather than making you jump through unlocking hoops again. More details are at the Activation and developer keys page.
To install the DebXO release onto NAND flash, you will also need to be running Open Firmware release Q2E20 or later (see How to check the OS and firmware versions). If running DebXO from an SD card or USB stick, upgrading the firmware should not be necessary.
- The q2d* series do not support update-nand, and versions q2e18 and q2e19 are known to be buggy
with partitions. Firmware and instructions for upgrading are at Firmware. You'll need a developer key, or to disable security as above, merely to reflash your firmware, too.
Installation onto the XO's build-in NAND flash memory
The NAND images can be found at http://lunge.mit.edu/~dilinger/debxo-latest/images/jffs2/
To install onto the XO's flash, download the $DESKTOP.dat and $DESKTOP.img files to a USB or SD stick (where $DESKTOP is one of the various desktops - gnome, kde, lxde, sugar, or awesome). Boot into Open Firmware (make sure your XO is unlocked!), and run
update-nand disk:\$DESKTOP.img
or
update-nand sd:\$DESKTOP.img
(depending upon whether you downloaded to an SD or USB disk).
If update-nand spits out any errors, make sure you're running an appropriately up-to-date version of OFW.
Installation onto SD/USB
The ext3 images can be found at http://lunge.mit.edu/~dilinger/debxo-latest/images/ext3/
To install onto an SD or USB device, download the debxo-$DESKTOP.ext3.img.gz file (where $DESKTOP is one of the various desktops - gnome, kde, lxde, sugar, or awesome), and run
zcat debxo-$DESKTOP.ext3.img.gz > /dev/mmcblk0
or
zcat debxo-$DESKTOP.ext3.img.gz > /dev/sdX (for instance, sdb; not sdb1)
(depending upon whether you're writing to an SD or USB disk). Note that this will overwrite any data that is on the SD or USB disk.
For media smaller than 2GB
The disk images are about 2GB big, but since they are not full, you don't necessarily need to buy a new SD card if yours is smaller than 2GB.
- Prepare the device (SD or USB disk).
- Use a partition editor (e.g. parted) to set the type to 'Linux' (x83) and the label to 'DebXO', otherwise the bootscripts won't find it. (There is probably only one partition on the device, e.g. /dev/sdX1.)
- Make an ext3 filesystem, e.g. mkfs.ext3 /dev/sdX1
- Mount this partition at, say, /media/sdreal
- Mount the downloaded image.
- gunzip the image file
- Find the offset of the ext3 partition within the image file (usually 16384):
partition_start=$(parted -s "$img" "unit B" "print" | sed -ne 's/^ 1[[:space:]]\+//p' | cut -dB -f1)
- loopmount it as ext3 at, say, /media/sdloop
mount -t ext3 -o offset=$partition_start,loop $img /media/sdloop
- Copy the guts of the image onto your device.
- e.g. rsync -a /media/sdloop/ /media/sdreal/, or
- e.g. cp -pr /media/sdloop/ /media/sdreal/
- Unmount.
If the copy to succeeded completely, plug that SD card (or USB drive) into the XO as continue with the rest of this page as you would have done if you'd had a >2GB device.
Usage
By default, a user 'olpc' is created (with no password, and sudo access). Some desktops automatically start a display manager and log you in; some do not. The root password is disabled by default. This is a stock Debian Lenny system with only a few modifications, so it can obviously be tailored.
Hacking
xodist is the name of the collection of scripts that are used to produce DebXO. The git repository can be downloaded via:
git clone git://lunge.mit.edu/git/xodist
There's also a web interface to that:
http://lunge.mit.edu/cgi-bin/gitweb.cgi?p=xodist;a=summary
Help is always appreciated. The roadmap for future releases can be found here:
http://lunge.mit.edu/cgi-bin/gitweb.cgi?p=xodist;a=blob;f=TODO
Development discussions happen on IRC as well, on irc.oftc.net in #DebXO.
Updating
Updating the distribution
The apt package manager command should Just Work for the majority of the distribution, but there are a few custom packages that are put on hold by default. This requires some extra steps. Also, the kernel package can not yet be upgraded, as power management support is not in newer kernels. The instructions below are for upgrading a DebXO 0.5 system to Debian Squeeze or Sid (Squeeze is recommend, of course, as Sid is unstable and could break your system).
1 - First, we'll take some packages off hold:
echo xserver-xorg-video-geode install | sudo dpkg --set-selections echo initramfs-tools | sudo dpkg --set-selections
2 - Next, install some packages from the lenny-backports distribution
sudo mv /etc/apt/sources.list /etc/apt/sources.list.orig cp /etc/apt/sources.list sources.list echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" >> sources.list sudo mv sources.list /etc/apt/ wget -O - http://backports.org/debian/archive.key | sudo apt-key add - sudo apt-get update sudo apt-get install -t lenny-backports initramfs-tools xserver-xorg-video-geode olpc-xo1-hw sudo mv /etc/apt/sources.list.orig /etc/apt/sources.list
3 - At this point, you should be able to simply edit your /etc/apt/sources.list to use whatever distribution you'd like, apt-get update, and apt-get dist-upgrade. The packages from lenny-backports should be updated to the equivalent squeeze or sid versions without any problems.
Upgrading the kernel
As far as upgrading the kernel, it depends on how it's built. Note that /boot/olpc.fth uses /vmlinuz and /vmlinuz.old symlinks, so make sure that they're pointed to the correct image after you've upgraded. If you're building a custom kernel and everything's modular, you need to make sure the initramfs-tools hasn't been upgraded. If you're building the modules needed to boot (cafe_nand, redboot, jffs2) statically into the kernel, the initramfs-tools package can mostly be ignored.
Credits
There are a number of contributors; see http://lunge.mit.edu/cgi-bin/gitweb.cgi?p=xodist;a=summary for the list of committers. Thanks to all of them, as well as the people who've tested and provided feedback.