How I installed Debian Lenny on a Dell Inspiron 1525

My old laptop, though still working, needed to be replaced before it died completely.  Following some research into linux-friendly laptops, and still extremely satisfied with my 5+ year old Inspiron -- which still works --, I purchased another one: a Dell Inspiron 1525.

This post describes the steps I took to have a fully functional dual-boot with an encrypted Debian lenny OS as well as some specific software (such as a Chinese IME).



Version history

2009/09/29  02:03:28 EDT
  • First version

2009/09/29  17:08:32 EDT
  • Added a working comments section



Intended audience and purpose

This guide is aimed at someone wishing to install an encrypted Debian Lenny operating system on a Dell Inspiron 1525 and getting all the hardware to work on it.  Given the number of distributions based on Debian, this guide may be of interest to others, too (eg: Ubuntu, Knoppix, etc).

It assumes some basic knowledge in partitioning when first installing linux, some basic linux commands and simple tasks such as editing files.  You don't have to be a guru, but you also can't be afraid of the command line.

I am writing this with the hopes that it may be helpful to others.

Description of Computer

Some of the relevant hardware as printed on the invoice (and in the same order) is:
  • Intel Core 2 Duo T6500
  • 4 GB, DDR2, 800Mhz 2 Dimm
  • 8X DVD+/-RW Dual Layer Drive
  • Integrated 1.3M Pixel Webcam
  • Intel Graphics Media Accelerator X4500HD
  • 15.6 High Definition+ (900p) Bright LEF Display with TrueLife
  • 320G 5400RPM SATA Hard Drive
  • Intel 5100 Wireless-N (1x2) Half Mini-Card
  • Integrated Gigabit (10/100/1000) Network Card for XPS 1340
  • Dell Wireless 365 Bluetooth Module (2.1)

The hard drive came with the 3 following primary partitions:
  1. A tiny 40 MB fat16 partition  -- I assume this is a Dell diagnostic partition, though I haven't looked into it
  2. A 15 GB ntfs partition -- I assume this is the Windows recovery partition, though I haven't looked into this, either
  3. Vista takes the rest
What is perhaps of more interest though, is the output of various commands.  You can download the output of all of these as well as more, at the bottom of this page.


$ lspci

00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller (rev 13)
0c:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100



$ lspci -n

00:00.0 0600: 8086:2a40 (rev 07)
00:02.0 0300: 8086:2a42 (rev 07)
00:02.1 0380: 8086:2a43 (rev 07)
00:1a.0 0c03: 8086:2937 (rev 03)
00:1a.1 0c03: 8086:2938 (rev 03)
00:1a.2 0c03: 8086:2939 (rev 03)
00:1a.7 0c03: 8086:293c (rev 03)
00:1b.0 0403: 8086:293e (rev 03)
00:1c.0 0604: 8086:2940 (rev 03)
00:1c.1 0604: 8086:2942 (rev 03)
00:1c.2 0604: 8086:2944 (rev 03)
00:1c.4 0604: 8086:2948 (rev 03)
00:1d.0 0c03: 8086:2934 (rev 03)
00:1d.1 0c03: 8086:2935 (rev 03)
00:1d.2 0c03: 8086:2936 (rev 03)
00:1d.7 0c03: 8086:293a (rev 03)
00:1e.0 0604: 8086:2448 (rev 93)
00:1f.0 0601: 8086:2919 (rev 03)
00:1f.2 0106: 8086:2929 (rev 03)
00:1f.3 0c05: 8086:2930 (rev 03)
09:00.0 0200: 11ab:4354 (rev 13)
0c:00.0 0280: 8086:4232



$ lsusb

Bus 007 Device 004: ID 0c45:63ee Microdia
Bus 007 Device 003: ID 0bda:0158 Realtek Semiconductor Corp. Mass Stroage Device
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 413c:8160 Dell Computer Corp.
Bus 001 Device 004: ID 413c:8162 Dell Computer Corp.
Bus 001 Device 003: ID 413c:8161 Dell Computer Corp.
Bus 001 Device 002: ID 0a5c:4500 Broadcom Corp.
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub



