Installing Debian on an Acer TravelMate 230XC

Notes from installing Debian on an Acer TravelMate 230XC laptop. 5 September 2004


These are the notes of my installation of Debian on my Acer TravelMate 230XC laptop. I bought the laptop in April 2003, and have used it with Debian since. Recently I had to send it to be repaired: the lid latch and optical drives didn't work, and the touchpad was deteriorating quickly. Since I did not want to be without a computer for up to weeks, I set up my scratch desktop computer as a temporary workstation.

As it happened, the repairs only took a few days, and I got back my laptop on Friday. Since I had few plans for the weekend, I decided to re-install Debian on the laptop from scratch. I had no urgency to get it working, either, so I decided to play around a bit and see if I could get some things tweaked that had been bugging me with the previous install. I also wanted to play with some new stuff, such as udev, configuring networks only when the network link was present, and trying to switch to using the UTF-8 character set instead of the ISO-8859-1 one.

The original installation on the laptop was made using Debian woody installation disks, and then upgraded to Debian unstable. Although it worked quite nicely, I had had to tweak quite a lot to get things working well, since many parts of the hardware were much newer than Debian woody. For example, I had only got X working by installing an experimental X server version by Daniel Stone and additionally by installing a Synaptics touchpad driver binary module I snarfed from a friend's laptop. In April 2003, the Debian X packages did not yet have support for the laptop's graphics chipset (Intel 845GL) or the touchpad. As a result, I had been reluctant to upgrade the X server. Now, hopefully things would work well even with the official Debian X packages.

I had compiled the kernel myself, partly because that's how I'd always done it, and partly because the kernels Debian had packaged had some problems with my hardware, though I now forget what. Compiling the Linux kernel is not actually very difficult, but configuring it is tedious. There are a huge number of configuration variables and getting everything right usually takes me several iterations. Because of this, I tend not to upgrade my kernel very often. This time, I decided I'd make a serious attempt to use Debian packaged kernels to make my life simpler.

When I got back the laptop on Friday, I spent some time doing a test installation. The purpose of this was to try things out, with the explicit intention of wiping it clean afterwards and doing a clean installation later. The test installation was my learning process: I tend not to follow closely the development of all parts of Linux, and I needed to learn many new things to set things up properly. For example, though I knew about udev and wanted to try it out, I had no idea how it worked and how it was configured. So that's what I did on Friday and Saturday. I made several bad decisions I had to backtrack from, but eventually I got almost everything working the way I wanted it to work. Mikko Rauhala was quite helpful several times; he should be, he has a t-shirt saying he helps me with Linux problems.

I made no notes about my test installation, but I thought it might be useful to others if I at least documented my real installation. That's what this text is about.

Installation log

19:48. The test installation has been backed up so that I can refer to any configuration files I had there and make sure I can get things working again on the real installation. The real installation begins now. I use the Debian-Installer for Sarge release candidate 1 CD downloaded via bittorrent well in advance. Connect laptop to LAN via Ethernet, power on laptop, insert CD. Laptop boots from hard disk. Reboot, now boots from CD. I don't know why this happens, but I've seen it happen before. It is as if the drive requires some time to recognize that there is a disk.

At the installer prompt ("Press F1 for help, or ENTER to boot:"), I type "linux26 vga=771". Incidentally, writing an equals sign ("=") using a keyboard layout that is not what has been printed on the keycaps is something I can do, but which would confuse many Finnish people. I'm not sure how this should be resolved.

I chose "linux26" since I want the 2.6 kernel. The "vga=771" parameter is necessary to prevent the laptop screen from flashing. The parameter and its value are described on the Debian-Installer help screens, I didn't even have to search for them with Google. (See, it does help to read the help screens occasionally.)

The installer boots up and asks me to choose a language. I choose Finnish and then also a Finnish keyboard. Then the installer does things, which I miss since I'm writing these notes. Next questions: host name and domain name. No problems there.

