Difference between revisions of "Installing Debian Lenny on a ThinkPad T60"

From ThinkWiki
Jump to: navigation, search
(Installing Packages)
(Installing Packages)
Line 204: Line 204:
  
 
==Installing Packages==
 
==Installing Packages==
You might notice that even once you have your favourite window manager running, you're still missing quite a bit. For starters, you certainly don't have all the fonts that are available. To get pretty much all the European fonts that I could find, copy and paste the following onto the command line:
+
You might notice that even once you have your favourite window manager running, you're still missing quite a bit.
<pre>
+
 
cat << EOF | xargs aptitude install -y
 
gsfonts-other
 
fonty-rg
 
fonty
 
ttf-freefont
 
xfonts-terminus
 
ttf-dejavu-extra
 
ttf-dejavu-core
 
ttf-dejavu
 
defoma
 
xfonts-ay
 
xfonts-bitmap-mule
 
xfonts-biznet-100dpi
 
xfonts-biznet-75dpi
 
xfonts-biznet-base
 
xfonts-dosemu
 
xfonts-efont-unicodepki
 
xfonts-efont-unicode-ib
 
xfonts-intl-european
 
xfonts-jmk
 
xfonts-kaname
 
xfonts-kapl
 
xfonts-kappa20
 
xfonts-knickers
 
xfonts-marumoji
 
xfonts-mona
 
xfonts-mplus
 
xfonts-naga10
 
xfonts-nexus
 
xfonts-terminus
 
xfonts-terminus-dos
 
xfonts-terminus-oblique
 
xfonts-x3270-misc
 
tv-fonts
 
toilet-fonts
 
msttcorefonts
 
ttf-ancient-fonts
 
ttf-baekmuk
 
ming-fonts-opensymbol   
 
ttf-beteckna
 
ttf-bitstream-vera
 
ttf-bpg-georgian-fonts
 
ttf-breip
 
ttf-dustin
 
ming-fonts-dejavu
 
ttf-ecolier-court
 
ttf-ecolier-lignes-court
 
ttf-essays1743
 
ttf-f500
 
ttf-fifthhorseman-dkg-handwriting
 
ttf-freefont
 
ttf-georgewilliams
 
ttf-gfs-artemisia
 
ttf-gfs-bodoni-classic
 
ttf-gfs-complutum
 
ttf-gfs-didot-classic
 
ttf-gfs-gazis
 
ttf-gfs-neohellenic
 
ttf-gfs-solomos
 
ttf-gfs-theokritos
 
ttf-inconsolata
 
ttf-isabella
 
ttf-junicode
 
ttf-konatu
 
ttf-larabie-deco
 
ttf-larabie-straight
 
ttf-larabie-uncommon
 
ttf-linux-libertine
 
ttf-mgopen
 
ttf-mph-2b-damase
 
ttf-ocr-a
 
ttf-oflb-euterpe
 
ttf-opensymbol
 
ttf-radisnoir
 
ttf-root-installer
 
ttf-sil-andika
 
ttf-sil-charis
 
ttf-sil-doulos
 
ttf-sil-gentium
 
ttf-sjfonts
 
ttf-staypuft
 
ttf-summersby
 
ttf-thryomanes
 
ttf-tuffy
 
ttf-vlgothic
 
ttf-xfree86-nonfree
 
ttf-xfree86-nonfree-syriac
 
ttf-atarismall
 
EOF
 
</pre>
 
Now for some essential packages:
 
  
 
[[Category: Debian]]
 
[[Category: Debian]]
 
[[Category: T60]]
 
[[Category: T60]]

Revision as of 08:11, 8 January 2008

Debian Lenny on a T60 6371-6NU

You might also want to check out Debian Etch on a Thinkpad T60 HowTo and Installing_Debian_Lenny_on_a_ThinkPad_T61.

In case you can't decode the Thinkpad model number above, here are the specs (I've left out modem, infrared, cardbus since I haven't ever used them):

