FANDOM


No screen? No worries! Edit

In the case of the ALIX boards without VGA, getting an OS onto them can be difficult. Thankfully, OpenBSD's design allows for installing the OS over a serial console.

Of course, you can install the CF card into your system temporarily and run the install, but there's the risk of hitting race conditions if the CF card isn't the primary IDE device, which it would be in an ALIX box. Here's a couple of relatively foolproof methods of booting the OpenBSD installer for installation over a network, or a USB drive.

Plan A - PXE BootEdit

Even if you have a Windows PC, you can easily set up a PXE booting solution using free software.

IngredientsEdit

  • A PC with a DHCP server and a serial port - you can use a Windows computer here.
  • A null modem cable - $9 from PCEngines.
  • An assembled ALIX machine.

MethodEdit

If you have a Windows PCEdit

  1. Download and install tftpd32. Unzip it to a folder somewhere.
    Tftpd32 config

    Suggested TFTP server setup

  2. Open the application and set it up as it is in the screenshot to the right.
  3. Go to your favourite OpenBSD mirror and download bsd.rd and pxeboot. Store these in the same directory as the TFTP server.
  4. Create a directory in the same directory as the TFTP server called "etc".
  5. Create a file in the etc directory named "boot.conf" and enter the following into it to set the console and boot the ram disk:
    set tty com0
    boot tftp:/bsd.rd
  6. Plug in and turn on your ALIX computer and press S during the memory test.
  7. Press E to enable PXE booting, then Q to quit. Press Y to save and reboot.

If you have a *nix PCEdit

  1. Download and install a TFTP server. If you use OpenBSD, one is already provided. Set it up to use /tftpboot as its root directory.
  2. Download and install a DHCP server. OpenBSD users have one already provided.
  3. Go to your favourite OpenBSD mirror and download bsd.rd and pxeboot. Store these in /tftpboot.
  4. Edit /etc/dhcpd.conf (or /etc/dhcp3/dhcpd.conf for Debian users) to include something like the following:
    subnet 10.0.0.0 netmask 255.255.255.0 {
    
    	option routers 10.0.0.1;
    	option domain-name "pxeboot";
    	option subnet-mask 255.255.255.0;
    	option broadcast-address 10.0.0.255;
    	option domain-name-servers 10.0.0.1;
    	range 10.0.0.2 10.0.0.254;
    }
    Edit the configuration to suit your needs.
  5. Create a directory named etc and a file within called boot.conf to set the console and boot the ram disk:
    #mkdir /tftpboot/etc
    #cat >/tftpboot/etc/boot.conf <<EOF
    >set tty com0
    >boot tftp:/bsd.rd
    >EOF
  6. Plug in and turn on your ALIX computer and press S during the memory test.
  7. Press E to enable PXE booting, then Q to quit. Press Y to save and reboot.

Plan B - Direct bootEdit

In some situations, PXE isn't an option - sometimes you don't have control over the DHCP server or perhaps the method above didn't work - PXE can be tricky business. Also, the ALIX boards lack the ability to boot off a USB disk. In this case, you can use the CF card for your ALIX computer to start the show.

IngredientsEdit

  • An OpenBSD system - a VM will suffice
  • A CF card reader
  • A null modem cable - $9 from PCEngines.
  • A system with a serial port.

MethodEdit

If you run OpenBSD in a VM on WindowsEdit

  1. Boot your OpenBSD system, log in and create an empty image of about 10 megabytes:
    dd if=/dev/zero of=instdisk.img bs=1024k seek=10 count=0
  2. Set up the new disk image to act as a hard disk:
    vnconfig svnd0 instdisk.img

for 5.5 use "vnd0" instead of "snvd0"

  1. Create a basic MBR (master boot record) on it so that it can boot:
    fdisk -iy svnd0
  2. Create a single partition on the disk image:
    # disklabel -E svnd0
    Label editor (enter '?' for help at any prompt)
    > a
    partition: [a]
    offset: [100]
    size: [20300]
    FS type: [4.2BSD]
    > q
    Write new label?: [y] y
  3. Create a new filesystem on the newly created partition:
    newfs svnd0a
  4. Mount the filesystem:
    mount /dev/svnd0a /mnt
  5. Copy the boot program and the RAM disk kernel to /mnt:
    cp /boot /bsd.rd /mnt
  6. Set up the bootloader:
    /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot svnd0
  7. Create a /etc/boot.conf to tell the bootloader to use a serial console and to boot the ramdisk:
    mkdir /mnt/etc
    echo set tty com0 > /mnt/etc/boot.conf
    echo boot hd0a:/bsd.rd >>/mnt/etc/boot.conf
  8. Unmount the filesystem:
    umount /mnt
  9. Unset the virtual disk device:
    vnconfig -u svnd0
  10. Copy the disk image off the VM using a tool like pscp (comes with PuTTY) or WinSCP.
  11. Download Win32 Disk Imager from Launchpad.
  12. Insert your CF card and locate the drive that points to it in the drop-down box of Disk Imager.
  13. Load the image file you created into it and click "Write".
  14. Once it completes, remove the card and insert it into your powered off ALIX system.

If you run OpenBSD nativelyEdit

This guide assumes you have a CF card reader on device "sd0". If you have any critical data on that card, you'd best make a backup, because once you do this, there is no going back.

  1. Insert your CF card, then re-initialise the boot loader:
    fdisk -iy sd0
  2. Create a 10mb root partition in the disklabel:
    # disklabel -E sd0
    Label editor (enter '?' for help at any prompt)
    > a
    partition: [a]
    offset: [100]
    size: [20300]
    FS type: [4.2BSD]
    > q
    Write new label?: [y] y
  3. Create a filesystem and mount it:
    newfs sd0a
    mount /dev/sd0a /mnt
  4. Copy the boot program and the RAM disk kernel to /mnt:
    cp /boot /bsd.rd /mnt
  5. Set up the bootloader:
    /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd0
  6. Create a /etc/boot.conf to tell the bootloader to use a serial console and to boot the ramdisk:
    mkdir /mnt/etc
    echo set tty com0 > /mnt/etc/boot.conf
    echo boot hd0a:/bsd.rd >>/mnt/etc/boot.conf
  7. Unmount the filesystem:
    umount /mnt
  8. Remove the card and insert it into your powered off ALIX system.

After all of thatEdit

  1. Plug in your serial cable into your ALIX system and your computer, and fire up your favourite terminal emulator - Hyperterm for Windows and cu for Openbsd.
  2. Plug in an ethernet cable so that it can access the Internet for the install.
  3. Turn the ALIX box on.

The install should carry on as normal from here, apart from there being no CD-ROM to install packages from.

This may seem excessive, but it eliminates any race conditions that would prevent you from being able to connect to the box after installation - such as having the network ready on first boot rather than messing around with it afterwards.

If you can't get an Internet connection, you can copy the install files to a USB thumb drive and refer to that during the install. Just choose "hd" as the install source.