Asus EeePC: Installing Ubuntu 8.04 Desktop on a 16 GB SDHC card


I’m not quite done with all the install and optimization steps, but I thought I start this entry so that I won’t forget what I’ve done. There are quite a number of steps involved. I’ve installed it on a Asus 701 4GB model using a 16 GB class 6 SDHC card. Hopefully this will help others as well. You will need a physical copy of the Ubuntu 8.04 CD, so download it and burn it with your favorite burning software. You will also need a USB DVD/CD reader, I used a old plextor external drive I had lying around. So here we go:

  1. Get the USB DVD hooked up to one of the USB ports on the Eee, doesn’t matter which.
  2. Stick the boot CD in the DVD and turn everything on.
  3. Press ESC on the Eee during BIOS load to turn on custom boot screen.
  4. On the screen that follows choose your USB DVD drive and let Ubuntu boot.
  5. Get Ubuntu installed. Be mindful of the following:
    1. I did a custom partition scheme on /dev/sdc
    2. I created three partitions:
      1. /dev/sdc1 (8000 MB) is formatted ext3 and mounted on /
      2. /dev/sdc2 (8000 MB) is formatted ext3 and is not mounted on anything
      3. /dev/sdc3 (~430 MB) is formatted swap and is for swap
    3. IMPORTANT: On the screen that says “Ready to Install” you HAVE TO click the advanced… button and change the location of the bootloader to /dev/sdc (which is the SDHC card).
  6. Go and get coffee and/or have lunch/dinner. Writing to SD memory card is slow.
  7. IMPORTANT: When prompted to Reboot at the end….DON’T. Press Ctrl-Alt-F2 to switch to one of the virtual terminals (you can use Ctrl-Alt-F6 to get back) and sudo to change the file /boot/grub/menu.lst so that all lines refering to (hd1,0) or (hd2,0) are changed to (hd0,0). Save the file.
  8. IMPORTANT: sudo and edit the file /etc/rc.local and add this before “exit 0”: hal-set-property --udi $(hal-device | grep info.udi | grep storage_serial_USB2 | sed -e 's/.*org/\/org/' -e "s/'.*//") --key storage.removable --bool falseThis will prevent gnome-keyring to segfault. This happens when the Root device is on a removable media. Without this your gnome session will hang after the first reboot.
  9. Now you can switch back to graphical install screen (Ctrl-Alt-F6) and tell the installer to reboot.
  10. Hopefully you did not screw anything up :-) and you’ll get to the gnome desktop.
  11. More than likely you will get a dumb Battery error. Ignore it and move on. If your Network card is not working turn the machine off and do this:
    1. Disconnect the power cable
    2. Take off the Battery
    3. Put the Battery back on
    4. Plugin the power cable
    5. Boot up the machine and make sure you press ESC to get to boot menu…..choose Ubuntu.
  12. Hopefully now the Network is working (Wireless will not be working at this point….later).
  13. Do all the updates.
  14. Reboot.
  15. Note that ubuntu does not shut down the Eee properly. Shutting down your Eee will make the screen go entirely blank, but does not cut the power, and you will have to force it to fully shutdown by holding the power button.

    Sudo and add the following line:rmmod snd-hda-intelto the end of the /etc/default/halt script in order to make the Eee shutdown completely.

  16. Sudo and edit /etc/init.d/rc file, look for CONCURRENCY=none and change it to:
    CONCURRENCY=shellConcurrent boot allows Ubuntu to take full advantage of dual-core processors, as well as processors that with hyperthread or multithread, e.g. Pentium III or higher.
  17. To reduce drive writes sudo and set the ‘noatime’ or ‘relatime’ mount options in the /etc/fstab file. Look for the ‘defaults’ section and add ‘defaults,noatime’.
    UUID=57480a3f-e7db-4a5e-9fca-7df45f5a7d9d / ext2 defaults,noatime,errors=remount-ro 0 1
  18. To further reduce drive writes sudo and put data that is not needed on a tmpfs, which is written to memory. Below is an example:
    tmpfs /var/log tmpfs defaults 0 0
    tmpfs /tmp tmpfs defaults 0 0
    tmpfs /var/tmp tmpfs defaults 0 0
    tmpfs /var/log/apt tmpfs defaults 0 0

    You will lose the data in these areas after a reboot. Data in /tmp is not a big deal, though you may want logs longer than that.
  19. If you did create a swap partition and want to make sure the EeePC does not use it, you can sudo and add the following line to the end of the /etc/sysctl.conf file:
    vm.swappiness=0
  20. You can also have a look at the AUFS (Another Union File System) instructions that will make your SDHC card read only (with options to unlock it from grub menu). If you choose this option you probably want to skip step 18 (or undo it by deleting the appropriate lines in /etc/fstab).
  21. Download this superscript into your account and change it’s permissions to execute it as regular user (The script will sudo when needed).
    wget http://eee.ricey.co.uk/files/eee/RiceeeyTweak.sh
    chmod 755 ./RiceeeyTweak.sh
    ./RiceeeyTweak.sh
    DO NOT USE ON EEEPC900/901. Hopefully the site won’t go down but just in case it does here is the content of the script (use at your own risk):
    #!/bin/sh
    echo "************************************"
    echo "*** Ubuntu 8.04 LTS RiceeeyTweak ***"
    echo "*** version 0.5 ***"
    echo "*** eee.ricey.co.uk ***"
    echo "************************************"
    echo "thanks to http://www.x2on.de"
    echo "thanks to http://ubuntu-eee.tuxfamily.org/"
    echo "thanks to http://code.google.com/p/eee-osd/"
    echo "thanks to http://wiki.eeeuser.com"
    echo "thanks to Bombela"
    echo "************************************"
    echo "** Gnome settings"
    echo "* Setting font sizes"
    gconftool-2 --set /apps/nautilus/preferences/desktop_font --type string "Sans 8"
    gconftool-2 --set /desktop/gnome/interface/document_font_name --type string "Sans 8"
    gconftool-2 --set /desktop/gnome/interface/font_name --type string "Sans 8"
    gconftool-2 --set /apps/metacity/general/titlebar_font --type string "Sans Bold 8"
    gconftool-2 --set /desktop/gnome/interface/monospace_font_name --type string "Monospace 8"
    echo "* Smaller toolbars icons only"
    gconftool-2 --set /desktop/gnome/interface/toolbar_style --type string "icons"
    echo "* Disabling UI sounds"
    gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool 0
    echo "* Fixing mute key"
    gconftool-2 --set /desktop/gnome/sound/default_mixer_tracks --type list --list-type string "[PCM]"
    echo "* Fullscreen with -F11"
    gconftool-2 --set /apps/metacity/window_keybindings/toggle_fullscreen --type string "F11"
    echo "* Setting suspend when closing lid, blank screen"
    gconftool-2 --set /apps/gnome-power-manager/actions/sleep_type_battery --type string "suspend"
    gconftool-2 --set /apps/gnome-power-manager/actions/sleep_type_ac --type string "suspend"
    gconftool-2 --set /apps/gnome-power-manager/buttons/lid_battery --type string "suspend"
    gconftool-2 --set /apps/gnome-power-manager/buttons/lid_ac --type string "blank"
    gconftool-2 --set /apps/gnome-power-manager/timeout/sleep_computer_ac --type int 0
    gconftool-2 --set /apps/gnome-power-manager/timeout/sleep_computer_battery --type int 300
    gconftool-2 --set /apps/gnome-power-manager/timeout/sleep_display_ac --type int 300
    gconftool-2 --set /apps/gnome-power-manager/timeout/sleep_display_battery --type int 60
    echo "* Don't display battery warning"
    gconftool-2 --set /apps/gnome-power-manager/notify/low_capacity --type bool 0
    echo "* Unconstraining windows to the top of the screen"
    gconftool-2 --type bool --set /apps/compiz/plugins/move/allscreens/options/constrain_y 0
    echo "Gnome settings done."
    echo "** Installing ACPI modules"
    sudo apt-get update
    sudo apt-get install -y -f build-essential module-assistant eeepc-acpi-source --force-yes
    sudo m-a a-i eeepc-acpi
    echo "Done"
    echo "** Building Eee Overclocking Driver"
    wget "http://eeepc-linux.googlecode.com/files/eeepc-linux-0.2.tar.gz"
    tar xvzf eeepc-linux-0.2.tar.gz
    cd eeepc-linux/module
    make
    sudo cp eee.ko /lib/modules/$(uname -r)/kernel/
    cd ../../
    echo "Done"
    echo "** Installing Modules and Driver"
    echo "*Unblacklisting i2c-i801 module"
    sed 's/blacklist i2c_i801/#blacklist i2c_i801/' blacklist.tmp
    sudo mv blacklist.tmp /etc/modprobe.d/blacklist
    sudo chown root:root /etc/modprobe.d/blacklist
    echo "Done"
    echo "*Updating /etc/modules"
    sudo cp /etc/modules modules.tmp
    sudo chmod 777 modules.tmp
    echo "eeepc-acpi" >> modules.tmp
    echo "i2c-i801" >> modules.tmp
    echo "eee" >> modules.tmp
    sudo chmod 644 modules.tmp
    sudo mv modules.tmp /etc/modules
    sudo chown root:root /etc/modules
    echo "Done"
    echo "**Installing Overclock Utilities"
    wget "http://eee.ricey.co.uk/files/eee/oc.sh"
    wget "http://eee.ricey.co.uk/files/eee/ocn.py"
    wget "http://eee.ricey.co.uk/files/eee/Overclock.desktop"
    sudo mv oc.sh /usr/bin
    sudo chown root:root /usr/bin/oc.sh
    sudo chmod +x /usr/bin/oc.sh
    sudo mv ocn.py /usr/bin
    sudo chown root:root /usr/bin/ocn.py
    sudo chmod +x /usr/bin/ocn.py
    mv Overclock.desktop ~/Desktop
    echo "Done"
    echo "** Installing OSD"
    wget http://eee-osd.googlecode.com/files/eee-osd_2.1-0eeeXubuntu1_i386.deb
    sudo dpkg -i eee-osd_2.1-0eeeXubuntu1_i386.deb
    echo "Done"
    echo "** Configuring Sound"
    echo "options snd-hda-intel model=3stack-dig" > snd-hda-intel.tmp
    sudo mv snd-hda-intel.tmp /etc/modprobe.d/snd-hda-intel
    sudo chown root:root /etc/modprobe.d/snd-hda-intel
    echo "Done"
    echo "** Fixing Shutdown Problem"
    sudo sed 's/#! \/bin\/sh/#! \/bin\/sh\n\n##Riceeey Eee shutdown fix\n\nrmmod snd-hda-intel\n/' halt.tmp
    sudo mv halt.tmp /etc/init.d/halt
    sudo chown root:root /etc/init.d/halt
    sudo chmod +x /etc/init.d/halt
    echo "Done"
    echo "** Adjusting Disk atime"
    sudo sed 's/relatime/noatime/' fstab.tmp
    sudo mv fstab.tmp /etc/fstab
    sudo chown root:root /etc/fstab
    echo "Done"
    echo "** Installing WLAN"
    wget 'http://snapshots.madwifi.org/madwifi-hal-0.10.5.6/madwifi-hal-0.10.5.6-r3835-20080801.tar.gz'
    tar zxf madwifi-hal-0.10.5.6-r3835-20080801.tar.gz
    cd madwifi-hal-0.10.5.6-r3835-20080801
    make clean
    make
    sudo make install
    cd ../
    echo "Done"
    echo "All relevant drivers are now installed - hopefully!"
    echo "If you have any troubles please refer back to eee.ricey.co.uk"
    echo "Please reboot now"
  22. Well, reboot and marvel at your handywork a bit.
  23. To squeeze even a bit more from the boot process sudo and edit /boot/grub/menu.lst and add the following to the end of the kernel lines (after the “quiet” and “splash” options) for Ubuntu:
    clocksource=hpet