Steps to Make a dual-boot Vista / encrypted Debian lenny machine

The computer came with Vista preinstalled.  Although I haven't used Windows on a personal computer in years, I did have a 320 GB hard drive, which is likely larger than what I needed.  I decided to keep -- but shrink -- Vista and to also install linux, thereby making it a dual-boot computer.

"Shrinking" Vista

Vista is a bit trickier to resize than XP.  Although both use the NTFS filesystem, it was slightly modified in Vista so that you can't resize it using linux tools or else Windows won't boot properly again.  You have to shrink it using the Vista OS.  Unfortunately and for some idiotic reason, there is a maximum amount by which one can easily shrink a partition.  In my case, it didn't permit a partitoin smaller than something like 200 GB -- which is ridiculous as, though bloated as Windows is, it was a fresh install.  I followed various guides online on how to get it to shrink more by turning off various features which used space on the hard drive but couldn't be moved from their physical locaton.  It was a waste of time and I wasn't able to get it to my target of about 200 GB for linux.  I solved the problem by reinstalling Vista to a newly created 60 GB partition using the DVD in the box.  Argh.

I'm far from being a Windows expert, so your mileage may vary and I would be curious to hear from you if you were able to substantially shrink Vista on a hard drive this size.

Installing the base encrypted system

I downloaded the first dvd and burned it using my old computer.  That's what I used to install debian.

I won't go into extensive detail into installing an encrypted base system as many other pages on the web deal with this already. 

Three primary partitions were already taken by the diagnostic, recovery and windows partitions, respectively.  I created an extended partition (/dev/sda4) containing 3 logical partitions:
  • a 100 GB ext3 partition (/dev/sda5) used for storing music and to perhaps be shared with windows (through some ext3 software on windows)
  • a "massive" 200 MB ext3 partition (/dev/sda6), not encrypted, used for /boot
  • a 100 GB partition (/dev/sda7) to be used as an encrypted LVM volume group containing 2 logical volumes: an 8 GB swap and the rest as root
I think I'm starting to regret having kept the music partition separate from the rest of my root partition.  I may look into "fixing" this down the road...

I prefer kde to gnome, so installed all the required kde packages instead of gnome during the installation installion.

Confirming that GRUB works and that both OSes boot

I don't have much to say, except that it worked.  I've never really had problems with GRUB (or lilo) when installing linux before.  Nothing new this time.

Getting all the hardware to work in lenny

KDE (yes! before the more obvious stuff like kernels and harware!)


Upon my first boot into lenny, I immediately noticed that kde wasn't starting.  Long story short: there's a weird glitch or bug in the debian installer in that it doesn't properly install kde in some weird situations.

Here's a post describing the same thing:

http://www.linux-archive.org/debian-kde/332462-debian-lenny-current-refusing-install-kde.html

I found an official bug report somewhere, too.

I resolved the problem by installing some fundamental kde package, though I can't remember which one -- perhaps kdebase.  I think that aptitude asked for the DVD, I complied, and a few minutes later I had kde up and running.  But perhaps I was online for this.  Can't remember.

Maybe what I did was something like, but your mileage may vary:

# aptitude install kdebase

Lenny-backports kernel and wifi stuff

Because the wireless card  worked better with a newer kernel, I started with getting just that: a newer kernel.

My wired ethernet worked fine.  I decided to get the debian-backports kernel, so I essentially created the new file /etc/apt/sources.d/backports.list, updated aptitude, installed the backports keyring, and finally installed the kernel and the wifi stuff.  Omitting the output and the possible prompting along the way, this amounts to:



# aptitude update

# aptitude -t lenny-backports install debian-backports-keyring

