[home]


Installing OpenBSD on a ThinkPad X31




This covers a few techniques for installing OpenBSD on the drive-less ThinkPad X31. This information on this page may now be out of date, especially with respect to PXE (which is now supported by OpenBSD).

Installation

First off, OpenBSD runs rather well on the ThinkPad X31. It is a great little laptop. The machine has no external drives. Just ethernet, optional wireless, usb, (and a bunch of other network-type interfaces). This makes installation less than straight-forward. I was not able to install over the network, but was immediately able to install via a USB floppy drive. Here is a description of the various installation methods I tried.

Network Install

Using PXE you can network boot an OpenBSD kernel, but none of this is officially supported by the OpenBSD team.. PXE is now officially in -current. See the PXE man page However, it doesn't work on the x31, at this point in time. This situation has not been confirmed since the addition of PXE to the -current tree, though.

A quick summary: GRUB doesn't have a driver for the ether card, so while you can use PXE to get the boot loader, GRUB, from the network, the install then fails as GRUB doesn't have a driver for the particular PRO/100 VE card in the laptop. This was frustrating. I believe it is the same problem mentioned here. Assuming there is a driver for the card, GRUB should then grab the OpenBSD ramdisk kernel from the tftp server, and boot that.

Background

Firstly, straight GRUB hasn't been able to boot OpenBSD kernels since 2.6, and a lot has changed. You have to get a patched GRUB. Cedric Berger is maintaining this, I think. GRUB has become a bit linux-centric, and if you want to patch it yourself you need a linux box to build on. Alternatively, at the above address is a binary GRUB with the fxp driver buillt in.

Besides having a GRUB capable of booting OpenBSD kernels, you also have to set up a DHCP server, and a tftp server, to deliver both an ip address, and boot loader, to the PXE card.

A quick note mentioning how to do this was posted to deadly.org (08/2003). General advice on diskless booting for OpenBSD is at diskless(8). A detailed, working, description of the hacked up PXE boot process is here. And some misc@openbsd.org mail threads. Also, here is some background reading for using PXE and Linux on an x30 ThinkPad.

Overview

Before we begin, make sure you are behind an appropriate firewall, or not connected to the internet, before you go turning on network services willy-nilly. Also, you should check that you aren't going to accidentally filter traffic coming from the PXE system in the laptop.

Read diskless(8) as an introduction.

DHCP/BOOTP

Configure a dhcp/bootp server, to assign an ip address to the laptop, and tell the client what file to boot. This is pretty easy.

  • read: dhcp(8), dhcpd(8), dhcpd.conf(5)
  • edit /etc/dhcpd.conf ( filenames are relative to /tftpboot.. )
    
    	host myx31 {
    
    		hardware ethernet 00:11:22:33:44:55;
    		fixed-address 192.168.10.10;
    		option host-name "myx31";
    		filename "pxegrub";
    	}
    	subnet 192.68.10.0 netmask 255.255.255.0 { }
        
  • edit /etc/dhcpd.interfaces, add the interface you wish to listen on, e.g. dc0.
  • start dhcp on the command line:
    
        # touch /var/db/dhcpd.leases
        # /usr/sbin/dhcpd dc0
        

TFTP

Setting up tftpd is easy.

  • read: tftpd(8)
  • mkdir /tftpboot
  • edit /etc/inetd.conf , uncommenting the entries for tftpd
  • invoked 'inetd'

Ok, so get a copy of a snapshot bsd.rd and stick it in /tftpboot


	ftp ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/i386/bsd.rd

Now get the patched GRUB bootloader for the fxp NIC. It is GRUB that is then going to grab the install kernel from the network and boot it. Put the copy of pxegrub in /tftpboot

PXE Booting

Boot the laptop and hit F12. Choose the network install and cross your fingers.

When PXE finds the DHCP server, it has an ip, launches tftp, and can get the grub image and execute it. You then have to tell grub what it's IP address is, and where the kernel image is:


	grub> dhcp
	grub> kernel (nd)/bsd.rd
	grub> boot

But this is what you get:


    Probing...[EEPRO100]No ethernet card found.

    grub> dhcp
    Error 12: Invalid device requested

Grub as is doesn't have a driver for the PRO/100 VE card inside the X31. The drivers used by grub come from the etherboot project etherboot.sourceforge.net, but the eepro100 driver hasn't been updated in almost 2 years. Support for this card was only added to the OpenBSD kernel in August, in 3.3-current.

So, I'm stuck here. Grub is loaded, and possibly patched to load the OpenBSD kernel, but can't use the PRO/100 VE nic. You could update the GRUB drivers from the etherboot code... I looked into this for about 30 minutes, and it doesn't look impossible, but not easy either.

Are there other boot loaders capable of PXE booting/booting OpenBSD kernels? Lilo can certainly boot OpenBSD kernels, but can it do PXE? This is worth investigating.

Alternatives

Here are some alternatives to PXE/network booting:

USB Floppy

I got hold of a friend's USB floppy drive and downloaded a recent OpenBSD snapshot from one of the servers on this list. I wrote the floppy34.fs image it to a disk, and it booted. Everything else is as per the standard OpenBSD floppy install procedures.

This was very easy. I didn't even have to mess with the bios.

USB Cdrom

Kim Nielsen installed OpenBSD 3.3-current (with the correct fxp support) from a USB cdrom. So this path will work on the x31.

Hard drive

Take the harddrive out and stick it in a desktop. Install onto the hd from there. You need an adapter [untested on the x31].

Linux

There may be some way to install Linux, and do tricky things with lilo to get it to boot an OpenBSD kernel off the disk. I don't know [untested].




last updated : Fri Feb 18 09:38:56 EST 2005