Per Erik Strandberg /cv /kurser /blog

Introduction

I want to install Debian Gnu Linux Distro to My Asus Eee Pc.

This howto is the result of what I've learned from an earlier attempt installing Debian. It also serves as a documentation for myself and anyone else who might want to try Debian on their eee.

To learn more about Debian Gnu Linux Distro see wikipedia:
[1] or debian.org: [2].

Getting a Debian for the Eee

From another installation instruction ([3]) I found a link to a small debian net installer that can boot from a usb stick. You find it here: [4]. The file is only 16 MB so we will later need to download a lot from the internet - I can recommended a fast and stable internet connection.

To turn your usb stick into a bootable usb stick copy the debian net image to the stick with something like the below, note that you should copy to the stick - not to a partition of the stick.

dd if=debian-eeepc.img of=/dev/<YOUR-USB-DEVICE>

Start the installation

I inserted the stick and rebooted My Asus Eee Pc. A vanilla Debian Gnu Linux Distro net installation starts.

You see something like this:
http://www.pererikstrandberg.se/blog/asuseeepc/eee-debian.jpg

Files are downloaded, packages are installed, questions are asked. I called my computer eee (very original), had no proxy and a blank domain.

When it is time to partion I took special care to not create a swap partition. This is a bit controversial but a part of the reason for doing this is

  1. I want to save as much as I can of the 4 GB of disk space I have.
  2. I later want to buy 2 GB or so of RAM, and use this as good as I can instead of a swap partition.
  3. There are rumors that SSD-drives age faster if they act as swap-space.

After some 15 minutes or so the section Software selection appears. You get to choose from some different selections. On my first attempt I failed to unselect desktop environment (actually this was my third attempt - I first tried eeeXubuntu, then I did a Debian install but had a swap partition) and ended up with a nice desktop like this one:
http://www.pererikstrandberg.se/blog/asuseeepc/debian-desktop.png

So what I wanted was to unselected desktop environment since I want to get into the nitty gritty details of making my own desktop later. Some say you should unselect standard system, but I do not yet know enough about Unix in general or Gnu Linux in particular. So what I had left on this final attempt was standard system:

[ ] Desktop environment
[ ] Web server
[ ] Print server
[ ] DNS server
[ ] File server
[ ] Mail server
[ ] SQL database
[ ] Laptop
[*] Standard system

The expected size of the system is found in the Debian installation manual Appendix D.2 (see [5]). A standard installation requires approx 353 MB. Without 'Standard system' the installation requires approx 225 MB. The desktop task would require an additional 1.3 GB. The laptop option only requires 27 MB so that might be interesting to test.

Terminal: initial modifications

We now have a nice installation of Debian Gnu Linux Distro, but no desktop environment. We will get there soon enough.

Most of these are done while logged in as root (we will soon avoid that).

localepurge

localepurge is a package that removes instructions, documentation and so on for languages that are not used. I kept English, UTF-8 Usa-English, Swedish and UTF-8 Sweden-Swedish.

In one of the rounds I installed Debian Gnu Linux Distro I installed localepurge after installing xfce4 and gdm and purged 96 MB of locales :)

No recommended packages by default

Sid at the swedish ubuntu forum [6] hints that APT and aptitude installs recommended packages by default. This can be avoided by creating the file /etc/apt/apt.conf (if you do not have it) and adding two lines to it:

APT::Install-Recommends "false";
Aptitude::Recommends-Important "false";

His post (in swedish) is found here:
http://ubuntu-se.org/phpBB3/viewtopic.php?f=19&t=28632#p221479
(sorry for not being able to link to it - this is a limitation of Monkey Wiki)

Some bugs/features

If sound then no halt?

In [7] and [8] there is a hint on how to make My Asus Eee Pc shut down completely on shutdown (even if sound has been used): Add the following line at the end of the file /etc/default/halt

rmmod snd-hda-intel

The non-comments of my /etc/default/halt now looks like this:

HALT=poweroff
rmmod snd-hda-intel

System clock error on start/boot

The debian eee pc wiki [9] hints on disabling rtc in /etc/modprobe.d/blacklist by adding

blacklist rtc

Also add genrtc on a separate line in /etc/modules

Debian Security Improvements

Remove vim-common

I have to admit it: I can not use Vi Improved. I really like Gnu Emacs and I really like Gnu Nano (if it had not been for the lack of the undo functionality).

apt-get remove vim-common

Install and configure sudo

By using Ubuntu Distro and Xubuntu Distro I have gotten very fond of the sudo approach to security. Instead of being root for a long time it is better to be it only sometimes. Read more on sudo here: [10]

A parenthesis: It is interesting to know that sudo is a technique that "invented" around 1980. About 20 years later our friends in Redmond (Microsoft that is) patented it: [11] - this is one of the more obvious cases of patent piracy.

Once sudo is installed (do the usual apt-get install sudo) we should modify the /etc/sudoers file. Now you understand why we removed vi - without removing vi we are forced to BOHICA with vi and the sudoers file, this is something we do not want.

visodu -f /etc/sudoers

I always modify the defaults line so that sudo will not remember me. I also start with the Ubuntu Distro defaults. That makes the line look like this:

