Karmic HOWTO

Installing Crunchbang

Gather the necessary components:

Next, install a command line system:

  1. Follow the steps detailed at unetbootin for creating a bootable USB flash drive using the mini.iso downloaded earlier.
  2. Plug your USB drive into your Aspire One, plug in your ethernet cable and boot.
  3. Press F12 when the BIOS screen comes up and select your flash drive.
  4. Select “Command-line expert install’.
  5. Follow the installation prompts. I deviated from the defaults in partitioning and when asked about security updates. For the former, I created 5GB “/” and 11GB “/home” ext2 partitions with the “noatime” option ticked. (If your AAO does not have an SSD then you should create a swap partition and use a more advanced file system like the new Ubuntu default ext4.) For the latter, I chose to let the system automatically install security updates.

Now we can boot into our new system and install Crunchbang Linux. Since Crunchbang 9.10.01 is still under development, we will use the 9.04.01 installation script.

wget http://crunchbanglinux.org/build-scripts/crunchbang-installer-9.04.01.sh
sudo sh crunchbang-installer-9.04.01.sh

Type your password, answer “y” to install Crunchbang Linux, select your installation type (“desktop” or “lite”) and answer “y” when prompted about installing the medibuntu keyring. When the installation in nearly complete you will be asked whether or not to use “network-manager” to manage your internet connections. I selected “n” because I prefer to use “wicd”. If you would like to install “wicd”:

sudo aptitude install wicd

Congratulations! You now have Crunchbang Linux installed!

SSD optimization

Since I have an SSD, I’d like to minimize writes to it as well as speed up its performance somewhat.

Optimizing the performance of your SSD under Karmic is slightly different than under Jaunty. First, it no longer seems to be possible to mount /var/tmp as tmpfs. Second “unionfs” seems to have been dropped in favor of “aufs” (at least my unionfs entries in /etc/fstab no longer seem to work). So the first step is to put /tmp into RAM. To do so add:

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

to the end of /etc/fstab.

Next, I also want to put /var/log and /var/cache into RAM. To do so, I now use “aufs” to unite /tmp and /var/log and to unite /tmp and /var/cache. The advantage of using “aufs” is that the existing directory structure is preserved so that it does not need to be recreated using a script. I also unite /tmp and /var/tmp since tmpfs no longer appears to be an option. To make these changes, add:

none /var/tmp aufs noatime,br:/tmp=rw:/var/tmp=ro 0 0
none /var/log aufs noatime,br:/tmp=rw:/var/log=ro 0 0
none /var/cache aufs noatime,br:/tmp=rw:/var/cache=ro 0 0

to the end of /etc/fstab.

The next SSD optimization I applied is to add either “elevator=noop” or “elevator=deadline” to the line that starts “GRUB_CMDLINE_LINUX_DEFAULT” of /etc/default/grub, e.g.,

GRUB_CMDLINE_LINUX_DEFAULT=”elevator=noop quiet splash”

Now run ’sudo update-grub2’. The various ‘elevator’ kernel options specify the order in which writes are made to a disk. This is important for traditional hard drives where the write head moves along the platter and writing sequentially according to the direction the write head is moving will improve performance. But with an SSD, there is no write head so that specifying a particular order for writes can actually degrade performance. The ‘elevator=noop’ kernel option disables this, improving SSD speed.

Firefox on an SSD

Firefox by default caches data to the hard drive. This is no good for an SSD but it can be fixed by telling Firefox to cache data in /tmp. To do so, open Firefox and type ‘about:config’ in the browser window. Click ‘I’ll be careful, I promise!’ and then create (or edit) the key ‘browser.cache.disk.parent_directory’ and give it the value ‘/tmp’.

Fan speed management

Fan management by the Aspire One’s bios sucks. To fix this, use the acerhdf kernel module that ships with Karmic. While it is automatically loaded at boot, it is not enabled. To enable it type:

sudo -s
echo -n “enabled” > /sys/class/thermal/thermal_zone0/mode
^D

To automatically enable it at boot, create “/etc/modprobe.d/acerhdf.conf” and add the line:

options acerhdf kernelmode=1

You can also change the default parameters by replacing “kernelmode=1″ with one or more of “interval=<num1>”, “fanon=<num2>” and “fanoff=<num3>” where <num1> is the frequency (in seconds) with which  the temperature should be checked (default=10), <num2> is the temperature (in Celsius) at which the fan should come on (default=67) and <num3> is the temperature at which the fan should shut off (default=62). Unless you know what you are doing, leave these on the default as poorly chosen parameters can seriously damage your computer.

