The Old-New-Thing: Installing Linux on Lenovo t410s

Earlier this week I received my new Lenovo t410s laptop. Since I plan to use it as my main development laptop, I ordered it with switchable graphics and other shenanigans. So far it strikes me as a magnificent machine. And since I plan to use it as my main development laptop, I’d like to install Linux on it. But, and this is one big but, this laptop is so bleeding edge that even its Windows support is lacking (to date). To add to the challenge, I don’t want it just to run Linux, I want it to run it perfectly: snappy, fast boot, frugal energy consumption and as stable as a giant sequoia.

These articles will be divided to two sections, a short version for the A.D.H.D, ah, I mean ‘let’s just get it done‘ crowd, and a longer explanation in case you run into problems or wish to understand the process further.


  1. Basic familiarity with Linux and its ways (see #4 if this doesn’t apply)
  2. Know which commands should be run as root and what it means
  3. This isn’t an out-of-the-box thing. Some assembly required, ok, not assembly, but definitely digging into configuration files, compiling things and a little code hacking.
  4. Know how and where to ask questions, feel free to ask any question here or in other support forums.
    When things get really frustrating, I  recommend a nice Chamomile tea and taking a day or two rest from this. That’s what I do when I hit a stone wall

Now to work. In this piece we’ll install the base system and the GUI (KDE).

Short Version

  1. Get GParted live CD. Burn to a CD or install on a USB stick
  2. Boot from GParted live and resize your main partition to give some space to your new installation. I recommend creating 2-4 GB swap partition and 45 GB for the rest.
  3. Format the new 45 GB partition to ext4. Format the swap partition as linux-swap
  4. Apply and reboot
  5. Download the custom backported lenny image from here. Get the latest amd64 version (0116). Burn on a CD
  6. Boot from the CD and follow the installer, when the installer requests to set the partitions, choose the manual option and choose to mount the new ext4 partition as /
  7. Go through the rest of the installer, in the tasksel screen select only base system and laptop. Do not select desktop environment.
  8. Allow grub some time to install, since it will try to detect other OS’es.
  9. Eject the CD and boot to your new Linux
  10. Install sudo and give yourself administrative privileges:

    apt-get install sudo
    usermod -G sudo -a <your login username>
  11. Edit /etc/apt/sources.list to squeeze (something like):

    # deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Unofficial bpo amd64 NETINST Binary-1 20090906-11:59]/ squeeze main contrib non-free
    #deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Unofficial bpo amd64 NETINST Binary-1 20090906-11:59]/ squeeze main contrib non-freedeb squeeze main contrib non-free

    deb-src squeeze main contrib non-free
    deb squeeze/updates main contrib non-free
    deb-src squeeze/updates main contrib non-free
    #deb squeeze/volatile main contrib non-free
    #deb-src squeeze/volatile main contrib non-free

  12. Upgrade to the new distribution by running:

    apt-get update && apt-get dist-upgrade

    Accept any file replacements suggested by the upgrade process
  13. Install KDE and some other basic utilities:

    apt-get install psmisc openssh-server vim kde-full
  14. Reboot, or restart kdm by running:

    /etc/init.d/kdm restart

That’s how I organize my desktop:

Plain ol' KDE 4.4.3

Long Version

Setting up space

Use GParted live CD, it’s the best tool for the job. Debian installer is very limited in this area, it doesn’t support ext4 or SSD’s (it can’t grasp that some hard drive simply don’t have cylinders). I chose ext4 for filesystem after over a year of extensive usage with all my desktops. When Btrfs becomes stable enough I’ll upgrade to it and report. Swap partitions should be sized in proportion to your system’s main memory, between 2/3 of your RAM size and up to 1:1 ratio.

1. Be sure to always resize an NTFS partition after a fresh reboot, not after hibernation
2. Measure thrice cut once! Triple heck yourself before doing any changes, this stuff can do some serious damage to your filesystem

Installing the Base System (Debian Testing)

Debian testing was chosen for a couple of main reasons. First, the Debian packaging is my favourite distribution method, with all its derivatives. Secondly, it’s very bare bones, but still allows productive work before all the pieces are in place. In future howtos I’ll discuss some of the choices Debian made, and what makes them smart choices.

Although Debian has the reputation of being snail slow, in testing branch you can get almost all software in their latest stable versions, and usually at top quality. Moreover, I like to always know what’s under the hood, without obscure patch-sets that some distributions add.

So why use the Lenny backport image? The latest official version of Debian testing (from here) contains an old kernel. The t410s, like all Core i5 machines, uses a brand new chipset, that is supported from 2.6.32 and forth. Also, the backported image includes firmware for wireless cards, WPA authentication tool wpa_supplicant (for usage see here) and other goodies. Burn the image onto a CD. I couldn’t get it to run smoothly from a USB stick.

Follow Debian-installer, a process that has been explained in many other places. If you are not familiar with it, get a quick explanation from the walk-through here. In the partition manager screen choose to manually set the partitions and make your new ext4 partition mount as /. The installer will automatically detect the swap. In tasksel screen do not choose desktop environment since we want to upgrade to testing as soon as possible, and prevent upgrade issues. Moreover, lenny uses KDE3 while testing uses KDE4. It’s not fun to upgrade between those.

Grub2 can be a little bit of a pain if you’re not used to it (I wasn’t). It will try to detect other OSes, which can take a considerable amount of time. On my laptop it takes a little over 3 minutes!. So give it some time to complete.

Boot to your new system, change the distribution to squeeze and add the contrib and non-free options to the sources.list file

KDE4 can be installed with the kde-full package. If you prefer smaller versions install kde-standard or even kde-minimal. I recommend the full though.

First Observations

Although basic desktop is running, sound doesn’t work, which will be covered in the next installment. Special buttons also don’t work and screen brightness is stuck at maximum. Due to this, the computer guzzles battery like mad. Also to be fixed.


Leave a comment

Filed under devenv, howto, linux

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s