(: Mettez un pingouin dans votre portable :)

Installing Linux Debian Etch on Asus A6J laptop

Introduction

This page was created in april 2006, last modification November 25, 2006.
(FR)Cette page existe aussi en francais.

The laptop's an Asus A6Ja (flavour Q021-H), and has :

For those who want mode details, here's an lspci -v.

To make it short, the laptop is Linux compatible, but it has quite recent components, so many drivers (e.g. network, Xorg, sound) are not directly available from the standard distributions and need special attention.




Coming up next :


Preliminaries

Originally, the HD has 3 partitions : hda1 (2Gb hidden, is the restoring partition), hda2 (55Gb windows) and hda5 (40Gb, empty). The manual says the recovery CDs won't allow me to re-partition the disk as I'd like. Haven't tried though...

Windows XP

It comes with windows pre-installed. In order to install Linux, I wanted to re-partition the disk... A couple of mistakes later, I had lost all 3 original partitions. Ended up with:

/dev/hda1 10Go	/mnt/win_c 
/dev/hda5 40Go	/mnt/win_d 
/dev/hda6  1Go	swap 
/dev/hda7 10Go
/dev/hda8 10Go
/dev/hda9 24Go /home 
To reinstall Win XP, simply choose the option "reinstall on the first partition".

Knoppix 4.0.2 (oct. 2005 version)

I have this CD under hand, so it's a good first test.

To boot on the cdrom, 'escape' is the key. To enter the BIOS, type F2

Booting knoppix lang=fr (yes i've got a french keyboard) does the job. Knoppix starts perfectly, finds the dual core (see the dual penguins ;-).

The wide screen's a bit strange (knoppix chose a 1024x768 resolution), Vesa driver. It's sometimes a good idea to copy the file /etc/X11/xorg.conf to a usb key, for a later use with another distro...

The ethernet card is not detected, but the driver can be installed : dowload, compile (./configure, make, make install), 'modconf' to add the module to the running kernel, and 'netcardconfig' to configure it in dhcp.

Debian Etch

I'm beginning with Debian ('m more used to Mandrake) so please do not necessarily believe everything that's in this section!!

Installation

I chose to only download the first CD (out of 14 !) with jigdo. I'll get the rest via network. Also download : To boot on the CD, hit escape. Everything works fine, the default kernel is 2.6-i386, (one bug, with the iso image downloaded on april 15th: the intaller absolutly wants to reformat the whole disk. I didn't have this problem with the 6th' image)

Important : grub or lilo must be in text mode !! The graphical interfaces hang. I use grub ; here's my menu.lst

At reboot, the X-server starts, in vesa mode (i.e. generic graphics driver) 1024x768. If this is not the case, you can use knoppix's xorg.conf, or mine ... at your own risks ;-).

Now we want to install some packages, if the default installation didn't add them.

Then reboot to use the new kernel (faster).

Network

