Difference between revisions of "Installing Debian on a ThinkPad T420"

From ThinkWiki
Jump to: navigation, search
(←Created page with '==The machine== This is a {{T420}} that I bought secondhand off Ebay in December of 2013. I opted to buy this instead of a new Thinkpad because I dislike the new 6-row...')
 
(fleshing it out)
Line 10: Line 10:
 
* Intel Centrino Advanced-N 6205 (Taylor Peak) 2x2 AGN WLAN adapter
 
* Intel Centrino Advanced-N 6205 (Taylor Peak) 2x2 AGN WLAN adapter
  
 +
==Installation==
 +
===Preparing a Bootable Flash Drive===
 +
I installed Debian 7.3.0 (Wheezy) from a bootable flash drive.  The process of creating bootable flash drive is described [http://hyper.to/blog/link/debian-installer-on-a-usb-key/ here]. It is helpful to add [http://packages.debian.org/wheezy/all/firmware-iwlwifi/download firmware-iwlwifi] to this drive so wireless networking can work while you're installing.  The installer will notice this and install it automatically.
  
==Installation==
+
===Installing ''wicd'' With Preseed===
I installed Debian 7.3.0 (Wheezy) from a bootable flash drive. The process of creating bootable flash drive is described [http://hyper.to/blog/link/debian-installer-on-a-usb-key/ here]. It is helpful to add the non-free firmware [http://www.google.com/search?hl=en&q=firmware-linux-nonfree+0.36+_all.deb package] and wifi firmware [http://www.google.com/search?hl=en&q=firmware-iwlwifi_0.36+wheezy.1_all.deb package] to this drive so wifi can work while you're done installing.
+
A helpful extra step is to use preseeding to have ''wicd'' installed automatically and to add the first user added to the ''sudo'' group. With ''wicd'' you can easily connect to a WiFi access point without a GUI. Create a text file named ''preseed.cfg'' on the flash drive and put the following in it:
 +
 
 +
d-i passwd/user-default-groups string cdrom floppy sudo audio dip \
 +
    video plugdev netdev scanner bluetooth
 +
d-i pkgsel/include string sudo wicd-curses wicd-cli
 +
 
 +
At the bottom of the aforementioned instructions on making a bootable flash drive are instructions on getting the ''preseed.cfg'' file installed to the drive.
 +
 
 +
When you boot into your new system, remember that you need to explicitly tell ''wicd'' what the wireless LAN device is. Use the {{cmdroot | ifconfig}} command to check what it is. This turned out to be ''wlan0'' for me, but it might be different if you have a different interface.
  
(note: will adding the ''wicd'' packages to the flash drive cause it to be automatically installed?)
+
Preseeding is a great way to preselect what you want an install to do, saving you time and aggrivation.  Read more about it [https://wiki.debian.org/DebianInstaller/Preseed here] and [http://www.debian.org/releases/stable/i386/apbs02.html.en here].  As demonstrated here, you don't have to have a long and drawn-out preseed.cfg file.
  
 +
===Booting the Flash Drive===
 
Plug in your bootable flash drive and turn on your T420.  Quickly press F1 to get into the BIOS.  Check to make sure that booting from a USB flash drive is enabled.  Don't change its priority.  If you changed anything, save and exit to reboot the machine.  Quickly press F12 to get a boot menu and select the flash drive.  The Debian installation process will then begin.
 
Plug in your bootable flash drive and turn on your T420.  Quickly press F1 to get into the BIOS.  Check to make sure that booting from a USB flash drive is enabled.  Don't change its priority.  If you changed anything, save and exit to reboot the machine.  Quickly press F12 to get a boot menu and select the flash drive.  The Debian installation process will then begin.
  
After answering questions about what keyboard you have, timezone, root password, first user, and so on; you will be shown a menu of software to install.  There are ten options.  "Debian Desktop Environment", "Laptop", and "Standard system utilities" should be preselected for you.  If you don't care for Gnome3, deselect "Debian Desktop Environment".  That will yield a machine with no X11 at all.  The process for installing MATE is detailed below.
+
===Not Installing a GUI===
 +
After answering questions about what keyboard you have, timezone, root password, first user, and so on; you will be shown a menu of software to install.  There are ten options.  "Debian Desktop Environment", "Print server", "Laptop", and "Standard system utilities" should be preselected for you.  If you don't care for Gnome3, deselect "Debian Desktop Environment".  That will yield a machine with no GUI at all.  Detailed below is the procedure for installing MATE.
  
 
The remaining steps of the install process are uneventful.  You will end up with a bootable and usable system.
 
The remaining steps of the install process are uneventful.  You will end up with a bootable and usable system.
Line 40: Line 53:
 
This will enable you to start an X session by typing "startx".
 
This will enable you to start an X session by typing "startx".
  
===Wireless===
 
I prefer using ''wicd'' for controlling network connections.  Doing the following as root should install all you need for that {{cmdroot | apt-get install wicd-cli wicd-curses wicd-gtk}}
 
You will need to explicitly tell ''wicd'' the name of your wireless device name.  It won't guess.  Go to Preferences and you'll see a section labeled "Network Interfaces".  The "Wireless Interface" field is blank.  Put ''eth1'' there.
 
  
 
===Sleep and Hibernate===
 
===Sleep and Hibernate===

Revision as of 12:12, 23 December 2013

The machine

This is a T420 that I bought secondhand off Ebay in December of 2013. I opted to buy this instead of a new Thinkpad because I dislike the new 6-row keyboards and the buttonless trackpads. This is its configuration:

  • Intel® Core™ i5-2520M (2.5GHz, 3MB L3, 1333MHz FSB)
  • Discrete NVIDIA NVS 4200M (1GB VRAM) with Optimus™ Technology
  • UEFI BIOS Version 83ET76WW (1.46)
  • 4GB DDR3 - 1333MHz main memory
  • 14.0" HD+ (1600 x 900) (230 NITS) TFT display
  • Intel® 82577LM Gigabit (Hanksville) Digital Office ethernet adapter
  • Intel Centrino Advanced-N 6205 (Taylor Peak) 2x2 AGN WLAN adapter

Installation

Preparing a Bootable Flash Drive

I installed Debian 7.3.0 (Wheezy) from a bootable flash drive. The process of creating bootable flash drive is described here. It is helpful to add firmware-iwlwifi to this drive so wireless networking can work while you're installing. The installer will notice this and install it automatically.

Installing wicd With Preseed

A helpful extra step is to use preseeding to have wicd installed automatically and to add the first user added to the sudo group. With wicd you can easily connect to a WiFi access point without a GUI. Create a text file named preseed.cfg on the flash drive and put the following in it:

d-i passwd/user-default-groups string cdrom floppy sudo audio dip \
    video plugdev netdev scanner bluetooth
d-i pkgsel/include string sudo wicd-curses wicd-cli

At the bottom of the aforementioned instructions on making a bootable flash drive are instructions on getting the preseed.cfg file installed to the drive.

When you boot into your new system, remember that you need to explicitly tell wicd what the wireless LAN device is. Use the # ifconfig command to check what it is. This turned out to be wlan0 for me, but it might be different if you have a different interface.

Preseeding is a great way to preselect what you want an install to do, saving you time and aggrivation. Read more about it here and here. As demonstrated here, you don't have to have a long and drawn-out preseed.cfg file.

Booting the Flash Drive

Plug in your bootable flash drive and turn on your T420. Quickly press F1 to get into the BIOS. Check to make sure that booting from a USB flash drive is enabled. Don't change its priority. If you changed anything, save and exit to reboot the machine. Quickly press F12 to get a boot menu and select the flash drive. The Debian installation process will then begin.

Not Installing a GUI

After answering questions about what keyboard you have, timezone, root password, first user, and so on; you will be shown a menu of software to install. There are ten options. "Debian Desktop Environment", "Print server", "Laptop", and "Standard system utilities" should be preselected for you. If you don't care for Gnome3, deselect "Debian Desktop Environment". That will yield a machine with no GUI at all. Detailed below is the procedure for installing MATE.

The remaining steps of the install process are uneventful. You will end up with a bootable and usable system.

Post-Install Configuration

MATE Desktop

Add this line to /etc/apt/sources.list:

 deb http://packages.mate-desktop.org/repo/debian/ wheezy main

Then update your APT cache

 #  apt-get update

Install the MATE keys with

 #  apt-get install mate-archive-keyring

and press 'Y' when you're asked if your sure. Then do:

 #  apt-get install mate-core

This installs the basic environment. If you want more, do:

 #  apt-get install mate-desktop-environment

For even more:

 #  apt-get install mate-desktop-environment-extra

Now, if you don't want to install GDM, you'll need to install the xinit package:

 #  apt-get install xinit

This will enable you to start an X session by typing "startx".


Sleep and Hibernate

Discrete Graphics versus Integrated Graphics

TODO
Incomplete