Packetwatch.net

Installing OpenBSD on a Soekris 4801



Last modified: Apr. 12, 2007

Contents
1 - Summary
2 - Soekris BIOS configuration
3 - TFTP service configuration
4 - DHCP service configuration
5 - Installing OpenBSD
6 - Configure Soekris boot device


1 - Summary

This guide explains how to install OpenBSD on a Soekris 4801. This guide
uses a Soekris 4801 that has a hard drive installed. The DHCP service is
assumed to be setup and already running. The IP address of the server
running DHCP and TFTP is 192.168.1.8. The Soekris will be getting the IP
address of 192.168.1.23.


2 - Soekris BIOS configuration

Connect a serial cable up to the serial port on the back of the Soekris.
Start up the terminal emulation software. Set the following options for the
serial connection.

Port: COM1, COM2, or COM3
Baud rate: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None

Plug in the power cable to the Soekris 4801. Press CTRL-P when prompted so
you can get into the BIOS options. Type in "?" to see what commands are
available. Type show to see the current BIOS settings. Make sure you have
the following options.

ConSpeed = 9600
PXEBoot = Enabled
BootDrive = 80 FF FF FF

You can set options by typing "set" then the command. We will change the
bootdrive option so that we can boot over the network, using the PXE boot
ROM. To boot off of the first fixed disk drive set it to "80." To boot off
of the network using PXE set it to "F0."

> set BootDrive=F0

We will set the date and time.

> date 2007/04/11
> time 19:00:00

Plug in a network cable to the eth0 port on the Soekris. You should then
reboot the Soekris by typing "reboot."

CLIENT MAC ADDR: 00 00 24 C6 57 40

The boot process will fail since there isn't anything setup yet. You will be
able to get the MAC address for eth0 though. Write the MAC address down as it
will be needed.


3 - TFTP service configuration

The TFTP service will need to be configured. The TFTP service in this guide
is running on a server which is running OpenBSD. Download the following files
onto the server. These two files can be found on the OpenBSD ftp site.

ftp://ftp.openbsd.org/pub/OpenBSD/4.0/i386/

- bsd.rd
- pxeboot

Switch users to root. Navigate to the home directory.
# su - root
# cd ~
Create the boot.conf file and include the following.
  set tty com0
  stty com0 9600
  boot bsd.rd
# vi boot.conf
# chown root:wheel boot.conf
# chown root:wheel bsd.rd
# chown root:wheel pxeboot
Add the following to /etc/ethers.
  00:00:24:c6:57:40       server
# vi /etc/ethers
Add the following to /etc/hosts.
  192.168.1.23 server.test.com server
# vi /etc/hosts
Modify /etc/inetd.conf to have the following.
  tftp            dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -c -s /tftp
# vi /etc/inetd.conf
# mkdir -p /tftp/etc
# mv boot.conf /tftp/etc/
# mv bsd.rd /tftp/
# mv pxeboot /tftp/
Configure /etc/rc.conf.local so that the tftp service will start at boot
time. Add the following line.
  inetd=YES
# vi /etc/rc.conf.local
Open UDP port 69 on the firewall in /etc/pf.conf and reload the rules file.
Start the inetd service.
# inetd


4 - DHCP service configuration

The DHCP service will need to be configured. The DHCP service in this guide
is running on a server which is running OpenBSD.

Add the following to /etc/dhcpd.conf.
  host server {
    hardware ethernet 00:00:24:c6:57:40;
    fixed-address 192.168.1.23;
    option host-name "server";
    next-server 192.168.1.8;
    filename "pxeboot";
  }
# vi /etc/dhcpd.conf
Restart the DHCP service.
# kill -HUP `sed 1q /var/run/dhcpd.pid`


5 - Installing OpenBSD

Reboot the Soekris device by typing 'reboot' from inside the terminal
emulation software. You should now boot using PXE and see the following.

NSC DP83815/DP83816 Fast Ethernet UNDI, v1.03                                  
Copyright (C) 2002, 2003 National Semiconductor Corporation
All rights reserved.

Pre-boot eXecution Environment  PXE-2.0 (build 082)
Copyright (C) 1997-2000  Intel Corporation


CLIENT MAC ADDR: 00 00 24 C6 57 40  
CLIENT IP: 192.168.1.23  MASK: 255.255.255.0  DHCP IP: 192.168.1.8             
GATEWAY IP: 192.168.1.1 
probing: pc0 com0 com1 pci pxe![2.1] mem[639K 255M a20=on]                     
disk: hd0+
net: mac 00:00:24:c6:57:40, ip 192.168.1.23, server 192.168.1.8
>> OpenBSD/i386 PXEBOOT 1.09
switching console to com0
>> OpenBSD/i386 PXEBOOT 1.09

com0: 9600 baud
booting tftp:bsd.rd: 4692244+739940 [52+164144+149993]=0x57b03c
entry point at 0x200120

Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2006 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 4.0 (RAMDISK_CD) #39: Sat Sep 16 19:34:26 MDT 2006
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD
...

Go through the installation process. You will be asked if you want to change
the default console to com0. The default answer is no, but make sure to say
yes.

Change the default console to com0? [no] y
Available speeds are: 9600 19200 38400 57600 115200.
Which one should com0 use? (or 'done') [9600]


6 - Configure Soekris boot device

Reboot the Soekris device by typing 'reboot' from inside the terminal
emulation software. Press CTRL-P when prompted so you can get into the BIOS
options. Change the boot device to the first fixed disk drive, then type in
"reboot" to reboot one last time.

> set BootDrive=80
> reboot

Now, it will boot off of the hard drive where OpenBSD was just installed. You
will see the following.

Using drive 0, partition 3.
Loading...
probing: pc0 com0 com1 pci mem[639K 255M a20=on] 
disk: hd0+
>> OpenBSD/i386 BOOT 2.10
-
com0: 9600 baud
switching console to com0
>> OpenBSD/i386 BOOT 2.10
boot> 
booting hd0a:/bsd: 5515872+867984 [52+274160+255770]=0x6980a4
entry point at 0x200120

[ using 530356 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2006 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 4.0 (GENERIC) #1107: Sat Sep 16 19:15:58 MDT 2006
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
...

You can now remove the serial cable from the Soekris device. Finally, log in
and make sure the following line is in /etc/ttys.

  tty00   "/usr/libexec/getty std.9600"   vt220    on secure

# vi /etc/ttys


Last modified: Thu Jan 1 00:00:00 1970 UTC
Packetwatch Research 2002-2017.