Install Ubuntu 12.04 64 bit on a Lenovo W540

The following are very loose notes on how to install Ubuntu 12.04 64 bit on a Lenovo W540. It was tricky because of EFI and SecureBoot with Windows 8. Warning: I did not spend much time elaborating but rather I’m only outlining the tricky parts that a vanilla install of Ubuntu would not require.

Ubuntu 12.04 OS

  1. Boot into Windows 8
  2. Shrink the main partition to make room for Ubuntu. I shrunk it to 20 Gb.
  3. Restart and press ENTER for boot options
  4. Choose BIOS/EFI menu
  5. Disable SecureBoot on the security page
  6. Restart and press ENTER for boot options
  7. Boot from Ubuntu CD / USB
  8. Install/configure Ubuntu normally, except:
  9. When Ubuntu asks if you want to install Ubuntu along side Windows, replace it, or Something Else, choose Something Else.
  10. Select the free space row. Click “Add…”. Create a SWAP partition equal to the amount of RAM your laptop has (mine 32GB), set Use as: to “swap” something something. Save that partition.
  11. Create a new partition by selecting the free space row. Choose the rest of your free space. Click “Add…” and set Use as: to “Ext 4 journaling file system” and the Mount point: to “/”.┬áLeave the “Device for boot loader installation” as default – /dev/sda.
  12. You might also need to create a boot loader/grub partition. I created one 1 MB large.
  13. You should now be able to install Ubuntu
  14. When your system is installed and the computer restarts, you will probably still have an issue with the graphics card. In the GRUB menu, select the first Ubuntu option and type ‘e’ to edit the startup commands. Add ‘nomodeset’ to the kernal line – the second to last command I believe. Then F10 to continue booting.
  15. Update your new system (apt-get dist-update)

Video Card

You will now need to install a special Nvidia driver for Optimus graphics card if you want to have hardware acceleration for projects like the Gazebo Simulator that I use with ROS. Follow these instructions

Wifi

If your wifi card is not working:

  1. Download the latest kernel backport from here
  2. Uncompress the file: tar xvfJ FILE
  3. Within that uncompressed folder:
    make defconfig-iwlwifi
    make
    sudo make install
  4. Download the latest Intell driver from here. I used 22.1.7
  5. Uncompress the file
    tar xvfz FILE
  6. Copy the file to your system:
    sudo cp iwlwifi-7260-7.ucode /lib/firmware
  7. Restart and it should work sudo reboot
Bookmark the permalink.
  • Ross Taylor

    What HW do you have? I’m not having any issues with the display (15.6 FHD (1920 x 1080) LED Backlit Anti-Glare Display & NVIDIA Quadro K1100M 2GB) but the wifi card is not working (Intel Single Band Wireless 7260BN with Bluetooth 4.0). It seems to work on 13.10 though.

    • Wow, this is my first ever experience blogging about my technical pursuits, I added this section to my website last night, and already I have someone commenting!

      To address your question about Wifi… I haven’t tried using it until just now actually. I was plugged into ethernet, but now I see that mine doesn’t worth either. Any suggestions?

      • Ross Taylor

        Nope. I’m just getting started but I might just go with 13.10 but then running Hydro may be a pain.

        • Oh you’re a ROS guy too, huh? Have we met? You’re right, 13.10 is not officially supported by Hydro so I would avoid it. http://www.ros.org/reps/rep-0003.html#hydro-medusa-aug-2013

          • Ross Taylor

            No we haven’t met. I just stumbled on this post while trying to get things working.

          • My issues have worsened since we last talked. When trying to launch Gazebo I kept getting glx errors, apparently the graphics drivers aren’t working properly either. This might be a result of disabling the EFI boot (using only legacy BIOS), but in general there have been tons of issues with Linux and dual graphics cards (Intel and Nvidia mixed). In trying to install the correct graphics drivers, I lost X-Windows and am now stuck with booting into console only. I’m tempted to try 13.10 as well, though installing everything from source is quite a pain, not only because of the time requirement but also there are likely some dependency bugs that will appear somewhere within the entirety of ROS.

          • Ross Taylor

            I seem to have everything working. I’m not actually using Gazebo but I just launched it to check it out without any problems. I used the recommended proprietary driver and did not use nomodeset.

            Did you get my other comments…they seem to have ended up in moderation due to links.

          • I just approved the other comments.

            To clarify, you are still using your Thinkpad with EFI support enabled? Secure boot enabled? How did you get Wifi working with 12.04 – link? I’d like to update this post with best practices.

          • Ross Taylor

            It is Legacy Mode with Secure Boot disabled.

            My response yesterday gave details on how to get WiFi working using backports.

            Now I’m running into display issues. When I opened the machine this morning there was no backlight. I could see the display due to external light on the pixels but not very well. A reboot fixed that for now. Then I connected an external monitor through VGA and it isn’t working. It is getting a signal (it isn’t going to sleep) but it stays black except for briefly during bootup when it shows some of the splash screens.

            I’m disappointed in how difficult this is. I bought this machine because I read ThinkPads were great for Ubuntu and the W540 is even Ubuntu Certified.

          • I had to re-install Ubuntu, this time I did it with EFI enabled. I’ve updated the instructions on this page. I also had to install BumbleBee to get the graphics card working: https://wiki.ubuntu.com/Bumblebee#Installation

        • Your research into the wifi issue would be much appreciated!

  • It worked, awesome!

  • Ralph Kuntz

    Are you able to dual-boot the ThinkPad W540 with Windows 8.x? Is your network “reachable” from Linux? If so, how?

    Thanks.

    • My network worked with linux, and I believe Windows 8 still worked but I have not tried. Currently not using this laptop.