Linux on a EeePC

I have an old Asus EeePC 900HA which was shipped with WinXP Home preinstalled and on which I installed Linux Eeebuntu on dual boot. At that time, Eeebuntu was the distribution of choice for EeePC as it was tailored for its architecture, and Linux still had some issues for running on laptops.

The machine mounted a 160-Gb hard disk, factory-partitioned as such:

  • A 152-Gb primary partition hosting the WinXP OS;
  • A 8-Gb recovery partition, unmounted and invisible from WinXP, containing Symantec Ghost 11.0 under Windows OS and a factory image of the EeePC;
  • A 40-Mb EFI partition.

To install Eeebuntu, I created in the primary partition /dev/sda1 a 66-Gb extended partition, split into two logical partitions:

  • a 64-Gb for the Linux root (/dev/sda5);
  • a 2-Gb swap space (/dev/sda6).

The old factory partitions were identified by Linux as follows:

  • The primary partition hosting the WinXP OS as /dev/sda1;
  • The recovery partition as /dev/sda3;
  • The EFI partition as /dev/sda4.

I'm still using the EeePC, of which I appreciate the reduced footprint, smaller than many of today's netbooks. Some years ago I wanted to refresh the Linux functionality of the machine by installing on it a more important distro such as Debian Squeeze. Just in case, I decided to keep the obsolete WinXP OS, to run Windows programs in case of need. Hence my project was to replace Eeebuntu with Debian, with minimum hassle and without disk repartitioning.
Here I detail the steps I took, and the solutions for the issues encountered.

Installing Debian

We start by downloading the latest 32-bit Debian ISO (at the time I did the install, the latest version was Debian 6 - Squeeze). A small netinst image will do the job.
Normally we're supposed to burn this image on a CD-ROM and boot the machine from it. Since the EeePC does not have an embedded CD player, and we would need to hook an external one via USB port, we proceed differently.
UNetbootin is a tool that allows you to create a bootable USB disk or SD Card from any ISO image. It can even automatically prepare the USB or SD device with your preferred recent Linux distro.
As the EeePC comes with a handy SD Card reader, we make a SD Card with the Debian installation ISO, and we boot the machine from it. (Press ESC during the BIOS sequence to select the media to boot from.)

The installation of Debian is quite straightforward: just select the appropriate options, or stick with the default ones proposed, and we're good to go.
When we're shown the partitioning options, we choose to re-format the existing Linux partition /dev/sda5 as ext3, and re-format the existing swap partition /dev/sda6 as swap. Then we install the Linux OS on /dev/sda5.
Finally, we make sure that we also install the bootloader, GRUB.

When we reboot the machine, however, we face a GRUB Error 2.

Repairing the bootloader

A GRUB Error 2 means that the disk is not recognized. We therefore download the boot-repair-disk ISO, a nice utility to repair a corrupted bootloader.
We burn the ISO on a SD card via UNetbootin (the same SD that we used for the Debian install will work fine) and we boot the machine from there. The utility requires very little intervention from the user. Once it finishes its work, we remove the boot-repair-disk SD and reboot the machine.

This time, the GRUB loads and we're presented with the following choices:

Debian GNU/Linux, with Linux 2.6.32-5-686
Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)
Windows NT/2000/XP (on /dev/sda3)

Here's another issue, though: the Windows boot option presented is not the main WinXP OS but the recovery partition instead.

Fixing GRUB

We then boot under Linux (first option in the GRUB menu) and operate directly on the GRUB config in /etc/grub.d/. Basically, all we have to do is run OS Prober to check for other bootable OS on the hard disk, and then update the GRUB config once finished:

root@debian:~# os-prober
root@debian:~# update-grub

(If you are interested to know more, there is an excellent GRUB tutorial online.)

We then reboot the EeePC, and finally the GRUB shows all the options to boot under Linux or WinXP:

Debian GNU/Linux, with Linux 2.6.32-5-686
Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)
Microsoft Windows XP Home Edition (on /dev/sda1)
Windows NT/2000/XP (on /dev/sda3)

Notice how GRUB correctly identifies the recovery partition. Therefore, to restore a factory image of the WinXP OS on /dev/sda1, instead of pressing F9 during the POST (as described in the EeePC manual) we could also boot on /dev/sda3 from GRUB.

By selecting the first option (default) the machine will boot on Debian GNOME:

Using Debian

Linux automatically recognizes the Windows partition, which is labeled "86 Gb Filesystem" and mounted on /media/usb0. All files inside are accessible for use within Linux. The recovery partition is labeled as "PE" and mounted on /media/PE, although you probably wouldn't want to mess with it.

Configuring the wireless card on Debian can be quite cumbersome, as by choice the all-free-software Debian distro doesn't include any proprietary drivers. Fortunately Debian recognizes the Atheros NIC just fine. (You may check that the wireless interface is recognized by the system by looking at the output of the lspci command.) However, I've experienced flappy connection issues using the Wicd Network Manager. For this reason I highly recommend to install the package network-manager-gnome instead.
As reported here, it is also a good idea to check /etc/network/interfaces and ensure that it does not contain any reference to the wireless interface wlan0. Wireless interfaces listed therein will allegedly slow down the bootup process and disable the Wicd Network Manager.

Upgrading to Debian 7

Once Debian 7 (Wheezy) is out, it's time to upgrade our system.

This page details all the instructions for upgrading from Debian 6 to 7. Basically, we start by checking that all packages are in an upgradable state, that our system is clean, and that we have enough disk space. We also make a backup of all the data we can't afford to lose. Finally, we edit /etc/apt/sources.list to take into account the Wheezy repository. I recommend that you keep the machine online via an Ethernet cable to avoid last-minute wireless connection shenanigans.

The basic apt-get commands to run are:

root@debian:~# apt-get update
root@debian:~# apt-get upgrade
root@debian:~# apt-get clean

The final command to upgrade the distribution would be apt-get dist-upgrade but I found out that it didn't work. Therefore we resort to aptitude:

root@debian:~# aptitude update
root@debian:~# aptitude full-upgrade

The machine downloads and installs all the necessary packages. This will take a while, but the process requires very little intervention on our part.
We will be asked now and then whether we want to overwrite our modifications to the system; for instance, to etc/sudoers or GRUB. In this case it's safe to keep the default choice of not installing the maintainer's version but keeping the local version currently installed, otherwise we will lose our customizations.

Once this process is completed, the machine reboots. However, it rebooted in GRUB Rescue Mode. We choose the easy way and we restart the EeePC with the boot-repair-disk SD, leaving it fix all GRUB errors.

The successive reboot gratifies us with a login prompt. At this point, the next step is to install the X Window manager GNOME, which apparently wasn't upgraded. The apt-get command complains about broken packages hold when we try to install it. Therefore, we call aptitude first, which makes a better job in dealing with broken packages and solving dependencies:

root@debian:~# aptitude install gnome
root@debian:~# apt-get install gnome

Another reboot, and the machine presents us with the GNOME Display Manager. From here, we can login to the system. All our users and data have been preserved.

Debian 7 ships with GNOME 3, which many users (me included) consider a dumbed-down version of the X Window environment. You can install extensions to give it the look-and-feel of GNOME 2.   

Once we've customized GNOME to our need, we're ready to go.

It is surely worth of praise the fact that the latest version of a full-fledged Linux distribution is able to run decently on a 5-year old low-end netbook.

Enjoy your new distro, and happy Linux hacking.

page created on 24 July 2012        page updated on 21 July 2013