EeePC and Ubuntu 8.10

Ubuntu Logo

EeePC Logo

Here we go again. The last time I installed Ubuntu (or rather, Xubuntu) onto Asus’ EeePC was a bit of ordeal. This time around, things are….still an ordeal unfortunately.

First off, it seems people have a got a little fed up with Canonical and made their own kernel. (Behold the beauty of the GPL!) This kernel has all of the hardware modules the EeePC needs compiled in, including the modules for the wireless chipset (which are GPL and could be included for installation in the main distribution, but aren’t). Additionally, there’s an experimental lean version of the kernel that strips out modules that aren’t needed on the EeePC. Boot time is significantly improved, and overall performance also gets a slight boost with this kernel.

Additionally, there’s now an eee-control package available that allows you to easily change settings like WiFi on/off and performance settings from a system tray applet, and there’s been more poking around with SSD performance. The old script that was developed is no longer needed.

Things that can be easily automated:

sudo apt-key add array-apt-key.asc
echo deb intrepid eeepc >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install linux-eeepc-lean
sudo apt-get remove linux-generic linux-image-generic linux-restricted-modules-generic
echo tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 >> /etc/fstab

This will perform the following:

Grab’s cryptographic signing key for their repository.
Add the key to apt
Add’s repository to apt regardless of whether or not it already exists
Update apt’s list of packages available
Install the linux-eeepc-lean packages
Remove the old -generic packages
Add a line the /etc/fstab to put /tmp in RAM instead of on a physical disk regardless of whether or not it already exists

Things I can’t figure out how to automate in a script:

Setting ext2/ext3 partitions to use noatime

sudo nano /etc/fstab

Look at the line that contains partitions that are on the SSD. It should look something like this:

UUID=1eea26d7-6893-4779-827b-150412c94703 / ext2 relatime 0 1

Replace relatime or defaults with noatime

PLEASE NOTE: Upon upgrading (or sometime after the last install) something changed my fstab file so that the options (the part after ext2) read noatime,errors=remount-ro,relatime. This is retarded, but the net effect is that relatime should take precedent over noatime as it appears last.

This is what makes scripting this part difficult. You have to find lines that contains ext2 or ext3, remove the string relatime from the mounting options if it exists, and add noatime to the options if it doesn’t already exist. I have a script, but it ends up stripping all comments out of your fstab file and relies on the mounting function to give proceeding arguments precedence over preceding arguments. The script is as follows:
cp /etc/fstab /etc/fstab.old
expand /etc/fstab.old | tr -s ' ' | grep -v '^#' | grep -v ' reiserfs ' > /etc/
grep 'reiserfs' /etc/fstab.old > /dev/null
while [ $? -eq 0 ]
   wholeline=`grep -m1 'reiserfs' /etc/fstab.old`
   oldlinebeg=`grep -m1 'reiserfs' /etc/fstab.old | cut -d ' ' -f1-4`
   oldlineend=`grep -m1 'reiserfs' /etc/fstab.old | cut -d ' ' -f5-6`
   newline=$oldlinebeg,noatime $oldlineend
   echo $newline >> /etc/
   grep -v -m1 '$wholeline' /etc/fstab.old > /etc/fstab.old
   grep -m1 'reiserfs' /etc/fstab.old
rm /etc/fstab.old
cp /etc/fstab /etc/fstab.backup
cp /etc/ /etc/fstab
if [ $? -eq 0 ]
  rm /etc/

Setting Firefox’s cache to RAM instead of in your /home/[username] directory

Open Firefox, type about:config in the address bar, and press Enter. In an empty space on the screen, right-click and create a new String value browser.cache.disk.parent_directory and set it to /tmp

Changing the task scheduling algorithm

sudo nano /boot/grub/menu.list

Press CTRL+W to find the string # kopt. It should look something like this:

# kopt=root=UUID=1eea26d7-6893-4779-827b-150412c94703 ro

Add the option elevator=deadline so that it looks like this:

# kopt=root=UUID=1eea26d7-6893-4779-827b-150412c94703 ro elevator=deadline