Difference between revisions of "Installing Ubuntu 11.04 on a ThinkPad X201"

From ThinkWiki
Jump to: navigation, search
(What do we want to do here?)
(Function keys)
Line 318: Line 318:
 
|-
 
|-
 
| style="border:0.0139in solid #000000;padding:0.0694in;"| Fn + F12
 
| style="border:0.0139in solid #000000;padding:0.0694in;"| Fn + F12
| style="border-top:0.0139in solid #000000;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0694in;"| No
+
| style="background-color:#00ff00;border-top:0.0139in solid #000000;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0694in;"| Yes
 
| style="border:0.0139in solid #000000;padding:0.0694in;"| hibernation
 
| style="border:0.0139in solid #000000;padding:0.0694in;"| hibernation
  

Revision as of 13:04, 27 May 2011

What do we want to do here?

ThinkPad X201 comes with a preinstalled Windows7 system and a hidden Lenovo Recovery partition. My goal is to delete all the partitions and install a clean Ubuntu 11.04 64bit distro. The drive is a 160 GB SSD and I prefer to not reserve and waste any space for the Windows system. Hence my desire to get rid of it completely without the option of dual boot. Still, I would like to have the initial system installation backed up in case I want to sell it later. If you dont want to backup the Lenovo partitions, or you want dual boot, then go directly to Installation. Bottom line: everything works, even the hibernation, which was problem in 10.10 (note the difference between sleep and hibernation).

Hardware specifications

My ThinkPad X201 has the following specifications:


Processor Intel CoreI7-620M (2.66GHZ4MBL3)
System Geniune Widows7 Home Premium 64
Screen 12.1 WXGA LED 2X2 UCIIAW/C+WBU

(built-in camera, microphone, antenna, bluetooth)

Memory 8GB PC3-8500 DDR3 1067S SDRAM 2 DIMM
Video Card Intel HD video
Keyboard KEYBOARD US ENGLISH
TouchPad TrackPad/FingerReader+TouchPad
Hard Drive Intel 160GB SSD SERATA
Modem 5-1 Media Card Reader + Modem
Battery ThinkPad X200 S 9 Cell LI-ION Battery
Bluetooth Bluetooth with antenna
Wireless Intel Centrino Ultimate N 6300 agn


Backup of the original Lenovo installed software

1. Make a bootable Ubuntu USB with the Startup Disk Creator

2. Plug the Ubuntu 11.04 USB. Restart the computer and at the very beginning use the F12 key to enter the device boot up selection menu. Choose the USB stick. Then select “Try Ubuntu”. This will load the linux system without any changes to your original system. (At this step everything worked out of the box already - keys, wirelles, bluetooth, etc...)

2. Get PartImage: Once Ubuntu 11.04 is loaded and an internet connection is established, we need ParImage. Since PartImage is not in the Ubuntu 11.04 64bit repos, get it from here (it is for 10.04 but works on 11.04 too) http://ubuntuforums.org/showthread.php?t=1358546&page=2, or simply get it and compile it on your own from http://partimage.org. If there is no internet connection, you will have to get PartImage from somewhere else and use a regular USB to deliver it to loaded trial Ubuntu 11.04. (Of course, one could use the linux built-in “dd” from command line, instead of PartImage, to back up the separate partitions, e.g. something like >dd if=/dev/sda1 of=/media/some-external-USB-device-here/sda1.img bs=4M.)

3. Back up the original Lenovo installation

We need to back up the separate partitions and also the partition table and the master boot record. (Personally, I did everything using sudo.)

  • System, Lenovo, and Windows7 partitions

One can see the names of the existing preinstalled partitions with the Ubuntu built-in Partition Manager (System/Administration/Partition Manager). In this particular case they are:

/dev/sda1/ ntfs SYSTEM_DRV

/dev/sda2/ ntfs Windows7_OS

/dev/sda3/ ntfs Lenovo_Recovery

I also had 1.84 MB unallocated but did not back that up.

Back up the partitions with PartImage (start it by typing in terminal >partimage). It is pretty straightforward, fast, and easy thing to do. The partitions were backed on an external WDPassport drive which was mounted at /media/WDPassport120/ via a regular USB port. The good thing about PartImage is that it backs up only the used space, which can be compressed (default options in ParImage).

  • Master Boot Record (MBR) and partition tables

The images of the partitions are more or less useless in case the master boot record is changed/damaged and respectively the partition tables are changed.

    • First, we will save the MBR with the linux DD tool. In terminal:

>cd /media/some-external-USB-device-folder

>dd if=/dev/sda of=backup-sda.mbr count=1 bs=512

It will produce a very small, but very important file: 512 bytes of data. For more information see here http://www.partimage.org/Partimage-manual_Backup-partition-table

    • Now, we will save the partition tables. In terminal:

>sfdisk -d /dev/sda > backup-sda.sf

sfdisk is a tool provided with the linux package.

Disclaimer: I have not tried to recover the original Lenovo partition installation from the backed partitions described above.

Install Ubuntu 11.04