# aptitude -t lenny-backports install linux-image-2.6.30-bpo.1-$(uname -r | sed 's,.*-,,g') firmware-iwlwifi wireless-tools


The last step just makes sure that you're installing the correct kernel for you rarchitecture.  On this machine, this amounts to the amd64 kernel (i.e. linux-image-2.6.30-bpo.1-amd64).

And booya! If we reboot, we've got a newer kernel and wifi working out of the box.  Nice.

Graphics card

Although I could tell that the graphics card was working, a quick look at the /var/log/Xorg.0.log indicated that I was using the vesa driver and not the intel driver.  I was surprised to notice that the /etc/X11/xorg.conf file was empty -- or non-existing? can't remember -- so I created it:

$ cat /etc/X11/xorg.conf
Section "Device"
        Identifier      "Intel VGA Card"
        Driver          "intel"
        Option "XAANoOffscreenPixmaps" "true"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "Intel VGA Card"
EndSection

# for compiz
Section "Extensions"
        Option "Composite" "enable"
EndSection


Section "Module"
    Load "glx"
    Load "dri"
EndSection


Section "DRI"
    Mode 0666
EndSection


Restart your Xsession and Boom.  You're using the intel driver and have way better graphics.  If you wanted to use compiz, now you can!

Microphone

You just have to tweak kmix (or alsamixer) for that.  In kmix, I notice that everything works when I:





Webcam

All you need is to make sure you load the module and have a program to test it.  I used luvcview, but any other will likely do.

# modprobe uvcvideo


And boom!  All our hardware is up and running!



Miscellaneous software (that may not be trivial)

Here's a quick enumeration of a few things I wanted.  These things aren't hardware related, though some of them do require amd64 packages.

Chinese IME

I decided to install scim and skim and a bunch of fonts:

# aptitude install skim scim-chinese scim-array scim-chewing scim-tables-zh scim-panel-kde scim-qtimm

$ aptitude search ttf | grep Chinese

and install some of those... if you don't know which ones, just install them all.

Finally, set the environment variables for all users by creating a new /etc/X11/Xsession.d/95xinput:

$ cat /etc/X11/Xsession.d/95xinput

export XMODIFIERS='@im=SCIM'
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"


現在可以輸入中文!

Acrobat Reader


We have to pull the multimedia repository in because acrobat isn't free.  I started by creating the /etc/apt/sources.list.d/multimedia.list file.  But the next step is way more complicated that you think it would be.  The problem is that there is no amd64 package for this so we need to install the libs to permit installing the 32-bit one.

$ cat /etc/apt/sources.list.d/multimedia.list
deb http://www.debian-multimedia.org stable main

# aptitude install -t debian-multimedia debian-multimedia-keyring

# aptitude install ia32-libs ia32-libs-gtk

# aptitude install acroread



Skype

It doesn't seem like repositories for skype exist anymore.  I just got and installed the 2 ubuntu medibuntu packages, which worked fine from here:

http://packages.medibuntu.org/hardy/skype.html

# aptitude install ia32-libs lib32asound2 lib32gcc1 lib32nss-mdns

# dpkg -i skype-common_2.0.0.72-0medibuntu1.1_all.deb skype-static_2.0.0.72-0medibuntu1.1_amd64.deb

I know that there's some repeat between acroread and skype.  I just can't exactly remember what I installed when...

OpenOffice.org

I simply installed it from lenny-backports:

# aptitude install -t lenny-backports openoffice.org

List of downloadable files

I'm including various files and output from commands here for whoever wants to use them.


$ lspci > lspci.txt

$ lspci -n > lspci-n.txt

$ lspci -v > lspci-v.txt

$ lsusb > lsusb

$ cat /etc/X11/Xsession.d/95xinput > 95xinput

$ cat /etc/apt/preferences > preferences

Comments

Sorry that this looks so crappy.  It works, though.








Comments Form