Freitag, 28. November 2008

Imperfect notebook

In fact this notebook is not bad at all. I bought it couple of weeks ago for my sons birthday present: a tiny acer notebook with Intel Atom in it. From the size, it fits well to children's fingers. It is imperfect in the sense that, I made a wrong choice. I took SSD 8Gb version with only 512M memory. Well, I thought it was OK for children. From the hardware point of view I have no objections. I thought I could just put more memory later, and a harddisk as well.

I'm not going to tell the full story about my impression, its boring anyway. Someone can just put "acer one" in google search-bar, then he will be dropped to a bunch of articles about that. I think this notebook is getting more popular now. The interesting thing here is how I struggled with the operating system, since it came with a very ugly Linux settings. I would say terrible.

Firstly, I decided _not_ to change the OS (Linpus), since it might be using a special drivers, or whatever. Then I tried to restore it to the usable Linux form. I found: strange xorg configuration, no runlevel, stupid functionality to restore the users own settings, silly graphical user interface. It is also hard-wired to xfce window manager. If you want to use another lighter window manager, forget it! I made a brute change to its configurations. I deleted files which Acer provided (hacked?), for instance xfce-desktop2.

I'm not going to tell this "restoring" work either, cause it turns out that this wont work. Well it does work, but very ugly since you will not find Linux system like you expected. I was starting to think, that those guys who put this OS, wanted to make bad impression of Linux, or to show that it is not, at all, the better OS than Windows. The perfect example is when you delete some package using yum (Linpus comes from fedora), may be you will stuck to the black screen without being able to login, since xfce is responsible for everything. This system calls the init-scripts directly from xfce's autostart function.

The notebook was running for a couple of weeks with the "rehack" OS. I put the additional memory in it as well. Since I got many complains from my son, I started to realize that what I did was stupid. You can not expect good functionality from an ugly base. So I decided to switch to a "real" operating system. I Installed Debian in it following this wiki. The installing took hours, since the debian install cd image I used has a bug. Don't check the laptop option in the package selection menu! Everything worked perfectly afterward and it seems that all the hardware were detected well. Yes I said everything.

One thing to consider is to avoid using swap space. May be suspend of hibernate will not function, but I don't care. The last thing and maybe the most important thing I did is moving all the actively used directories to the ram space using ramdisk (tmpfs). This is very easy. What we have to do is the followings:

1) use this as /etc/fstab

proc /proc proc defaults 0 0 /dev/sda1 / ext2 defaults,noatime,nodiratime,errors=remount-ro 0 1 none /var/log tmpfs defaults,size=16M 0 0 none /tmp tmpfs defaults,size=128M 0 0 none /var/tmp tmpfs defaults,size=32M 0 0 /dev/mmcblk0p1 /media/home ext2 defaults,noatime,nodiratime 0 0

2) and make a small script to provide some missing directories as /etc/init.d/prepare-var.sh. Call this script on boot time. What I did is creating a link under rc2.d directory.

#!/bin/bash #### # Acer Aspire One: # some directory @ var are moved to tmpfs # prepare directory below /var # do_start() { /bin/mkdir -p /var/log/apt /bin/mkdir -p /var/log/gdm /bin/touch /var/log/dmesg } case "$1" in start|"") do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) # No-op ;; *) echo "Usage: prepare-var.sh [start|stop]" >&2 exit 3 ;; esac
This makes the tiny notebook much faster and also saves the life time of the SSD. The best imperfect thing is, now it is a normal usable computer. This trick is also useful in other system that uses Compact Flash as its boot device. I did also the similar thing to my shuttle pc. I put 4GB CF-disk in it and use it as the boot device. It starts speeding!!

Keine Kommentare: