Difference between revisions of "Installing Debian 6.0 (squeeze) on a ThinkPad X220"

From ThinkWiki
Jump to: navigation, search
m (Add X220 category.)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[User:Jdthood|I]] tried to install Debian 6.0 (squeeze) on a ThinkPad {{X220}}.
+
''(Please note: [[User:Jdthood|One user]] reported that the Debian 6.0 (Squeeze) installer did not include a driver for the Ethernet card in the X220. It is possible that this is due to hardware differences between models. Please check that your hardware is supported. As described below, the 4291 model works.)''
  
To attempt the installation I made use of another GNU/Linux computer on my home LAN
+
== Introduction ==
which is connected to the Internet through a familiar ADSL-modem/gateway/router/caching nameserver/DHCP server (call it "the gateway") at address 172.19.3.1.
+
Debian Squeeze can be installed without problems on the ThinkPad X220 (4291 model) using the [http://www.debian.org/CD/http-ftp/#stable 6.0.3 DVD].
The gateway's DHCP server issues leases in the range 172.19.3.2 to 172.19.3.100.
 
  
First I set up the "source" machine, in my case one with Ubuntu 11.04 installed.
+
However, wireless does not work out of the box. Also, in order to get the GPU to work properly, it is necessary to install newer X and kernel packages from Backports.
It has address 172.19.3.7 (assigned to it by the gateway's DHCP server).
 
For the X220 to boot from it the machine needs to run a DHCP server and a TFTP server.
 
The DHCP server serves only this special purpose since, as I mentioned, thegateway is the network's main DHCP server.
 
The source's DHCP server must be so configured that it doesn't conflict with the existing DHCP server.
 
  
Install the <tt>isc-dhcp-server</tt> package and edit <tt>/etc/dhcp/dhcpd.conf</tt> using the following as a model.
+
== Wireless ==
 +
Install the iwlagn kernel module [http://wiki.debian.org/iwlagn#Squeeze as described in the Debian wiki] (instructions are pasted below):
 +
 
 +
Add a "non-free" component to /etc/apt/sources.list, for example:
 +
<pre>
 +
# Debian Squeeze/6.0
 +
deb http://ftp.us.debian.org/debian squeeze main contrib non-free
 +
</pre>
 +
Update the list of available packages and install the firmware-iwlwifi and wireless-tools packages:
 +
<pre>
 +
# aptitude update
 +
# aptitude install firmware-iwlwifi wireless-tools
 +
</pre>
 +
The necessary kernel module should be automatically loaded. If necessary, it can be manually loaded via:
 +
<pre>
 +
# modprobe iwlagn
 +
</pre>
 +
Verify your device has an available interface:
 +
<pre>
 +
# iwconfig
 +
</pre>
 +
Raise the interface to activate the radio, for example:
 
<pre>
 
<pre>
ddns-update-style none;
+
# ifconfig wlan0 up
option domain-name-servers 172.19.3.1;  # This is the address of my do-it-all gateway
+
</pre>
option routers 172.19.3.1;              # This is the address of my do-it-all gateway
 
option subnet-mask 255.255.0.0;        # This is the netmask of my home network
 
default-lease-time 600;
 
max-lease-time 7200;
 
allow booting;
 
allow bootp;
 
  
subnet 172.19.3.0 netmask 255.255.255.0 {
+
Additionally, I had to pass the parameter 11n_disable=0 to the iwlagn module. Either do this:
  range 172.19.3.220 172.19.3.229;      # This is a range separate from the one used by the do-it-all gateway and includes the address below
+
<pre>
}
+
sudo modprobe -r iwlagn
 +
sudo modprobe iwlagn 11n_disable=0
 +
</pre>
 +
...or create the file /etc/modprobe.d/intel-5300-iwlagn-disable11n.conf with the following content:
 +
<pre>
 +
options iwlagn 11n_disable=0
 +
</pre>
 +
Then reload the wireless driver:
 +
<pre>
 +
sudo modprobe -r iwlagn
 +
sudo modprobe iwlagn
 +
</pre>
 +
It might be necessary to repeat the last step a couple of times.
  
group {
+
== Newer kernel ==
  next-server 172.19.3.7;              # This is the address of the "source"
+
Add the following line to /etc/apt/sources.list (or add a new file containing the line in /etc/apt/sources.list/d/):
  host trawsfynydd {                    # 'trawsfynydd' is the name I chose for the X220
+
<pre>
    hardware ethernet f0:de:f1:6b:22:bf; # This is the Ethernet address of the X220
+
deb http://backports.debian.org/debian-backports squeeze-backports main
    fixed-address 172.19.3.220;        # This is an address in the range as defined above
 
    filename "/pxelinux.0";
 
  }
 
}
 
 
</pre>
 
</pre>
 +
Run apt-get update.
  
Now install the <tt>tftpd-hpa</tt> package, download the network installation tarball and untar it into the location whence <tt>tftpd</tt> serves files.
+
Install the new kernel image:
 
 
 
<pre>
 
<pre>
$ cd /tmp
+
apt-get -t squeeze-backports install linux-image-2.6-amd64
$ wget http://http.us.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/netboot.tar.gz
 
$ cd /var/lib/tftpboot
 
$ sudo tar zxf /tmp/netboot.tar.gz
 
 
</pre>
 
</pre>
  
Second set up the X220 for PXE (Pre-boot eXecution Environment).
+
Reboot.
* Switch on the X220 and press F1.  ThinkPad Setup starts.
 
* Set Config | Network | Ethernet LAN Option ROM to "Enabled".
 
* Select Startup | Boot; select "PCI LAN IBA GE Slot..." and use the [+] key to move it to the top of the boot priority order
 
* Press F10 to save and exit.
 
  
Voilà, the X220 boots the Debian installer.
+
[http://backports-master.debian.org/Instructions/ Backports instructions].
  
Having got this far I discovered that Debian 6.0 lacks a driver for the Ethernet card in the X220.
+
== Graphics ==
 +
It is necessary to install a newer version of X from Backports. Please refer to [http://x.debian.net/reference/squeeze-backports.html this page] for instructions.
  
So I decided to [[Installing Ubuntu 11.04 (Natty Narwhal) on a ThinkPad X220|install Ubuntu 11.04 (Natty Narwhal)]].
+
[[Category:X220]]
 +
[[Category:Debian]]

Latest revision as of 11:04, 18 June 2015

(Please note: One user reported that the Debian 6.0 (Squeeze) installer did not include a driver for the Ethernet card in the X220. It is possible that this is due to hardware differences between models. Please check that your hardware is supported. As described below, the 4291 model works.)

Introduction

Debian Squeeze can be installed without problems on the ThinkPad X220 (4291 model) using the 6.0.3 DVD.

However, wireless does not work out of the box. Also, in order to get the GPU to work properly, it is necessary to install newer X and kernel packages from Backports.

Wireless

Install the iwlagn kernel module as described in the Debian wiki (instructions are pasted below):

Add a "non-free" component to /etc/apt/sources.list, for example:

# Debian Squeeze/6.0
deb http://ftp.us.debian.org/debian squeeze main contrib non-free

Update the list of available packages and install the firmware-iwlwifi and wireless-tools packages:

# aptitude update
# aptitude install firmware-iwlwifi wireless-tools

The necessary kernel module should be automatically loaded. If necessary, it can be manually loaded via:

# modprobe iwlagn

Verify your device has an available interface:

# iwconfig

Raise the interface to activate the radio, for example:

# ifconfig wlan0 up

Additionally, I had to pass the parameter 11n_disable=0 to the iwlagn module. Either do this:

sudo modprobe -r iwlagn
sudo modprobe iwlagn 11n_disable=0

...or create the file /etc/modprobe.d/intel-5300-iwlagn-disable11n.conf with the following content:

options iwlagn 11n_disable=0

Then reload the wireless driver:

sudo modprobe -r iwlagn
sudo modprobe iwlagn

It might be necessary to repeat the last step a couple of times.

Newer kernel

Add the following line to /etc/apt/sources.list (or add a new file containing the line in /etc/apt/sources.list/d/):

deb http://backports.debian.org/debian-backports squeeze-backports main

Run apt-get update.

Install the new kernel image:

apt-get -t squeeze-backports install linux-image-2.6-amd64

Reboot.

Backports instructions.

Graphics

It is necessary to install a newer version of X from Backports. Please refer to this page for instructions.