Install FreeBSD 10.1 or FreeBSD 11 – CURRENT on Thinkpad T420

This post is about installing FreeBSD 10.1 RC2 or FreeBSD 11 – CURRENT on a Thinkpad T420 with Intel graphics. This is for testing only up to now!

Work around the BIOS/UEFI bug:

The T420 comes with an unpatched BIOS/UEFI bug which prevents to boot from a default GPT partitioned harddisk or USB flash drive. I am not 100% sure but it looks like a bug on all T420, T520 and W520 models so not only the T420.

The bug seems to look at the first partition and if this partition is not what it expects it does not recognize it and fails to boot.To boot from USB you need to use the UEFI images. Since the first partition on a UEFI boot media is an UEFI partition if I am correct this works around the problem.

If you want to read more about the details, ask your search engine for: “T420 gpt boot problem”. The internet is full of it and there are further information what you else can do to work around this bug. There are tutorials for other systems or how to create a custom partition layout that works, too.

I will show you a way to work with the installer here. This prevents you from installing on a ZFS root with GPT, since the UEFI boot loader code doesn’t support ZFS root volumes, yet. This will change in future but lets go with ZFS and a MBR for now.


Allan Jude has committed a fix to be included with 10.2 for the gpt command to apply a workaround for this problem. If you’re using the installer, it should detect if you have an effected model and should apply the patch. Let me know if you have problems with it or if this fixed the problem for you. Thanks to Allan to make this fix happen!

Hardware support for my model:

  • Intel Graphics o.k
  • Intel Wifi o.k
  • ACPI Brightness control o.k (with -CURRENT) / not o.k (with 10.1 RC2)
  • Power support o.k

Download the installation media

For FreeBSD 11 download image available here:

For FreeBSD 10.1 RC2 download the UEFI image available here (The not UEFI image will not boot on the T420!):

Prepare T420

Configure your BIOS/UEFI to boot both, UEFI and legacy boot with UEFI in first order.

Install FreeBSD minimal

Boot with default options:

Choose Install:


Select your keyboard layout. Please have in mind, if you encrypt your hard disk you have to know how you type your passphrase on the us keyboardlayout at boot time. Ping me if there is a way to change the keyboard layout at boot time.


Set the hostname for your machine.


Choose the components you want to have installed now.


Harddisk setup

Select ZFS while installation and change the gpt default option to mbr. If you need it choose encryption for your system and for the swap partition. You always should encrypt your hard disk on mobile devices. If you loose your laptop or it gets stolen at least your data is protected.




Because I have only one disk for FreeBSD in my T420 there is no redundancy and I choose stripe here.


Select the harddisk you want install to. Here this is a VBOX HaRDDISK because I did a replay to make the screenshots 😉


This is the point of no return!


Choose a long and strong passphrase for your disk encryption!


Remember the long and strong passphrase the first time 😉


Now the sytem will generate and initialize the filesystem with your encryption keys.


Now the installation process installs the selected components as usual.


Set a strong root password and add you user to the system.


Here select the services you want to have started at boot time. I use all of them here.


The rest is not really interesting. Exit the process and reboot the machine when done.


Install packages

Login in to your new system and install the first packages and make some modifications to the system.

pkg update
 pkg install xorg sudo tmux vim

Modify base configuration

Add the following lines to /etc/rc.conf


Hald and DBus are required to make X working correctly. The next two options are some power saving options which should improve your battery life. My T420 runs 4h+ with the standard battery and i3 as window manager. The last option enables the mid mouse button scrolling with the TrackPoint.

Add the following lines to /boot/loader.conf


The first options are related to the new vt. This will enable you to switch between X and your console again. Without this after starting X I was not able to switch back to console.

acpi_ibm and acpi_video enables some features like extra keys on the IBM/Lenovo notebooks. With FreeBSD 11 – CURRENT acpi_video enabled the brightness control. With the 10.1 RC2 it does not work up to now. I am not sure if this will be merged into 10.1 but stay tuned at least 11 will bring this to you.

The last three options are power tuning options again. Read more here:

Configure System for Xorg installation

X -configure
cp /root/ /etc/X11/xorg.conf

 Configure i3 to be your desktop environment

Install need packages or build it from ports:

pkg install i3 i3lock i3status dmenu
vi ~/.xinitrc

Install some useful software

Firefox is the quite well known browser, Thunderbird the email client and Hexchat is a XChat fork that works quite well.

pkg install firefox thunderbird hexchat

Set keyboard layout

Create the file: /usr/local/etc/hal/fdi/policy/x11-input.fdi

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
      <merge key="input.x11_options.XkbLayout" type="string">de</merge>

This does not work for KDM!

In KDM this didn’t work for me. To set the keyboard layout correct in KDM you need to add the following line to: /usr/local/share/config/kdm/Xsetup

setxkbmap -model pc105 -layout de

Of course you need to replace the de with the layout you prefer. The layout in KDE itself can be modified using the system settings configuration of you input device as mentioned in this post.

Update 1

In a previous version of this Blog post I mentioned to use slim as login manager. I ran into some bugs with it and tried to find the source code and project page to get them fixed, but it looks like the project is dead and not developed further. Please stop using it if you do and choose one of the many other options around (XDM, GDM, KDM, Entrance, LXDM, MDM, Qingy).

Update 2

I added the mouse scrolling configuration option the the /etc/rc.conf file to make the scrolling working with the TrackPoint or mid mouse button.