Wireless

Wireless and the wireless LED appear to work out-of-the-box.

Sound

Sound, including the built-in mic, seem to work with Skype.

Card readers

I have only been able to test the card readers using an SD card since that is all I have.

The left hand card reader is hot-swapable out-of-the-box. The right hand card reader is hot-swapable after adding “pciehp.pciehp_force=1″ to the line reading “GRUB_CMDLINE_LINUX_DEFAULT”. If you added the “elevator=noop” line then it should now read

GRUB_CMDLINE_LINUX_DEFAULT=”pciehp.pciehp_force=1 elevator=noop quiet splash”

Now run:

sudo update-grub2

to make the changes take effect.

Update 11/12/09: Reader phh points out that SDHC cards cause problems with suspend which can be fixed with a suspend script (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/424877).

Fixes for Crunchbang Linux

Since Crunchbang 9.10.01 does not have an install script yet, there are a couple of issues that need to be tweaked. First of all, the “openbox-logout” script does not work with gdm 2.28.0. Instead I followed the instructions here. In order to minimize the number of files that would need to be modified, I put urukrama’s script in /usr/bin/openbox-logout  (you can preserve the original if you wish with “sudo cp /usr/bin/openbox-logout /usr/bin/openbox-logout-orig”).

The second issue is that usplash seems to throw an error. At this point I do not have a fix for it but the system is fully functional. I will update this when I have a fix.

Reboot into your new system!

Google chrome

I love my AAO but let’s face it. The AAO is no powerhouse and at times firefox can be pretty slow on it. On my AAO, google-chrome-beta is now my default web browser. While it is lacking in nice extensions, it is very snappy on my AAO. To install it, go here and accept Google’s terms to download the package. Open a terminal window and

sudo dpkg -i /path/to/google-chrome-unstable_current_i386.deb

You can now run Google Chrome by typing “google-chrome &”. At the moment, there does not appear to be any way to direct Google Chrome to use /tmp for it’s caching.

Update 12/16/09: The cache is in “~/.cache/google-chrome” and can be put in /tmp the same way we put /var/log and /var/cache in /tmp. It’s a little kludgie but it works. To do so, add:

none /home/tct/.cache/google-chrome aufs noatime,br:/tmp=rw:/home/<username>/.cache/google-chrome=ro 0 0

to the end of /etc/fstab.

To make google-chrome your default web browser you need to edit two files. Type “gedit .config/openbox/menu.xml” and change every instance of “firefox” to “google-chrome”. Do the same for “.config/openbox/rc.xml”. You will need to restart openbox for these changes to take effect.

Concluding remarks

Please comment if you have questions or problems. I plan to update this HOWTO as Karmic and Crunchbang 9.10.01 develop.

/path/to/