,

6 responses to “Asus EeePC: Installing Ubuntu 8.04 Desktop on a 16 GB SDHC card”

  1. I thought about putting Ubuntu on my eeepc. But then I decided that it would be simpler and quicker just to install gnome. To do this I just added the extra repositories as shown on the eeeuser wiki and then did “sudo apt-get install gnome-core”. I also changed the asus startup script to start gnome insted of the mixture of xfce&the asus launcher that it originally ran. Now my system looks and feels like it is running ubuntu but is actually still runing xandros. This means that all the hardware just works, I still have access to the software that came with my eepc and all the battery/speaker/wireless/cam stuff works properly. Sure it may not actually be Ubuntu it sure feels like Ubuntu and it was alot less work. The great thing about Linux is that different flavours share alot of the same software.

  2. Thx heaps! To install on a memory stick, identify the hal-device and change to match in the hal-set-property line. For example, I used an Imation Nano 8G, and the matching identifier meant replacing ‘USB2’ with ‘Imation_Nano’ and it booted. Now for the rest…

  3. Great post. I have installed eeebuntu and i am very happy with it. Great tweaks!!!

  4. Hi,
    how to safely remove evolution from my eeepc? I only use gmail and i nedd more space on ssd. Thanks.

  5. Hi Marco,

    You can use apt-get (obviously), aptitude (text graphics) or any number of other installers that are out there for Ubuntu. Do a google search for graphical Ubuntu (un)installer. Of course I would try and use apt-get by doing “man apt-get” which should tell you all about the details.

    TTYL
    Many

Leave a Reply