17 thoughts on “Install FreeBSD 10.1 or FreeBSD 11 – CURRENT on Thinkpad T420

  1. Ricardo Santos

    Thanks for the tips.
    Glad to hear that i915kms driver has been updated for 10.1-RELEASE. I own a T430 and had some trouble trying to configure X properly with 10.0-RELEASE and Intel HD Graphics 4400.

    One question: did you have any trouble configuring the touchpad, trackpoint and Fn keys?

    1. Dominik Zajac Post author


      no I had no trouble with the touchpad and trackpoint. I did no special configuration on that two components up to now. Both are working, but I will try to disable the touchpad because I don’t use it. If I have it disabled I will update the tutorial, but this should be default X configuration steps. The fn keys don’t really work up to now. I used acpi_ibm and acpi_video. The brightness control worked on FreeBSD 11 – CURRENT. The other function keys are not working beside the sound volume control and mute button.

      1. FAndrey

        brightness control worked – WOW yes 🙂

        sound volume control, and multimedia button (pause,stop,next) – work for some software (mplayer2), may be anyone DE, not system mixer

        touchpad – works normally, but without the extra features, just like a mouse emulator and pressing buttons

  2. Emiliano

    It’s possible to upgrade to 11 from 10.1? I have no luck running freebsd-update:

    root@hal9000:/usr/home/emi # freebsd-update -r 11.0-CURRENT upgrade
    Looking up mirrors… 5 mirrors found.
    Fetching metadata signature for 10.1-RELEASE from… done.
    Fetching metadata index… done.
    Inspecting system… done.

    The following components of FreeBSD seem to be installed:
    kernel/generic world/base world/doc world/games

    The following components of FreeBSD do not seem to be installed:

    Does this look reasonable (y/n)? y

    Fetching metadata signature for 11.0-CURRENT from… failed.
    Fetching metadata signature for 11.0-CURRENT from… failed.
    Fetching metadata signature for 11.0-CURRENT from… failed.
    Fetching metadata signature for 11.0-CURRENT from… failed.
    Fetching metadata signature for 11.0-CURRENT from… failed.
    No mirrors remaining, giving up.


    1. Dominik Zajac Post author


      11 is not a stable release, yet. This is why you can’t upgrade your system that easy. If you want to use FreeBSD I than stay with 10.1 and upgrade to 10.2 if its released later. If you want to develop FreeBSD than you need to look into 11 or the CURRENT tree how it is called in general. CURRENT is always the next upcoming release (today 11.0). But there is a lot of development ongoing which sometimes can lead to a broken system. It should not happen but sometimes things go wrong in development and CURRENT is under heavy development all the time. So if you don’t develop own features or have some other reasons why you really need CURRENT you go better with stable. I run STABLE here as well on my box because I need to get things done and need a working system.

      If you’re interested in using CURRENT, just download the snapshot images and install it. You will need to check out the CURRENT source tree to your /usr/src and do your updates manually. This means you need to build your system from source each time you want to do an update. But be aware that there is not support on IRC and mailling lists because as mentioned earlier it is for developers and not for production or end users.

      Best regards,


  3. dred

    This guide is to install freebsd 10.1 standard desktop on computer or virtualbox? How to install skype and flash player in FreeBSD ?.F

    1. Dominik Zajac Post author

      Hi Dred,

      I am not in need of flash and skype so I don’t have them installed on my box. But in PC-BSD, which is based on FreeBSD they have both running. So maybe you can check there how they are installing it. I think they are using the Linux compatiblity layer to run it. Maybe check on the BSDNow Podcast and search their site for some information about flash and Skype.



  4. lukas

    Hi Dominik,

    I have been trying to install FreeBSD both 10.1 and 11 on my T420 with SSD HDD with no luck. I have changed the suggested options in BIOS to UEFI first and used UEFI 10.1 image but system wont boot as I get Missing operating system error on start.

    I would be happy for any suggestions you might have on this.

    Thank you

    1. Dominik Zajac Post author

      Hi Lukas,

      it should work. Have you tried the last 11-Current or 10.2-rc images? Allan Jude has included a auto detection routine to the installer to make the needed adjustments for the installation on a T420. I haven verified them on my hardware, yet but they should work.

      Have you installed with GPT or MBR? With UFS or ZFS?



  5. CRS

    Hello. Did you run suspend/resume on this T420 ?
    I can’t run suspend/resume and nvidia drivers ;/ Under 10.2/11
    OS without suspend/resume is unusable for me.

  6. Tito

    First of all, sorry for my english (I’m from Spain). I’m have a Thinkpad T420 i7 runnig Arch.I tried to install FreeBSD, but all my attempts have been unsuccessful. Can anyone share the principal config files with me?
    Thanks in advance.

    1. Dominik Zajac Post author

      Hi Tito,

      what problems did you face? I had no bigger problems installing the latest releases expect the bios bug. But the new installer should take care, thanks to the changes merged by Alan Jude.

      If you can be more specific maybe I can help you out with your problems.



  7. CRS

    Im using Current 11 from (16.12.2015) Afrer instalation in pciconf -lv i see iwn0 , in dmesg too, but ifconfig show me only lo and em0.
    And suspend still not work 😉 Any ideas ?

  8. mike

    how about battery threshold feature ?
    i intends install freeBSD/ghostBSD but I have been searching information about battery threshold T420 and the information I looking for sorely lacking.

  9. Vctrsnts


    First, sorry for my English.

    I thought your article perfect, because I this doing the same, changing my S.O. of my laptop to FreeBSD. I looking for the exact specifications of your laptop I see you have Optimus technology. It is right?

    As you have solved this problem. I mention this because I looking information continues and the only thing I see is as clear it through a script, but if you reboot the machine, the Nvidia activated again i have to re-run the previous script so that you can disable.

    You earned every time you start FreeBSD Optimus is turned off or you have it configured from the BIOS.

    Thanks and sorry for bothering


Leave a Reply

Your email address will not be published. Required fields are marked *