23 Responses to “Karmic HOWTO”

  1. So I have found that as far as the usplash error. You would have to change the source (can be found on crunchbang PPA from what I read)and compile yourself. But if you want to just get rid of the error in the meantime till they fix the bug you can just change the theme. At least that worked for me.

  2. [...] Continued here: Karmic HOWTO « Acer Aspire One ZG5 [...]

    • Card reader is still not hot pluggable. The shortest way without rebooting aao 110 is to insert the RHS card, suspend and bring back out of suspend. The only time the card reader was hot pluggable was with Intrepid 8.10. Jaunty and Karmic has no pciehp module available. With intrpid the module could be downloaded to make the reader hot pluggable.

  3. Fan code – I keep getting this …

    shaun@shaun-laptop:~$ sudo -s
    root@shaun-laptop:~# echo -n “enabled” > /sys/class/thermal/thermal_zone0/mode
    bash: /sys/class/thermal/thermal_zone0/mode: No such file or directory
    root@shaun-laptop:~# ^D

    I tried the code fix before and it slightly different than yours still no luck..what i doing wrong?

    thanks

    • aspireonezg5 Says:

      It appears that acerhdf has not loaded. Type “lsmod | grep acerhdf” to confirm. If it is not loaded, it will return nothing. If this is the case, type “sudo modprobe acerhdf” will load it and then you should be able to follow the steps you did before.

      • oops now got this..
        shaun@shaun-laptop:~$ sudo modprobe acerhdf
        FATAL: Error inserting acerhdf (/lib/modules/2.6.31-14-generic/kernel/drivers/misc/acerhdf.ko): Unknown symbol in module, or unknown parameter (see dmesg)
        shaun@shaun-laptop:~$

        I tried inseritng manually via older download versions and it didnt work and so i removed could I have conflicted there? Or removed by mistake?

        can I get acerfand module in karmic without complete reinstall (I upgraded over previous acerfand too..could be problem?)

      • aspireonezg5 Says:

        What do you get if you type:

        ls /lib/modules/2.6.31-14-generic/kernel/drivers/platform/x86/acerhdf.ko

        If this gives you an error then you’ve deleted the acerhdf module that shipped with the kernel and you can reinstall the module by forcing a reinstallation of the kernel:

        sudo aptitude reinstall linux-image-2.6.31-14-generic

        If the first command does not give you an error then the acerhdf module that shipped with Karmic is still there. If so then delete the module you compiled yourself:

        sudo rm /lib/modules/2.6.31-14-generic/kernel/drivers/misc/acerhdf.ko

        and then try

        sudo modprobe acerhdf

      • shaun belcher Says:

        tried everything and…cannot insert..

        shaun@shaun-laptop:~$ sudo rm /lib/modules/2.6.31-14-generic/kernel/drivers/misc/acerhdf.ko
        rm: cannot remove `/lib/modules/2.6.31-14-generic/kernel/drivers/misc/acerhdf.ko’: No such file or directory
        shaun@shaun-laptop:~$ ls /lib/modules/2.6.31-14-generic/kernel/drivers/platform/x86/acerhdf.ko
        /lib/modules/2.6.31-14-generic/kernel/drivers/platform/x86/acerhdf.ko
        shaun@shaun-laptop:~$ sudo modprobe acerhdf
        FATAL: Error inserting acerhdf (/lib/modules/2.6.31-14-generic/kernel/drivers/platform/x86/acerhdf.ko): No such device
        shaun@shaun-laptop:~$ lsmod | grep acerhdf
        shaun@shaun-laptop:~$ sudo modprobe acerhdf
        FATAL: Error inserting acerhdf (/lib/modules/2.6.31-14-generic/kernel/drivers/platform/x86/acerhdf.ko): No such device
        shaun@shaun-laptop:~$

        apologies not a linux expert as you can see

      • aspireonezg5 Says:

        Ok, now I’m confused. Your error message is now saying “No such device”. This may seem like a stupid question but is your laptop an Acer Aspire One?

      • shaun belcher Says:

        yes aspire one AOA 150 ab ZG5

      • shaun belcher Says:

        I had acerfand working in 9.04 but now nothing seems to work :-(

      • aspireonezg5 Says:

        You might turn to the ubuntuforums for some more expert help. Or you could try reinstalling. Sorry not to be of more help here.

  4. Hi, I’ve just installed Ubuntu 9.10 netbook remix on my AAO-110 with a 32GB Transcend IDE SSD. Worked great under 9.04 but I wanted the improved intel video driver, kernel, and supposed SSD optimizations and faster boot time.

    I first tried an in-place upgrade which took forever and was botched (WINE wouldn’t upgrade, it spit up, and I was left in a bad place). I then repartitioned the drive and started a clean 9.10 install.

    Boot times under 9.10 are staggeringly longer with 9.10 than 9.04 (9.04: 30 sec, 9.10 2-3 minutes). After much wrangling, it seems the delay is mounting and remounting (rw) the boot drive. Same delay happens when gparted scans the drives for partitions or any other op where drives are mounted/remounted.

    WTF? I’ve heard that mountall may be broken in release 9.10 but I don’t know where/how to get bleeding edge releases of that tool.

    Or maybe there’s something else. Anybody else seeing this issue?!
    HELP!

    —DanQ989

  5. Normally I leave an 8GB SDHC in the left memory card slot. If I try to suspend, the machine locks up. If I unmount the card before suspending it suspends and restores just fine.

    Just something I just noticed on the aao that I missed on my mini 9 on which I did most of the 9.10 beta testing :(

    Thanks for the SSD friendly tips.

  6. Procedural Texture Says:

    When I run the command “sudo update-grub2″, I get the following error

    “/etc/default/grub: 9: quiet: not found”

    I’m trying your tweaks on Karmic 9.10 Netbook Remix (Release Candidate) on my AAO-ZG5.

    • aspireonezg5 Says:

      I would guess that you must have a typo in the line beginning GRUB_CMDLINE_LINUX_DEFAULT of your /etc/default/grub file.

      • Interesting because I made the grub changes suggested and it all seemed OK – that is until there was a kernel update today when the update fell over with the error message above. Edited out the changes and all was OK. Have not sorted grub2 yet – don’t suppose we need a comma in there?

Leave a Reply