a picture of 3 plastic bears, blue, orange, and yellow
kernpanik

mare liberum

Installing Ubuntu on a Thinkpad X1 Carbon - Part 2

27 Dec 2014

Part 1 - Introduction and Hardware

Part 2 - Installing Linux

Depending on which hardware configuration you choose, the X1 Carbon comes either with Windows 7, Windows 8.1, or without any preinstalled OS. My model had Windows 7 installed. Some of the steps described in this guide may differ on other configurations.

Upgrading BIOS

As pointed out here, it is probably a good idea to upgrade your X1's BIOS before you install Linux. The easiest way is to download the Upgrade Utility for Windows, run it from your hard disk and follow the steps of the installer.

Downloading Linux and creating a bootable USB stick

During the past few years, I used Debian (Squeeze and Wheezy) on several machines. Debian is the most popular of all Linux distributions for web servers, and even NASA is using it on the International Space Station (ISS). As a result of the long testing process, Debian's support for the latest desktop hardware is rather limited even with the "testing" releases. A more convenient solution is Debian-based Ubuntu, which runs out of the box on many new machines. Ubuntu comes with its own "Unity" desktop that provides interface scaling and other useful settings for high resolution displays. It also supports the X1's adaptive row of F-keys (well, kind of - we'll come back to that later).

Ubuntu images can be downloaded here. There are two options: the latest version (14.10) and the long-term support version (14.04.1 LTS). Differences between the two are explained in this blog post. In a nutshell, the latest version provides up-to-date software and some experimental features whereas the LTS is more stable. I went with the 64-bit LTS installer and copied it to a USB stick using another Linux machine and the dd command in a root terminal. Here's how to do it:

First, type

sudo fdisk -l

to find out which device is your USB drive. In most cases it's /dev/sdb, but you better make sure as the dd command will overwrite any data on the specified device, even when it's not a USB stick but the drive that contains your root filesystem. After you made sure that sdb really, really is your USB stick, type:

dd if=/<path-to>/ubuntu-14.04.1-desktop-amd64.iso of=/dev/sdb bs=4M; sync

Replace <path-to> with the actual path to the folder that contains the downloaded .iso file.

Preparing Hard Disk

As my X1 already had Windows installed and I wanted to keep it next to Ubuntu, I used Windows' Disk Management utility to prepare disk space for the Linux installation. Unfortunately, there are several limitations. First of all, Disk Management can only shrink an existing partition to the point where it finds data blocks that can't be moved. In my case, the maximum free disk space I could get were 120 GB. Another weird thing is that the MBR partition table only supports a maximum of four primary entries. In case of the X1, this maximum is already used by the bootloader, data, recovery and suspend partitions, meaning that you can free some disk space but then not use it to install your OS as this would exceed the limit of four entries in the MBR table. There are some workarounds to deal with this. As I am not planning to use Windows a lot, I decided it would be the easiest way to just deactivate Windows' recovery functions and to delete the "Lenovo Recovery" Partition (not sure whether this was a good idea; I'll probably find out some day).

Installing Ubuntu

The next thing to do is to attach the prepared USB stick to the notebook, turn it off and back on again and hit F12 during startup (just tapping on "F12" in the row of adaptive keys worked perfectly). Select to boot from USB and follow the instructions of the Ubuntu installer. I had the notebook connected to the internet during the installation process and activated the checkbox "Download updates while installing". I also selected "Install this third-party software now" which installs proprietary audio codecs. The installation process itself is pretty straightforward and self-explanatory. After about ten minutes, the installation finished with a restart.

Continue to part 3: First impressions