Next is disk partitioning. I have traditionally partitioned my disks into three partitions: system, swap, and home. The theory is that if I need to re-install the system, I don't need to restore home directories from backups. On a 30 gigabyte laptop disk, I have found that I may run out of space on the home partition while the system partition still has gigabytes. This time, I decided to go for a combined system and home partition. Thus, I chose to let the installer partition things up that way instead of doing it manually. That is one of the options that the installer offers, and it chose fairly sensible sizes (29.4 gigabytes for the filesystem, 0.5 gigabytes for swap).

After the partitioning, the installer installed the Debian base system on the hard disk, from the CD. This took a while, so I processed some e-mail.

20:04. The base system is installed, and the installer wants to know if it can put GRUB on the hard disk. Yes, it may. After this, the CD is ejected and I'm asked to remove it from the drive and then press Enter to continue and reboot from the hard disk. The laptop reboots. After the usual barrage of kernel startup messages, I get the base configuration program on screen.

A bug: when asking whether the hardware clock is in GMT, only the day of week is displayed: "Laitteiston kello näyttää ajaksi nyt la.". This may be a translation problem of some sort.

Base-config then makes a guess and asks me if my timezone is Europe/Helsinki. It is.

Setting of root password and creating a user account go smoothly. I manage to not mistype the passwords. I strikes me that it would be interesting for Debian to experiment with disabling root logins and using sudo instead, like Apple does for MacOS X.

Next, configuring Apt. Very clear, very smooth. Downloading of Packages and Sources files takes a bit of time.

A buglet: the configurator asks for HTTP proxy information twice, probably in two different contexts, but I was distracted by e-mail and did not take detailed notes.

Next, choosing package sets to install. There is no option of installing, say, a desktop machine, which I remember seeing in other installations. Weird. I choose "valitse paketit itse" (choose packages myself), which causes something that is probably aptitude to be started. I forgot that this also happened when I did the test install. Luckily, "q" quits. Some packages are downloaded and installed or upgraded.

Exim4 is configured next. I will replace it with Postfix later, so I choose the defaults. This concludes the base configuration and the machine is now supposedly in working condition, though admittedly with a very spartan set of software.

It is 20:14. This would have gone faster if I didn't write notes at the same time.

I log in as root, and edit /etc/apt/sources.list to use unstable instead of testing. "apt-get update" takes a minute (I have a 1 Mbit/s ADSL downstream), "apt-get -u dist-upgrade" wants to download 26 megabytes worth of upgrades, which will take several minutes. Time to process a bit of e-mail.