There's a driver available from Realtek. We will also need the kernel headers (note that the package is called linux-headers, and no longer kernel-headers). They are not on the installation CD.
  1. Install headers : dpkg --install linux-headers-2.6.15-1-686-smp_2.6.15-8_i386.deb
  2. tar -zxvf network_driver_sources.tgz
  3. cd r1000 ; more README ; (do what is said)
  4. modprobe r1000 (as root, to add module to kernel)
  5. dhclient (because i've got DHCP)
At this stage, network should work. But at some reboots, eth0 and eth1 are inverted ... and nothing works. Since i don't know where this strange behavior comes from, it's better to use the graphical network configuration tool : (K -> system -> networking).

synaptic, apt & al.

  1. Uncomment the lines concerning security updates (via synaptic, or directly in /etc/apt/sources.list) ; then make the security updates.
  2. Add your prefered server for other packages (cf. apt-howto for the syntax of sources.list, fast server choice, installation via local .deb, etc...).
  3. Install everything you need: gnome, kde, ooffice, gdm, debhelper (required later on for the graphics card), firefox, firestarter or shorewall, ...

Firewall / shorewall 3.0.5

In my situation (single, direct connection, dhcp), follow the instructions from /usr/share/doc/shorewall-doc/html/standalone.htm. The default config files are almost good.

BUG : sometimes, shorewall blocks everything (after 'shorewall clear' and everything is ok): it looks like it comes from the mixing between eth0 and eth1.

Solution : put IP_FORWARDING=On in /etc/shorewall/shorewall.conf, (from /usr/share/doc/shorewall-doc/html/FAQ.htm, FAQ 15).... does not work any better.
Solution 2 : use the graphical network configuration tool (seems ok ?)

Graphics card / Xorg

[edit November 20, 2006] I now recommend another method.

ATI provides a driver (ati-driver-installer-8.24.8-x86.run). The clean way to use it: Here's the xorg.conf I've ended up with.
Benchmark : glxgears gives ~4000 FPS on the little window. But the machine heats up !!

Graphics card / Xorg (recommended method)

[edit 20 november 2006]

Afeter an update in September, graphics acceleration stopped working. I then found out that Flavio Stanchina provides Debian packages. You need to add the following repositories in /etc/apt/sources.list :

deb-src http://www.stanchina.net/~flavio/debian-official/ /
deb http://www.stanchina.net/~flavio/debian-official/ /

Then , in synaptic, search "fglrx" ; I installed all related packages.

In order to have 3D graphics acceleration, you need to compile the kernel module. Everything's documented in /usr/share/doc/fglrx-kernel-src/README.Debian.gz (I chose Flavio's "recommended" method via module-assistant).
The only problem was that module-assistant used by default gcc-4.1 as a compiler (that is, my default gcc), whereas the kernel was compiled with gcc-4.0 (cf. 1st line of dmesg). At reboot, fglrx complained (cf. /var/log/Xorg.0.log) with something like "magic number=4.1, instead of 4.0") !
To get round this problem (brute method ... ain't proud of it):

cd /usr/bin
rm gcc
ln -s gcc-4.0 gcc
(module-assistant ... do as in the doc)
# reset the original gcc:
rm gcc
ln -s gcc-4.1 gcc
Now that I think about it, maybe an export CC=gcc-4.0 would have been sufficient ?

Sound

Requires alsa-driver version > 1.0.11rc4, not included in the standard distribution. Do what's in INSTALL. Sound should work. Strange: at next boot, sound no longer works ! I re-do the install procedure ; it then survives reboot. Another mystery.

ACPI, power management

cpufreq does not work out of the box, and I haven't tried much yet. suspend to ram, or to disk do not seem to work either. This will probably require a bit of work ... The batteries last around 2 hrs (when editing text with emacs ... that's not what i call a good score).

Tuning

Useful packages Tools : tkdiff, netselect,
TeX : a2ps, dvips, xdvi, auctex, openoffice
ZeBuLoN : refblas3, wxwindows, gtk-2, open-gl, open-motif
Leisure : xmms, libdvdcss (add the line "deb http://download.videolan.org/pub/videolan/debian/ sid main" in /etc/apt/sources.list)
Others : moniwiki ?

.bashrc : Change PS1='\u@\h:\w' into PS1='[\u@\h \W]'

emacs : to get the green background, instead of white, as in mandriva, add this to your ~/.Xresources file:

! this is for emacs, xemacs 
  emacs*Background: DarkSlateGray
  emacs*Foreground: Wheat
emacs*pointerColor: Orchid
 emacs*cursorColor: Orchid
  emacs*bitmapIcon: on
	emacs*font: fixed
    emacs.geometry: 120x40
(strange : the machine hangs when i shutdown the X-server, but works perfectly after a reboot)

Other possible solution : use emacs' color-themes (M-x color-theme-chooser).

Add (mwheel-install) to .emacs to have the mouse wheel working in emacs.

.toprc : Start top, type '1' to have both CPUs appearing, and maybe 'i' if you like it. Then type 'W' to write the configuration file ~/.toprc.






Mandriva 2006

Works as well (bad ?) as Debian : so the above instructions should apply.




References, Sources

See my bookmarks, sections Laptops and Asus A6J. I'd like to thank Sener from linux-on-laptops forum for his advices.