kaashif's blog

Programming, with some mathematics on the side

Installing OpenBSD on a T61

2014-05-08

I'm sure lots of people (dozens, perhaps) have installed OpenBSD on ThinkPad T61s of some description, but with the recent release of OpenBSD 5.5, lots of documentation has become (or already was, and now is even more so) obsolete, like this article_on_a_Thinkpad_T61)

, which deals with OpenBSD 4.5, which is really old - it's from slightly over 5 years ago! OK, that may not seem too bad, but much has changed in OpenBSD since then, so you might want to reevaluate the situation if you're thinking of upgrading or something.

Hardware

The ThinkPad I bought isn't the best T61, but it is a decent, reliable laptop that served its previous owner for 7 years and will serve me for a while longer. The important bits of the laptop:

  • 1280x800 screen - not quite the 1680x1050 IPS screen of the better model of T61, but good enough for me, certainly.
  • Intel GMA 965 graphics
  • 1 GB of RAM
  • 250 GB hard drive
  • Smart card reader
  • Fingerprint reader
  • Intel WiFi Link 4965

I made sure that everything I actually use is supported by free drivers. Funnily enough, the T61 I have also supports coreboot, but if you want help using flashrom or something, you'd be better served by looking at their wiki, taking advice from me would probably result in a bricked laptop.

OpenBSD Installation

With the release of OpenBSD 5.5, the project also released USB disk images you can dd straight to install media instead of having to install to the USB drive then boot from the ramdisk kernel. Now, it's a lot easier to install! Assuming you have a 64-bit CPU, you'll want to get the install media here. Every T61 comes with a 64-bit Core 2 CPU, so this is the one you want if you've got a T61. If you have a T60, you might need to get the i386 install media instead, but as far as I'm aware, they're all Core 2 as well.

After getting the install media, you'll want to dd it to a disk. Make sure to modify the following command for your disk:

$ dd if=install55.fs of=/dev/sd1c

After that, the USB drive is bootable, so reboot, wait for the kernel messages to scroll by (all of that text with a blue background), and you'll be taken to a screen where you'll be asked the following question:

Welcome to the OpenBSD/i386 5.5 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?

Here, you'll want to type "i" and hit enter, you're installing. Unless you're upgrading, but then, you probably don't need my help.

The majority of the questions are things any GNU/Linux, or *BSD user should be able to answer, so I won't go into detail on those. Instead, I'll focus on the T61-specific parts. In case you want help with a general OpenBSD installation, look to the OpenBSD project's guide.

Getting the network to work

When you see this:

Available network interfaces are: iwn0 re0 vlan0.
Which one do you wish to configure? (or 'done') [re0]

If you try to use the wireless card straight away, it will not work, and the kernel will spit out the error "iwn-4965: could not read firmware". Due to licensing issues, the OpenBSD project is not allowed to distribute the firmware for Intel wireless cards on the installation media. The best they can do is provide firmware packages here.

You don't actually need the network to install OpenBSD, so I advise that you type "done" and leave the networking be (unless you can connect to the internet using Ethernet) until you boot into OpenBSD for the first time.

When you reboot, you have a few choices:

  • Find an Ethernet cable to get the firmware
  • Never use the internet
  • Put the firmware on a USB drive using another PC

I didn't have any spare Ethernet cables on my desk, but I did have another laptop, do I went for the third option. If you do have an Ethernet cable and a router, pick "re0" as the network interface to configure during the installation, and everything will work fine and you'll be able to download the WiFi firmware through the internet, on your laptop.

Assuming you went the same route I did, you'll want to create a new file system on the now-useless installation media, so you can use it to store firmware.

$ mkfs_msdos /dev/sd1c

Then take out the USB drive, download the firmware on another PC onto the drive, and install the firmware package on your laptop with pkg_add:

$ sudo pkg_add -Dnosig iwn-firmware-5.10p0.tgz

You need to tell pkg_add to ignore signatures, because the firmware packages are signed by a different key to the normal packages, so pkg_add will reject firmware packages' signatures.

Graphics acceleration

Since my T61 has an Intel integrated graphics card, it just works automatically, without me having to do anything special. You can tell if OpenBSD detects your Intel card during boot because the font changes to something that looks a bit different.

If you're still in doubt, try this:

$ dmesg | grep intel

My laptop shows this:

inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1280x800

That means that the Direct Rendering Manager works, and has managed to work out the resolution of the laptop's screen. This means that X will work without any xorg.conf hacks. If you have an Nvidia card, my condolences. The nv driver sucks, despite the stellar work of the OpenBSD project does keeping it maintained. The fact is that reverse engineering is no substitute for actual documentation, so users who have ATI/AMD or Intel cards are far better off than Nvidia users.

Extra features

I haven't tried the smart card reader since I don't have a smart card, and I haven't gotten around to trying the fingerprint reader. It might work, but I don't really care. The one time I did try to use a fingerprint reader, it was cool but pointless.

The PCMCIA port works, I tried it with an 3Com EtherLink III card I had lying around, and it works perfectly.

The trackpad works very well - two finger scrolling works and all three buttons work fine out of the box. Even that odd scrolling thing that happens when you press button 3 and use the clit mouse works. No-one ever uses it, though, but it's nice to know that it works.

Summary

All in all, my experience with the T61 just goes to show that OpenBSD works great as a laptop OS, especially compared to the OS that came with the laptop (Windows 7 and driver CDs everywhere).

Maybe at some point I'll buy a newer ThinkPad and see how the radeondrm support is firsthand.