This page just contains my practical experience with installing, configuring and using Debian Linux on old hardware that I refurbish. It's probably most useful to the people that get here through some search engine. Some of this stuff I took out of forum postings I wrote myself. This is by no means a complete guide, it's just a collection of experiences I don't want to get lost. Comments and suggestions are welcome.
How to change the keyboard layout?
In the Netherlands most people are used to US International keyboards.
This means a default QWERTY layout but when writing for example é you type ' followed by e.
By default this does not work in Linux, but you can enable it (or any other keyboard layout you wish to use) by running dpkg-reconfigure console-data as root.
For US International behaviour, choose pc / qwerty / US American / Standard / US International (ISO 8859-15).
However, this setting only changes your console keyboard.
To change it in X11 (the graphical interface) as well, change the following option in /etc/X11/xorg.conf, where us-intl.iso15 is just an example layout (ISO 8859-15).
Option "XkbLayout" "us-intl.iso15"
How to copy and paste text in xterm / aterm?
Ctrl+C and Ctrl+V do not work in the terminal: click on your right mouse button to copy and on your middle button to paste.
What's wrong with hwclock in Debian Etch?
I don't know, but it seems severely broken on all installations I saw.
This results in problems when setting UTC/local time zones, among others.
Symptoms include saying NO to the hardware clock being interpreted as UTC during setup only to find out (with date) that Debian is using UTC anyway.
When Debian is your only OS this is not a problem - you can set the system clock to UTC - but Windows always assumes the system clock to be local.
(Those of you that spit on Microsoft for that should also consider the messup caused by this faulty hwclock!)
Anyway, the simple fix is to add --directisa to each instance of the command.
If you want to have Debian interpret your system clock as local time, do the following:
- in /etc/default/rcS choose UTC=no
- in /etc/init.d/hwclock add --directisa to all hwclock commands
- run tzconfig to set your timezone
- run hwclock --directisa --localtime --hctosys and date -s HH:MM and hwclock -w --directisa with HH:MM your current local time
- reboot and confirm that date gives the correct local time
Warning: using a hwclock --directisa command in a terminal under X11 may cause X11 to crash!
How to get the Windows fonts (Georgia, Impact, Tahoma, Verdana...)
You'll probaby need the common Windows fonts for compatibility with documents and websites. Install the msttcorefonts package with aptitude to arrange this. (Or use the command apt-get install msttcorefonts.)
Installing Debian on a harddrive with bad blocks
One day I wanted to install Debian 4.0r0 Etch (stable) on an old box with a 1GB harddrive. Unfortunately the drive had some bad blocks, which means there were physical areas on the drive that couldn't correctly read and/or write data anymore. This causes errors during the installation because the computer tries to write files but it doesn't work. The solution to this is (just as with Windows) finding the bad areas and marking them, so that they won't be used anymore. But it's kind of a tricky job right before a Debian installation, because you need to bypass the installer's partition management, which auto-mounts the drive to /target, preventing a proper write-check. (It can't be unmounted.) Here's how-to get the installation done anyway:
Solving DNS problems related to dhclient
Often when browsing on Debian Sarge (3.1r5), I would be stopped by apparently a failing DNS.
Pinging my router (192.168.1.1) was no problem at all, but visiting websites (like debian.net) would suddenly stop working.
When resetting the network, rebooting the machine or just retrying a lot, it would work for a short time and then stop again.
Very annoying! As cause I found that the DHCP client dhclient (which automatically obtains network settings) automatically overwrites the /etc/resolv.conf file, which contains DNS information.
The automatic DHCP information would not work well for me, it was:
search
nameserver 192.168.1.1
When manually editing the file, this would work:
nameserver 127.0.0.1
nameserver 192.168.1.1
search
But each time dhclient was run (i.e. each boot) the automatic, wrong values were reset. What to do? The solution can be found here, which is actually for NetBSD, which uses the same dhclient as Debian. Basically you have to make a file /etc/dhclient-enter-hooks (with any text editor, as root) and give it the following content:
make_resolv_conf() {
echo "doing nothing to resolv.conf"
}
Then you open /etc/resolv.conf in any text editor as root and modify it the right way. From now on, dhclient won't change the file: instead it will just show "doing nothing to resolv.conf"!
© 2006-2008 Arnoud Onnink: arnie[at]arnie.frih.net