A few weeks ago, I traded my Fujitsu S6240 to a friend for his Aspire One. It might seem like I got the short end of the stick but I wanted something much, much smaller than my Fujitsu for carrying on the train to and from work. My friend wanted something larger since he only uses it in his living room and occasionally carries it up to his rooftop deck.
This page relates my experience with installing Linux on an Aspire One ZG5 (A.K.A. AOA110). More specifically, my efforts to install and tweak Crunchbang Linux (an Ubuntu derivative). My sources of information included the following:
The following instructions will work for the Aspire One ZG5 and to some extent, the other Aspire One models and should be relevant for any Ubuntu derivative.
The specs of my Aspire One are:
- 8.9″, 1024×600 display
- 1.6Ghz Intel Atom CPU
- 1GB ram
- 16GB SSD
Installing Crunchbang
To start with, I started my install of Crunchbang linux 9.04.01 by first installing a command line Ubuntu system using the Jaunty minimal install iso that I flashed onto a USB stick using unetbootin. Of course you need either a wired internet connection or else a wireless connection and possibly some command-line-fu to use the mini.iso.
I created / and /home partitions using the relatively old ext2 filesystem with mount option noatime instead of the default relatime and did not create a swap partition. My use of ext2 and the lack of a swap partition are because I have an SSD and want to minimize disk writes to extend its life. More modern filesystems use journaling which log filesystem writes to a journal. This reduces the likelihood of filesystem corruption but comes at the expense of additional writes to the drive. I do later enable swap using an SD card but there probably would have been no harm in creating a traditional swap partition since my Aspire One rarely (if ever) swaps.
I then completed the install using the Crunchbang 9.04.01 install script. After downloading the script type:
sudo bash crunchbang-installer-9.04.01.sh
type your password, select the type of install you want and then enter ‘y’ when asked whether or not to install the medibuntu keyring. It will run for a while, depending on your connection speed. Near the end of the install, it will ask you if you want to use network-manager. I chose not to since I prefer wicd to manage my internet connections. If you want to use wicd, answer no when the script asks you if you want to reboot and type:
sudo aptitude install wicd
After that, reboot into your new system by typing ‘sudo reboot’.
Note: Since the time I installed Crunchbang, 9.04.01 was officially released and one can instead install using a flash drive, unetbootin and your preferred i386 crunchbang or ubuntu variant iso.
SSD optimization
Because I have an SSD, my first tweak upon completing my install was to optimize my filesystem to minimize writes to the drive.
To start with, I wanted to put /tmp and /var/tmp into ram so that temporary files are not written to the drive. To do so, fire up your favorite text editor and add:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
to the end of /etc/fstab.
Next, I also wanted to put /var/log and /var/cache in RAM. The typical way I’ve seen this done is to duplicate the above lines for /var/log and /var/cache and then modify the /etc/rc.local script to recreate the directory structure. A more elegant approach, in my opinion, is to mount them as unionfs read-only along with /tmp. This preserves the existing directory structure but any changes are written to RAM. To do all this I added:
none /var/log unionfs dirs=/tmp:/var/log=ro 0 0
none /var/cache unionfs dirs=/tmp:/var/cache=ro 0 0
to the end of /etc/fstab. At this point you may reboot if you like to make these optimizations active.
The next SSD optimization I applied is to add ‘elevator=noop’ to the defoption line of /boot/grub/menu.lst, i.e.,
# defoptions=elevator=noop quiet splash
and then to run ‘sudo update-grub’. 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.
Note: One might be tempted to do the SSD optimizations before running the Crunchbang install script but unless you do this right, you will run out of space on /tmp and quite possibly bork your install. To truly minimize SSD writes, one could do all of the SSD optimizations and then comment out the /var/cache line of /etc/fstab until after the install is complete.
As mentioned earlier, I did not create a swap partition on the main drive because I did not want unnecessary writes to the SSD. However, I have a 128MB SD card that came with my GPS (and who uses those anymore) and is essentially useless in a world where 4GB and 8GB SD cards can be had for cheap. So I popped it into the lefthand SD card slot, formatted it as swap and mount it by adding:
/dev/mmcblk0p1 none swap sw
to /etc/fstab. A gig of RAM seems to be more than enough but given that I have no use for a 128MB SD card, using it as swap can’t hurt.
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’.
Kernel
There are also a number of choices in terms of alternative kernels (Array.org, AspireOneKernel.com, Kuki Kernel, etc). I found that none of them were as stable as the stock Ubuntu kernel. Moreover, the Ubuntu kernel now boots so quickly (30s to the GDM login screen), it is not clear to me what the advantage of these custom kernels is. Mind you, I have not timed my boots but from my own observations it seemed to me that the ranking of boot speeds, sickboy’s kernel is fastest followed by the kuki kernel and finally the stock ubuntu kernel. That said, my guess is that the difference in boot times is in the neighborhood of only 2-3 seconds.
Fan speed management
Fan management by the Aspire One’s bios sucks. To fix this, I installed the acerhdf kernel module. To do so, type:
sudo aptitude install build-essential linux-headers-generic
wget http://www.piie.net/files/acerhdf_kmod-0.4.0-3.tar.gz
tar xvf acerhdf_kmod-0.4.0-3.tar.gz
cd acerhdf_kmod
make
sudo make install
sudo modprobe acehdf
You can get the most recent version here. Also, you will need a different version if you decided to install a 2.6.30 or later kernel.
Wireless
Over several weeks of experimentation, the stock ath5k driver module appears to be less than stable, sometimes dropping the connection and in fact losing the interface altogether. The only way to bring back the interface is to completely shutdown and then do a cold boot — simply rebooting, in my experience, does not work. Because of this, I compiled and installed the madwifi_hal driver as suggested in a couple of the pages mentioned above. To do so, type:
wget http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz
tar xvf madwifi-hal-0.10.5.6-current.tar.gz
cd madwifi-hal-0.10.5.6-r4068-20090705
make
sudo make install
Get the most recent version here. Wifi should be working quite stably after a reboot although you may need to blacklist ath5k. These wikis also explain how to modify /etc/sysctl.conf to get the wireless LED working (note that this tweak only works with the madwifi_hal driver, not the stock ath5k driver). This seems to cause problems for suspend (which is somewhat unreliable anyway), resulting in a hard freeze which requires a forced shutdown and cold boot.
Edit 8/22/09: the latest kernel (2.6.28-15-generic) seems to have fixed any wireless instability issues with the ath5k kernel module. This has the added bonus that suspend now works flawlessly. The only cost is that the LED no longer works.
Edit 8/25/09: The following workaround gets you wireless ath5k with the LED working.
sudo aptitude install linux-backports-modules-jaunty
Create /etc/modprobe.d/blacklist-ath.conf and add:
blacklist ath_pci
blacklist ath_hal
blacklist acer_wmi
Reboot and wireless should be working with a blinking LED. And suspend works!
Sound
Sound works out-of-the-box with the stock kernel but to get the microphone working without large amounts of static, I had to create an /etc/modprobe.d/sound file and add:
options snd-hda-intel model=acer-aspire
Hardware hacks
It is possible to add RAM and internal bluetooth, swap out the drive, add 3G wireless and add eSata to the Aspire One ZG5. These mods are of varying degrees of difficulty but none of them are as simple as unscrewing a bottom panel and popping in the new hardware. In particular, all of them require opening up the laptop, removing the keyboard and then removing the motherboard and the latter two mods require some difficult soldering (according to tnkgrl herself).
In my case, 1GB of RAM seems to be sufficient for my needs. While the stock SSD is on the slow side (after logging in, a few seconds pass before I can do more than open claws-mail), I’ll only swap it out if and when the current drive crashes. Given that some bluetooth dongles are so tiny these days, I don’t see any reason not to leave one plugged in at all times. And for me at least, 3G and eSata seem a bit excessive.
Final thoughts
There may be other tweaks that I’ve applied but don’t remember. Please comment if you spot any errors or have suggestions. I will make additions and modifications as necessary.
Humayun
November 1, 2009
hey ubuntu 9.10 updated it everything works, only issue is that my internal mic died
mom threw water on it , but carder works when I start the laptop with the SD in it thanks man
couldnt install the fan management cuz its already installed with the update
cebek
October 21, 2009
Yes I had a mistake in the entry “backlist” instead of blacklist.. However after rebooting is the situation same.
In the lsmod | grep ath is this output:
ath5k 127364 0
lbm_cw_mac80211 227492 1 ath5k
lbm_cw_cfg80211 73888 2 ath5k, lbm_cw_mac80211
led_class 12036 1 ath5k
is there some other mistake?
aspireonezg5
October 21, 2009
I booted off of a live USB drive and installed the backport modules along with the blacklist and got the same output as you but I was able to sign into an unencrypted network without any problems. Can you try turning off the hidden ssid and try again? I’m afraid that’s all I can come up with.
cebek
October 22, 2009
The wifi is not in the visible networks. However in the second notebook with Win Vista is everything OK. How can I recognize the manufacturer of the wifi card? Is there any possibility that if the manufacturer is the broadcom, is this the reason of troubles? I can remember that when I have the broadcom wifi card that there was some problems and I needed to do something special via terminal .. (drivers from windows I think..) or something like that..
Everything is going well except of the wifi
I can not understand that there are some visible networks but mine is not visible. Can it be in the Channel of broadcasting? I have wifi on the channel 13… is tere any setup of the card in stead of the graphical in the top corner?
sorry for the lots of questions.
but i am beginner with linux system.
thanx for all your help..
cbk
aspireonezg5
October 22, 2009
The manufacturer of the wireless card is Atheros and everything should be working. The only other thing I can suggest is to go back to the original wifi drivers — “sudo rm /etc/modpobe.d/blacklist-ath.conf” and “sudo aptitude purge linux-backports-modules-jaunty”. The only thing the backport modules give you is the blinking LED. If that doesn’t work, I’d suggest going to ubuntuforums.org for help.
cebek
October 21, 2009
Hi, I’d like use your hint about the wifi, led and I have trouble with creating the file /etc/modprobe.d/blacklist-ath.conf. There is owner root and I can not save the file into this location. How can I do that? When I have installed my Ubuntu Netbook Remix edition, I have not created the root login. I thought that my user name is superuser and instead of the root login. Can you, please, give me some advice with this trouble?
thanx.
cebek
aspireonezg5
October 21, 2009
You need to use “sudo” (super user do) to edit your file. So if your editor of choice is gedit, you would type:
sudo gedit /etc/modprobe.d/blacklist-ath.confcebek
October 21, 2009
Thank you. It helped, however the wifi still can not connect to my home wifi network. It is without wep or wpa (open) and it has hidden ssid. The wifi networks are visible, but when I am trying to connect to my network with the correct ssid entrance, it tries to connect about one minute and then it popups message about not successfull connection. I have Acer One ZG5 and the Ubuntu Netbook remix. Can you help me with some hint?
thanx . cbk
aspireonezg5
October 21, 2009
Can you give me the output of “lsmod | grep ath”?
cebek
October 21, 2009
ath5k 127364 0
lbm_cw_mac80211 227492 1 ath5k
lbm_cw_cfg80211 73888 2 ath5k,lbm_cw_mac80211
led_class 12036 2 acer_wmi,ath5k
aspireonezg5
October 21, 2009
There may be something wrong with your /etc/modprobe.d/blacklist-ath.conf file since acer_wmi is still showing up. Are you sure “blacklist acer_wmi” is in there and nothing is misspelled?
cebek
November 6, 2009
Hi, I have posted here some problem with the wifi card.. I have solved it with this manual:
http://ubuntumanual.org/posts/185/install-atheros-ar242x-802-11abg-wireless-driver-in-ubuntu
It is already working now!!
for those with the same problems….
Thanks to all for the help.
Good Luck!!! cbk
aspireonezg5
November 9, 2009
Does suspend work with the mad-wifi driver?
humayun
October 21, 2009
I just realised that I have the REMIX version
humayun
October 20, 2009
Karmic didnt work properly switched back to Ubuntu Jauntry
humayun
October 20, 2009
yes sir I have
aspireonezg5
October 20, 2009
You realize that Crunchbang does not automount removable media — if you open a file manager (Windows key + f), you should see you SD card listed on the left. If you click on it, it will mount.
As a test, first boot with your card inserted.
humayun
October 20, 2009
i need the right one to view pics from my camera when I travel
Humayun
October 20, 2009
yeh i have done all that sony SD works on XP not on Ubuntu odd
Humayun
October 19, 2009
dude thanks a lot for the fast replies I have 3308 Bios Zg5 Acer Aspire 8GB and 1 GB RAM
aspireonezg5
October 19, 2009
Have you added pciehp.pciehp_force=1 to the defoptions line of /boot/grub/menu.lst? And what type of memory cards are you trying to use? From what I’ve read, memory stick and XD do not work with Jaunty.
For your mic, did you create /etc/modprobe.d/sound.conf with “options snd-hda-intel model=acer-aspire”? You might need to open a terminal and run “alsamixer” and unmute the mic.
humayun
October 20, 2009
yep installing karmic now … SD Sony
aspireonezg5
October 20, 2009
If it is an SD card then it should work just fine in Jaunty. You’ve tried both card readers?
Humayun
October 19, 2009
hey sorry to bother you again didnt get internal mic working nor card reader whats karmic ??? I am pretty new to ubuntu got the fan , wifi led working and RAM thingi thanks a zillion
aspireonezg5
October 19, 2009
Karmic Koala is the upcoming Ubuntu release (currently beta). If you’re willing to get your hands a little dirty, I’d give it a try: http://aspireonezg5.wordpress.com/2009/10/16/karmic-howto/
Do you have the ZG5 or a different model?
Humayun Mirza
October 11, 2009
sorry to bug you again have you figured out how to make the card reader work ?
i think my internal mic burnt the tweaks didnt work
aspireonezg5
October 11, 2009
My understanding of the current state of drivers for the card readers is that the RH reader works if you have a card inserted at boot. My workaround works for me but I never remove the SD card. You can also try adding “pciehp.pciehp_force=1″ to defoptions in your /boot/grub/menu.lst which is reported to work for making the RH reader hot swapable.
aspireonezg5
October 16, 2009
I believe Karmic, along with the pciehp.pciehp_force=1 tweak make the card readers work.
Humayun Mirza
October 11, 2009
thanks dude a lot wifi works havnt tried the SDD will do it soon hope card reader works ps how do i get internal mic working ?