20:22. Packages have been downloaded and preconfiguration starts: debconf front end ("Dialog") and priority limit ("medium"), keyboard map (choosing from architecture list), locales (choosing only fi_FI.UTF-8, removing the default fi_FI.@euro; "None" being the system default to make sure daemons don't mistakenly start speaking broken Finnish), adduser, new exim4 configurations (using defaults again), setserial ("autosave once"), discover1 ("no" to mount point management). Package installation starts. Distracted by IRC and e-mail.

20:28. Packages have been installed. Next, installing sudo and configuring it for myself. Took all of thirty seconds. Logged out as root, logged back in as myself. "sudo id" works for me. Good.

Next, installation of udev and removal of discover1. Mikko told me that discover1 makes bad things happen in the unstable version and I trust him to know what he is speaking of. udev wants me to reboot before it goes into effect, so I do that.

After reboot, noticed that Debian has a newer kernel version packaged. Installing kernel-image-2.6.8-1-686 and rebooting. Download takes a while, so processing e-mail.

20:42. Next, want to get X configured. Installed x-window-system and gnome meta packages. Download takes over half an hour, much time for e-mail. If I installed Squid on my firewall, I wouldn't nearly as much e-mail processed.

21:20. The download of one file failed, but re-running apt-get got it on the second try. Package configuration: sub-pixel text rendering (yes), libpango1.0-common (yes to defoma), cdrecord (no to suid), docbook dsssl stylesheets (paperconf, that should probably just be default and the debconf question should be of a lower level), mozilla-browser (dsp wrapper auto; again, this should be used and debconf question priority lowered), paper size (again! but this is the right one, though the answer would be possible to deduce from timezone), nautilus-media (yes to thumbnailer), and, finally, X server stuff (i810, pc105, fi keyboard layout, mouse /dev/psaux, mouse protocol ImPS/2, yes to lcd device, medium level setups, 1024x768@75Hz, only 1024x768 resolution).

21:32. Package installation starts. Answering the configuration questions took longer than it should have, since I tried to look up the answer for the mouse interface from the setup of the test installation. Unpacking its backup took a while and I should have done it earlier, while packages were being downloaded. Anyway, the right answer was that I need to install the Synaptics touchpad driver, which I'd forgotten about, so I chose fairly random values, which are going to have to be fixed later anyway.

21:38. Package installation done. I've got mail! Some debconf probably sent something, not going to check that until I get far enough. Installing xfree86-driver-synaptics instead (that was fast) and editing /etc/X11/XF86Config-4 by hand. Changed the InputDevice sections for the mice to:

Section "InputDevice"
    Identifier "Touchpad"
    Driver     "synaptics"
    Option     "CorePointer"
    Option     "Device"          "/dev/input/event0"
    Option     "Emulate3Buttons" "true"
    Option     "ZAxisMapping"    "4 5"
Section "InputDevice"
    Identifier "USB mouse"
    Driver     "mouse"
    Option     "SendCoreEvents"  "true"
    Option     "Emulate3Buttons" "false"
    Option     "ZAxisMapping"    "4 5"
    Option     "Protocol"        "ImPS/2"
    Option     "Device"          "/dev/input/mice"

Installed gdm, since that wasn't included in the gnome meta package. Started gdm. Failed: I had forgotten to update the ServerLayout section:

Section "ServerLayout"
    Identifier      "Default Layout"
    Screen          "Default Screen"
    InputDevice     "Generic Keyboard"
    InputDevice     "Touchpad"
    InputDevice     "USB mouse"

Restarted gdm. X comes up fine. Both the touchpad and the USB mouse work fine. This might be the easiest X installation for me ever.

21:46. Logged in via gdm. Almost exactly two hours after starting the install; this would go so much faster if I didn't take notes or read e-mail at the same time. Touchpad is a tad fast, using GNOME configuration to make it accelerate slower. Installing Tuxracer to see that the graphics subsystem really works. Using the Synaptic package manager (unrelated to the touchpad) to do this. Have experimented with Synaptic before, and it seems quite nice.

Tuxracer does not show up (at least immediately) on the GNOME menu. Starting it from the command line instead. Graphics work, sound does not. The GNOME mixer application does not find a sound card or mixer device, thus shows no controls. Had this with the test installation as well, so know the answer, but have forgotten it. Damn, this took ages to figure out. In desperation, purging (as opposed to just removing) discover1 and also libdiscover1 and discover1-data. Installed less (can't figure out why it isn't installed by default). Rebooting. Didn't help. Damn. Ah, alsa-base and alsautils are missing. Installed. Rebooted. Too damn many reboots, but then this is Debian unstable. The mixer comes up OK. This took me half an hour to figure out. I'm too damn stupid. Still can't find Tuxracer in the menus. Tuxracer sounds work after I use the GNOME mixer to set all the audio channels to maximum and non-muted.

22:16. Installed ssh (no server enabled) so I can copy an Ogg Vorbis file from my server to test sound apps. Copied music to laptop. Opened Nautilus, found out it opens as browser instead of spatial, ugh. Fixed. Dinah Washington sounds pretty good with Totem, even without headphones. Taking a small break to put food into the oven.

Started the GNOME sound recording utility. It crashed. Check the GNOME multimedia settings, set the source to osssrc instead of the default alsasrc. Still crashes. Strange, this worked yesterday. Installed strace. Running gnome-sound-recorder from command line prints out "No GConf default audio sink key and osssink doesn't work". Hm. Switched both source and sink to alsa. Totem still plays sounds. Sound recorder starts and recording seems to work, though the UI of the sound recorder application seems broken and saving doesn't go where I thought it would go and where the application said it would go. Might have to look at that later, and look for other recording applications that might be nicer to use.

22:36. Time to test the optical drive. Installed gnome-volume-manager (Mikko said it is nice). Logged out and in to start it. Configured to open a browser when removable media are inserted, but not automatically mount anything, or run any audio players or anything. Added a mount applet to panel, configured to mount /media/cdrom. Mount works fine, fstab had the necessary line automatically. The DVD-R I tested with had a few video files, which Totem plays fine, except that it pauses occasionally at least at the start, maybe due to I/O slowness. Anyway, good enough for now.

23:02. Back from supper. Inserted CD-RW disk so I can test Nautilus's CD burner. Didn't work, error messages in a really small window: "cdrecord: illegal write mode for this drive.\n cdrecord: Drive does not support TAO recording." Also: "Warning: Open by 'devname' is unintentional and not supported.". Blah. Ran "dpkg-reconfigure cdrecord" to turn on suid. Didn't help. Ran "sudo cdrecord -v dev=ATAPI:/dev/cdrom blank=fast" from the command line. Seems to work. Same with "x.iso" instead of "blank=fast" also seems to work. Luckily, I rarely burn CDs, so I can live with doing it from the command line. cdrecord is not the nicest of programs, but I can live with it for now.

23:14. Time to test DVD playback. Unfortunately, DeCSS can't be included in Debian proper due to the movie industry being pricks. However, unofficial packages to the rescue. I added "deb unstable main" to /etc/apt/sources.list, updated the packages lists, and then installed libdvdcss2, libdvdnav4, libdvdread3, libdvdplay0, and xine-ui. Inserted a DVD in the drive, ran "xine dvd://" and it works. For some reason, contrast and brightness are way too up, but otherwise no problems.

Trying Totem as well, but it complained on startup that it can't find the Ogg Vorbis file I had used to test sound playing (it no longer existed). If I start Totem fresh, it shouldn't try to access the previous file. Stupid. Same problems with brightness and contrast, but works otherwise.

22:16. All that fiddling with video took surprisingly little time. Used to be much harder. Next: trying to install battery applet into the panel showed that the ACPI daemon is missing. Installed and applet works. Commented out the line from the APT sources list, to avoid installing additional unofficial packages by mistake.

Time to configure my wireless network card (3com OfficeConnect Wireless 11g PC Card). Created /usr/local/lib/firmware and copied the firmware file from there (as isl3890; the name found by watching /var/log/syslog). Added "iface eth1 inet dhcp" to /etc/network/interfaces, took down eth0 ("sudo ifdown eth0") and brought up eth1 and it worked. Installed ifplugd and removed "auto eth0" from /etc/network/interfaces. Took down eth0 again and removed the Ethernet cable. Inserted wifi card, network came up automatically. Whee. Remove wifi card, network went down. Inserted Ethernet cable. Network came again up automatically. This is nice, at least as long as I'm only in networks that only require DHCP.

23:39. Added the following to /etc/udev/rules.d/liw.rules (all one one line):

BUS="scsi", SYSFS{model}="USB CF Reader", 
KERNEL="sd?1", NAME="cf-reader", SYMLINK="%k"

Inserted my CompactFlash reader into a USB port and /dev/cf-reader was automatically created. Created /media/cf and added to /etc/fstab:

/dev/cf-reader /media/cf msdos rw,user,noauto 0 0

Added a mount applet to panel to mount the CF reader. Worked.

23:45. Noticed that the locale is fi_FI@euro even though I removed that from the list of locales that are to be generated. fi_FI.UTF-8 is not generated, even though it was selected. Have seen this bug before. Bad. "sudo dpkg-reconfigure locales" and selecting the right ones again works. Will have to report this.

23:47. Done. Four hours, including plenty of mail processing, some IRC, making and eating supper, and having a friend visit to borrow some DVDs.

What remains is to install and configure all sorts of applications, but that is no longer on-topic for this article.

The major thing missing from my laptop nirvana is working hibernation, but I have not got the Linux kernel to do that well for me yet. It crashes for me. The nice kernel hackers seem to be working on it, though, and eventually things should work fine.