Install Ubuntu 11.04 from a bootable USB - straight forward and easy without any glitches.

What works out of the box

Hardware

Processor Yes - showing 4 CPUs
Screen Yes
camera Yes
microphone Yes
Sound Yes
Bluetooth Yes
Memory Yes
Video Card Yes
Keyboard Yes
TouchPad Yes
TouchPad Keys Yes
TrackPad Yes
FingerReader Yes (requires installation of extra packages - see below)
Hard Drive Yes
Modem not tested
Flash Card Reader Yes
Battery Yes
Wireless Yes
Wired Internet Yes
External Monitor Yes

Fingerprint Reader

There are apparently two ways to activate the Fingerprint Reader with 1) ThinkFinger (https://wiki.ubuntu.com/ThinkFinger from Synaptic) and 2) Fprint from here https://launchpad.net/~fingerprint/+archive/fprint (fprint is also in Synaptic but something is missing). Long story short (kinda):

Quick installation guide

1. You should be running Ubuntu 10.04, 11.04, 11.04, or any derivative thereof. Packages for Ubuntu 9.10 are also available, but you won't be able to avoid one minor annoyance (see known issue 2 below).

2. You need to have a supported fingerprint reader. See the list at http://reactivated.net/fprint/wiki/Supported_devices. You may ignore columns Vendor and Product, only look at USB Vendor ID and USB Product ID. You can find out your reader's IDs with the lsusb command, the sixth column of which has the form of xxxx:yyyy, where xxxx is the Vendor ID and yyyy the Product ID. Another supported device, not listed at the above website, is 147e:1000.

3. Add this PPA to your sources:

>sudo add-apt-repository ppa:fingerprint/fprint

>sudo apt-get update

>sudo apt-get upgrade

3. Install fprint-demo (the version from standard Ubuntu archive is obsolete).

>sudo apt-get install libfprint0 fprint-demo

4. Go to Applications > Accessories > fprint project demo and check that you can enroll and verify your fingerprints and that your reader is indeed supported.

5. Install libpam-fprintd (not to be confused with libpam-fprint, the final “d” is crucial).

>sudo apt-get install libpam-fprintd

Note: If you have experimented with fingerprint authentication before and have changed your /etc/pam.d/common-auth, you may be presented with a screen asking whether you want to override those changes. Select Yes. Under very special circumstances, you may get an error saying

pam-auth-update: Local modifications to /etc/pam.d/common-*, not updating.

pam-auth-update: Run pam-auth-update --force to override.

In this case, run “sudo pam-auth-update --force”, exactly as suggested, and enable the fprintd profile manually. Leave the standard system profiles (Unix, Keyring and ConsoleKit) enabled as well.

6. Go to System > Preferences > About Me and in the top-right corner set up your fingerprint authentication. Alternatively, you can use command fprintd-enroll if you prefer CLI.

7. If you are running Lucid or newer, install gksu-polkit.

>sudo apt-get install gksu-polkit (my note - I didn’t need to install this)

8. Test it: Lock and unlock screen, log out and back in, try sudo in terminal. Don't try to launch Synaptic (or a similar graphical application requiring unrestricted root privileges) yet, see issue 2 below first.

Function keys

Key Yes/No Comments
ThinkVantage key Yes Works at start-up. No particular use after the system is loaded
Dedicated Windows key Yes *see below
Dedicated Sound Keys Yes volume up/down/mute
Dedicated pop-up menu key Yes Yes
Dedicated browser next-page key Yes Yes
Dedicated browser previous-page key Yes Yes
Fn + F2 Yes lock screen
Fn + F3 Yes power information
Fn + F4 Yes sleep
Fn + F5 Yes power off/on wireless and bluetooth
Fn + F7 Yes *switch between monitors
Fn + F8 Yes disable/enable touchpad
Fn + F9 (un)dock
Fn + F12 Yes hibernation
Fn + SysRq Yes
Fn + NmLk Yes numlock
Fn + Break
Fn + Home Yes brightness up
Fn + End Yes brightness down
Fn + PgUp Yes screen night light on/off
Fn + Space
Fn + Arrow keys Yes media player controls
  • A single click shows a Search bar with shortcuts, a hold shows the side launcher bar with each luncher having a designated number - while holding the the Windows key, press a numer on the keyboard and the corresponding application will launch.
  • The external monitor has to be connected before starting the laptop, otherwise there are problems. This was not a problem in 10.10. Also Fn + F7 seems to work but there could be a blank screen issues sometimes.

Hibernation, Sleep, etc ...

Fn + F4 = Sleep Yes
Close lid = Sleep Yes
Hibernate from PowerOff menu Yes
Suspend from PowerOff menu Yes

Hibernation fix

An improvement form 10.10 to 11.04 is that hibernation form PowerOff menu works. Read below in case you still have problems.

Many solutions are being suggested, none of them appealing enough to post it here.

If you get a system lock when trying to hibernate, do the following:

press and hold together Fn + SysRq (do not release them) and then press one by one the keys R E I S U B. This will restart the laptop in a much safer way than pressing and holding the power button.

Useful links and hints