USB booting a Soekris net6501 from USB

From Wiki
Jump to: navigation, search

Unlike previous models, Soekris net6051 boards support booting from a USB flash drive plugged in to the external USB port or the internal port. This is sometimes more convenient than using the PXE netboot method which is well documented elsewhere.

I will be booting the system from a regular USB flash drive in order to install Debian onto a second very smal USB flash drive which will be permanently plugged in to the internal USB port.

Prepare the installer flash drive

  • Download an i386 netinstall ISO from a debian mirror. I'm using Debian Wheezy 7.5.
  • Using another computer running Linux, partition the flash drive with an MBR partition table and one FAT partition (type c). I used fdisk to do this.
  • Format the partition, i.e:
# mkfs.msdos /dev/sdb1
  • Mount the partition and run unetbootin
  • Use unetbootin to copy the contents of the Debian ISO to the USB flash drive.
  • When unetbootin has finished, locate the syslinux.cfg file in the root of the USB drive, then replace its contents with something like the following:
default linux
prompt 1
display boot.msg
timeout 100
label linux
  kernel /install.386/vmlinuz
  append initrd=/install.386/initrd.gz console=ttyS0,19200n8 -

Boot the Installer

That's it, time to unmount the flash drive, plug it in to your Soekris net6501 and power it on. Connect a VT100-capable terminal to the serial port and set it to 19200,8n1. When your soekris starts to go through its BIOS, note the order of the boot devices, for example:

Soekris USB Expansion ROM ver. 1.01  20111203                                   
80: USB 01  SanDisk Cruzer Slice    Xlt 973-255-63  7816 Mbyte                  
81: USB 02  SanDisk Cruzer Fit      Xlt 1024-255-63  15633 Mbyte

When prompted, press ctrl-p and give the following command:

 2 Seconds to automatic boot.   Press Ctrl-P for entering Monitor.              
comBIOS Monitor.   Press ? for help.                                            
> boot 80

At the boot: prompt, just press return. After much output you'll be presented with the familiar Debian text-based installer. Install Debian as desired onto the internal USB flash drive, which in my case is detected as /dev/sdb

Boot the installed system

When prompted, reboot, but leave the installer USB flash drive connected, otherwise the internal drive will be detected as /dev/sda, so fstab and GRUB will be out of whack. We'll sort this in a minute.