previous  next

Installing Debian on an AMD64


March 21, 2006

To some people, it may seem premature to go the 64-bit route right now but if you're like me, a poor migrant who only upgrades a PC once in six or seven years, then it makes sense to do so. The last PC I built for my own use was put together with assistance in 1999 - a Celeron 466 with 128-meg of RAM (which was later expanded to 384 MB and still serves me to this day).

If you look at the mailing list for running Debian on the AMD64, you'll notice that it goes back to mid-2003! So maybe one is not so much ahead of the times as first thought.

There are a choice of Linux distributions which have genuine 64-bit versions out. Some applications are yet to be ported - the main one that stands out is the office productivity suite OpenOffice.org - but things are moving fast. In the end, it comes down to what you are familiar with - having used Debian since the year 2000, I was not about to change. 

Thanks are due to Graham Smith for his detailed account of getting an AMD-64 box up and running from which I've borrowed a lot; however, as he points out, the modus operandi will vary from person to person and my experience is no exception. Graham was also kind enough to respond to an email which I sent him well before I even sourced the bits and pieces for my box.

Thanks also to Andrew E. Schulman who maintains a Debian nVidia-howto from where I obtained one valuable piece of information which helped me avoid a known Debian bug.

The Debian AMD64 howto is somewhat dated, but worth a read.

My hardware:

Gigabyte NVIDIA GeForce 6200 PCI-Express video card (specs)
ASUS A8N-SLI motherboard (specs)
Antec Sonata II case  (specs)
4 x 512MB Hynix DDR400 PC3200 RAM
160GB Seagate SATA drive
LG Dual-layer DVD burner
AMD64 3000+ (socket 939) processor
Surecom Ethernet PCI adaptor

All parts were sourced from a swap meet dealer from whom I've been buying bits and pieces for nearly seven years.

I've built more than 50 PCs over the same period, but you always learn something new. This was the first time I encountered a separate ATX power connector to the motherboard. As I did not connect it, the box wouldn't boot. Finally, a friend noticed this and pointed it out to me.

Having picked up two 1 gig strips of Elixir RAM initially, I changed them for four 512 Hynix strips later after I read in the motherboard manual that RAM with 128-meg memory chips would not function with the A8N-SLI due to limitations of the CPU. I didn't wait to test it; maybe I should have. The 512 Hynix modules I got are single-sided; they aren't listed as usable in the manual but they work fine. 

The A8N-SLI has an nForce4 network card onboard but having read that it is difficult to get it up and running during the base install, I bought an el cheapo network card as I was doing a network install.

If you want to reduce costs, you can get a 754 socket processor which is cheaper. You can also reduce the amount of RAM. And, of course, you can get a much cheaper case - the one I got is super silent.

I used the latest Debian stable 64-bit net install image from here. The installation is fairly straighforward - the base install is gone through and then, after manual network configuration - I don't use DHCP on my LAN - the installer takes one through a reboot and then asks for a source for installing the remaining packages - cdrom, ftp, http and so on.

You can choose the packages individually or else pick a configuration. I chose the desktop option as I am incredibly lazy - you can do the same unless you are setting up a server, in which case options are available. In any case, installing packages on Debian is easy and additionally I was impatient to get the box configured.

I used http but the Australian mirrors were out of date so I used an American mirror to download the necessary packages. It was slow as I was doing it late at night (curious how all these things get done well  past midnight isn't it?), the time when the US is awake.

Why use stable? I first wanted to get a working X-setup using XFree and then update to testing which is what I've been using on my workstation for the past two years. In my experience, it is painless to move from Xfree-86 to x.org once you've got a working X server configuration.

While the packages were coming down the tube, I did some more reading and decided to download the nVidia binary drivers for both the nForce4 network card and the nVidia video card that I was using. As things turned out, in the end I didn't need them.

After the download is completed, the installer does take one through setting up X but there is no nvidia driver available to make it work. Hence, you will have a broken X configuration after the packages are installed. Now comes the interesting bit.

Edit the /etc/apt/sources.list and add contrib and non-free. This is how it looks:

deb <chosen-mirror> stable main contrib non-free
deb-src <chosen mirror> stable main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free

Then after an apt-get update, install gcc-3.4, nvidia-kernel-source, nvidia-kernel-common, kernel-package and kernel-headers-2.6.8-11-amd64-generic.

The name for the last package depends on the kernel you are running -  check by doing an "uname -a" and modify appropriately.

The nvidia-kernel-source gets dumped in /usr/src. Move to that directory and unpack it:

cd /usr/src
gunzip nvidia-kernel-source.tar.gz
tar -xf nvidia-kernel-source.tar

Then:

cd kernel-headers-2.6.8-11.amd64-generic
CC=gcc3.4 make-kpkg modules_image

The module you have built gets put in /usr/src

Move to that directory and install it by running:

dpkg -i nvidia-kernel-2.6.8-11-amd64-generic_l.0.7174-3+10.00.Custom_amd64.deb

Now install the nvidia-glx and nvidia-glx-dev packages.

After that you need to redo your X configuration.

First back up the old file:

cp -p /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.bak

Then tell your system that the XF86-Config-4 file has never been edited:

md5sum /etc/X11/XF86Config-4 >| /var/lib/xfree86/XF86Config-4.md5sum

If this is not done, the whole process of redoing the X configuration is gone through and no new configuration file is generated. This is Debian bug #223929 (Thanks, Andrew E. Schulman).

Now reconfigure your X server:

dpkg-reconfigure xserver-xfree86

Choose the nvidia X server driver; deselect the GLcore and dri X server modules and select glx.  

If you know the vertical and horizontal refresh rates for your monitor, choose the advanced option when asked to select a monitor. The rest of the configuration is pretty straightforward.

After the X configuration file is written, run startx at your user prompt. Bingo.

Bouquets, brickbats etc to this email address. Remove the "nospam" before hitting the send button.

previous back to home page