Processor Intel Core 2 Duo (Merom) 1.83GHz
Graphics Adaptor Intel Graphics Media Accelerator 950
Display 15.4" TFT display with 1200x800 resolution (widescreen)
RAM 1 GB PC2-5300 (upgraded to 2GB)
Harddisk 120GB 5400 RPM Hitatchi HTS54161
Audio AD1981HD HD Audio 1.0 controller
Ethernet 82573L Gigabit Ethernet Controller
Optical LG-Hitatchi HL-DT-ST DVDRAM GSA-4083N Dual Layer DVD+/-RW
Wireless Atheros AR5418
Biometric STMicroelectronics Fingerprint Reader

I'm going to do everything in Linux (i.e. assume that you already have a running linux version running somewhere else).

Installation

These are instructions for getting the most customised, minimal base Debian system running. As such, you can probably go with your gut and ignore some of these steps for example using the "expert" install mode or deselecting all but the base system packages.

  1. First of all, get the "businesscard" cd image for amd64 if you want to run 64 bit or i386 if you want 32 bit. Note however that going 64 bit no longer means you have to forgoe proprietary software like flash or java. See this article on the "debian adminstration" blog. If you do however go 64 bit you won't be able to use proprietary 32 bit modules in your kernel. Most notably, ndiswrapper won't work with 32-bit windows drivers.
  2. Burn the cd image to a cd with the command
    cdrecord -v debian-testing-amd64-businesscard.iso
    You may find that you need to add dev=/dev/cdrom (or whatever your burning device is) to the above command.
  3. Now stick in the newly burned disc and reboot.
  4. At the "boot:" prompt type "expert (you could also just hit enter, but you won't get as much control over what's about to be installed on your computer).
  5. Go through the install menu using my answers as outlined below as a guide. You will obviously want to tailor things to your specific situation:
  • Choose Language
    • Choose Language:
      English
    • Choose a locale:
      en_CA (stick with ascii for the default since UTF screws up some terminals)
    • Choose other locales to be supported:
      en_CA.UTF-8
      en_GB.UTF-8
      en_GB
      en_GB.ISO-8859-15
      en_US.UTF-8
      en_US
      en_US.ISO_8859_15
  • Select a Keyboard layout
    • Type of Keyboard:
      PC-Style
    • Keymap to use:
      American English
  • Detect and mount CD-ROM
    • Modules to load:
      <none> (deselect usb-storage, its not needed unless your using a external USB CD drive to read the install disc)
  • Load installer components from CD:
    • Installer components to load:
      <none>
  • Detect network hardware
    • Modules to load:
      <none>(I don't imagine you'd need usb-storage here either unless you were using a USB networking device)
  • Configure the network
    • Auto-configure DHCP:
      yes
    • Hostname:
      <omitted>
    • Domain Name:
      <omitted>
  • Choose a mirror of the Debian archive
    • Protocol for file downloads:
      ftp (might be a tiny bit faster than http, though the latter is less likely not to work if you're behind a draconian firewall. http is also slightly easier because you get a list of available mirrors whereas with ftp, you have to know the address already)
    • Debian archive mirror hostname:
      mirrors.kernel.org
    • Debian archive mirror directory:
      /debian
    • FTP proxy information:
      <blank> (unless you're behind one of the draconian firewalls mentioned above, in which case figure out the proxy to use from your network administrator.)
    • Debian version to install:
      testing
  • Configure the clock
    • Set the clock using NTP?:
      yes
    • NTP Server to use:
      ntp.ubc.ca (though the default provided or any other you prefer should work just as well.)
    • Select your timezone:
      Pacific
  • Detect disks
    • Modules to load:
      <none> (again not necessary unless you want to install onto a USB drive)
  • Partition Disks
    • Partition Method:
      manual
    • This depends largely on personal preference, and needs, but here's how I set up the disks:
      200MB EXT3 /boot
      1.0GB swap
      15GB XFS /
      2GB XFS /var
      All remaining disk space XFS /home
      I use XFS because this tends to be faster than ext3. Reiserfs is also a good alternative but takes a little longer to mount at bootup. Grub has some problems reading XFS, so I use ext3 for the /boot partition. If you're keeping your windows partition, just leave it alone, we'll get to that in a bit. Once you're done setting things up select "Finish partitioning and write changes to disk.
    • Write chages to disk?:
      yes
  • Install the base system
    • Kernel to install:
      linux-image-2.6.22-3-amd64 (or whatever newer one is available by the time you read this).
  • Setup users and passwords
    • Enable shadow passwords:
      yes (duh)
    • Allow login as root:
      yes (unless you're really paranoid)
    • Root password:
      <omitted>
    • Create a normal user account now?:
      yes
    • Full Name:
      <omitted>
    • Username for your account:
      <omitted>
    • Password:
      <omitted>
  • Configured the package manager
    • Use non-free packages:
      yes (unless you have some restrictions ideological or otherwise)
    • Services to use:
      security updates
      volatile updates
  • Select and install software
    • Participate in package usage survey?:
      yes (why not help make Debian even better?)
    • Choose software to install:
      <none>(deselect Desktop environment, Laptop and Standard System, we'll install all the necessaries manually in a bit).
  • Install GRUB boot loader on hard disk
    • Install GRUB 2:
      no (for some reason it doesn't work)
    • Device for bootloader installation:
      /dev/sda (unless you have some other bootloader you want to use to chain to GRUB).
    • Grub password:
      <omitted> (don't make this your root password as it ends up in your menu.lst file as plaintext).
  • Skip LILO (unless you like pain)
  • Debconf priority:
    • Prompt at or above:
      critical (I want to be able to automate updates)
    • Finish the installation
    • Finish th einstallation

The First Boot: getting the ball rolling

You should boot up to a commandline login prompt (X-Windows hasn't been installed yet). Log in as root. It's now time to install the packages necessary to get things running. You'll find that thanks to the business card installation, you have an up to date system (i.e., aptitude update&& aptitude dist-upgrade won't find any packages needing upgrade. So lets get on with installing all the packages necessary to get things looking a little more like home.

First of all, there are a few things even in the base system that you probably won't need so get rid of them:

aptitude purge nano pcmciautils tasksel tasksel-data vim-common vim-timy

Of course, you'll want to keep pcmciautils if you plan on using antiquated pcmcia cards. Similarly you may want to keep vim and/or nano if you use those editors. If on the other hand, you're like me, you don't and you'll then want to

aptitutde install emacs

Now if you're like me and you're craving a windowed multitasking work environment before you go any further, you can just do

aptitude install xorg gdm <your favourite window manager (e.g. gnome or openbox)>

Now do a

/etc/init.d/gdm start

And you should get a login screen.

Now do a

df -h

You'll find that the entire operating system including window manager is well under 2.0 Gigs. It's even under 1.0 Gigs if you're using a lightweight window manager like openbox or blackbox. Take your 15GB and shove it Vista!

Xorg.conf

Ah, the infamous xorg.conf. Luckily, since your running Debian lenny on an Intel integrated graphics chip, editing xorg.conf isn't strictly necessary. Intel has gone to a lot of trouble to make this as painless as possible. God help you if on the other hand, you got a model with an ATI X1300 or ATI X1400 graphics card. I made a few modifications to the automatically generated xorg.conf that might be of interest.

Horizontal edge scrolling

Edge scrolling has to be my favourite pointing device feature ever, thus I find it rather annoying that it is only half enabled by default. In particular you'll find that though vertical scrolling works like a charm, horizontal scrolling along the bottom of the touchpad doesn't work. Additionally, I find that the default threshold edge distance to initiate scrolling is a little on the large side for my slender fingers. I also find that the corner button emulation tends to be accidentally activated while using edge scrolling so I disable it. Thus, I have updated the relevant input device section to make use of some of the options documented on the Synaptics Touchpad page

Xinerama

There is also the issue of using dual monitors. You'll be surprised to find that it "just works" if you have an external monitor plugged in. Well, it kind of "just works" if you like having the displays that is. If, on the other hand you want to expand your desktop, you can either do the configuration on the fly with XRandR, or make it permanent by making the appropriate modifications to xorg.conf

Configuring the package manager

The best thing about Debian is the package manager. Thus, you want to make sure it's configured optimally to get the best use out of it before you go any further. Once you're logged in, you can edit the /etc/apt/sources.list file so that it can find more packages than the default. Below is my sources.list file.

# testing - lenny
deb ftp://mirrors.kernel.org/debian/ lenny main contrib non-free
deb-src ftp://mirrors.kernel.org/debian/ lenny main contrib non-free

# stable - etch
deb ftp://mirrors.kernel.org/debian/ etch main contrib non-free
deb-src  ftp://mirrors.kernel.org/debian/ etch main contrib non-free

# unstable - sid
deb ftp://mirrors.kernel.org/debian/ sid main contrib non-free
deb-src ftp://mirrors.kernel.org/debian/ sid main contrib non-free

# experimental
deb ftp://mirrors.kernel.org/debian/ experimental main contrib non-free
deb-src ftp://mirrors.kernel.org/debian/ experimental main contrib non-free

# security updates
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

You'll notice that I've also included entries for etch and sid in addition to experimental. If you use a different mirror than mirrors.kernel.org, you'll want to make sure that it hosts the experimental branch. This is where we'll find the package for the fingerprint reader. I include stable and unstable for completeness in case there are packages I want that that are only available in unstable, or if I want to revert to a version of a package in stable. Note that the order you specify the branches in the sources.list file makes no difference, thus in order to maintain priority for lenny packages (over sid or experimental which in general have newer packages), I also have an /etc/apt/preferences file with pin priorties:

Package: *
Pin: release o=Debian,a=stable
Pin-Priority: 300

Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 600

Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 200

Package: *
Pin: release o=Debian,a=experimental
Pin-Priority: 100

Basically this is saying that unless I specify otherwise, "testing" (lenny) packages are to be preferred over "stable" (etch) over "unstable" (sid) over "experimental". A lower Pin-Priority means lower precedence. If you want to override this precedence, you can either use the aptitude gui and select a specific version to install or add the flag -t <target branch> to your aptitude install <package> command. If you do this in such a way as to select a package that has a newer, higher priority alternative available, it will be upgraded next time you do an aptitude upgrade unless you pin that particular package version (see the relevant section of the apt howto).

We'll also want to have access to various multimedia packages and libraries that Debian doesn't include for legal reasons (e.g., lame, libdvdcss). To achieve this, we need to add a debian-multimedia mirror. For example, to use the ftp://gulus.usherbrooke.ca/ mirror, we type

cat << EOF > /etc/apt/sources.list.d/debian-multimedia.list
deb ftp://gulus.usherbrooke.ca/debian-multimedia/ stable main
deb-src ftp://gulus.usherbrooke.ca/debian-multimedia/ stable main
EOF

Note that each file in /etc/apt/sources.list.d/ is sourced and concatenated to the contents of /etc/apt/sources.list whenever you do an aptitude update. This is a convenient way to manage multiple diverse mirrors for different programs you may have installed.

Now that we have that sorted out we should do an

aptitude update

If by some chance you get an annoying message like

W: GPG error: <servername> <branch> Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907
W: You may want to run apt-get update to correct these problems

(especially annoying because it happens when you run apt-get update as well), the solution is to run the following command:

gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 07DC563D1F41B907 && apt-key add /root/.gnupg/pubring.gpg && aptitude update

where you of course replace "07DC563D1F41B907" with what ever public key you get in the orginal GPG error message. Now of course, the reason this is happening is to ensure your security. You don't want to be downloading packages from unknown or forged sources, so don't just go verifying keys willy nilly without thinking about why you might be getting such a message. In particular, if the message appears even though you haven't recently changed your mirror, something fishy might be going on.

Installing Packages

You might notice that even once you have your favourite window manager running, you're still missing quite a bit.