Defaults	!lecture,tty_tickets,!fqdn,timestamp_timeout=0

In debian, as opposed to ubuntu, sudo is configured entirely in /etc/sudoers so to make a user a sudoer append a line like this at the end of the file:

per     ALL=(ALL) ALL

Note there are tabs in some places and perhaps spaces on others - I just copied the root line and changed the name into my user account, in Gnu Nano that is: Ctrl+K to cut a line, the Ctrl+U twice to uncut the line and then insert a copy of it. Ctrl+O to save, Ctrl+X to exit.

To test if the user you created on install is a sudoer exit the root bash session, install as the user, and type sudo tail /etc/passwd twice. Once to test if you are a sudoer, and then again to see sudo does not remember you.

More on debian and sudo is found here: [12]

Never log in as root again

You should now never log in as root again. For one: you don't need to since the user you created will be have all rights needed with the sudo command. Second: breaking things is a lot easier if you are root.

If you are logged in as the user and that user is a sudoer: sudo passwd should do it. I pick a really hard and long password that I can remember, and that I do not need to write down on paper.

Install A Small Desktop Environment

The easy way is to just install xfce4 and gdm - but I want to tweak this a bit, in an attempt to minimize the size of dependencies.

If I in the console try to sudo apt-get install xfce4 I get a huge list of 230 packages that would require about 300 MB (see [13] for details). 300 MB is not much, but on the other hand we only have 4 GB to start with so I will try to keep it down.

Small Xorg

Xorg comes with a lot of packages and many are probably not needed. A hint from Sid again (see above) is to install these two packages and let aptitude do the rest.

aptitude install xserver-xorg-video-intel xfonts-base

This will install 37 packages, download 18 MB and 41.1 MB will be used after unpacking on My Asus Eee Pc.

A parenthesis: I have also tried a recommendation from [14] But that dot not work for me :(

Xfce: A Small Desktop Environment

If you are not interested in Xfce - you should now start looking for window manager and work your way from there. Perhaps start at: openbox [15], fluxbox [16] or icewm [17].

I will use Xfce (see [18]) since this is the first desktop environment I got used to when turning to the light side of the force. Xfce is lightweight, fast and looks good!

What I want is to pick the minimal Xfce packages needed and install xfce4 and gdm. With APT not adding recommended packages this combo adds another 99 packages, 44.4 MB download, and 130 MB disk space. That is not a lot and suits me fine.

After installing Xfce and gdm without recommended packages booting into Xfce takes 50-60 minutes:

If you know more about how to get a nice and minimal Xfce Desktop Environment for My Asus Eee Pc please let me know: [19]

The Xfce4 desktop environment on my asus eee pc

A nice screen shot that displays what we have so far. I got this more or less just by installing xfce4 and gdm at the same time with the above tweaks.
http://www.pererikstrandberg.se/blog/asuseeepc/small-xfce-desktop.png

Installing the "perfect" desktop

Now that the desktop environment is there I need to install a nice set of applications as well. Right now I can not even look at images. No I do not yet have a visual browser so I can not use that :)

Things I can or should not live without

Web browser

There is one browser installed already: w3m (see Wee Three Mmm) so in theory you do not need another one. However I've noticed that I usually use at least two more browsers on a regular basis. So the three browsers I am aware of on My Asus Eee Pc are:

Iceweasel almost requires a few plugins, such as Adblock Plus.

Multimedia

Ristretto image viewer, for looking at pictures.
http://www.pererikstrandberg.se/blog/asuseeepc/ristretto.png

VLC media player, for playing almost any media format (Some formats will require extra codecs - many of them are non-free software).

Xfce stuff: Panel Plugins and so on

With sudo apt-get install xfce4-screenshooter-plugin xfce4-systemload-plugin xfce4-battery-plugin xfce4-mixer I get

Coming from Ubuntu Distro and Xubuntu Distro I am really used to getting usb-drives to automount and end up on the desktop. This was not activated by default. Some reading revealed that thunar-volman does that for you. But installing thunar-volman is not enough! I also had to add some dependencies that thunar-volman did not install (perhaps they were listed as recommended [:)]-|--< ). So this did it for me:

sudo apt-get install thunar-volman dbus libdbus-glib-1-dev hal libhal1 

"Office" applications

Word documents

Some people still use the silly microsoft format doc. To view and edit such files I install two applications:

Pdf stuff

I need a pdf viewer and got the impression that epdfview (see [26]) is a lightweigther (like evince but without any gnome libs).

I want a pdf-printer but I had problems with cups and/or cups-pdf - if you know a painless way to get it please let me know: [27]

I also install a2ps for future use. a2ps is short for printing anything to ps (post script).

At least I have ps2pdf to convert the system default print to ps output from the console.

To be installed/decided upon

Complete Backup

In [28] a method to do a complete backup is explained. In short this is what you do:

tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /

And to restore

tar xvpfz backup.tgz -C /

Both require root permissions and at least the first one needs to be executed from the root folder / unless you modify it.

My backup was 322 MB - that's not a lot :)


Read more
http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization
http://wiki.debian.org/DebianEeePC
http://wiki.debian.org/DebianEeePC/HowTo/Troubleshooting


Back to Kategori Asus Eee Pc