1dnl $OpenBSD: prep,v 1.5 2015/08/02 09:54:29 jasper Exp $ 2By default MACHINE systems are shipped with a Linux (or proprietary) system 3installated on the CompactFlash card or USB drive. 4 5First connect your computer via serial port to the device (you may need to use 6a Cisco serial cable depending on your hardware) with a command such as 7"cu -l cuaU0 -s 115200" (assuming cuaU0 is your serial port device). Now apply 8power to the device and start it. 9 10Unless you have removed or changed the Linux installation it will be booted 11automatically. If you are quick you can interrupt booting (while still in 12U-Boot) with ^C. 13 14There are several ways to load an OpenBSD/MACHINE kernel (or ramdisk), 15over TFTP, from the internal CompactFlash or USB storage. 16 17Booting from a CF card or USB: 18 19 To use the miniroot image you will need another machine to plug the 20 SD card in to. Any machine type will do, as long as it supports SD card 21 storage devices. Under OpenBSD, it will appear as a ``sd'' device, for 22 example sd1. 23 24 Use the dd(1) utility to copy the miniroot to the hard drive. 25 The command would likely be, under OpenBSD: 26 27 dd if=miniroot{:--:}OSrev.fs of=/dev/rsd1c 28 29 Now load the ramdisk kernel using either of the following commands depending 30 on the medium used. For USB: 31 32 Octeon ubnt_e100# fatload usb 0 $loadaddr bsd.rd 33 34 For Compact Flash use: 35 36 # fatload ide 0:1 ${loadaddr} bsd.rd 37 38Booting over the network: 39 40 For TFTP you will first need to setup a TFTP server as described in 41 diskless(8). Assuming tftpd(8) chroots into /tftpboot, copy bsd.rd into that 42 directory. 43 44 Power on your OpenBSD/MACHINE device and from the U-Boot prompt set up 45 networking. In this example it is assumed you have a DHCP server in your 46 network: 47 48 # dhcp 49 50 If you don't have a DHCP server, you need to set the ipaddr U-Boot environment 51 variable: 52 53 # setenv ipaddr <static ip address> 54 55 Now set the IP address of your TFTP server: 56 57 # setenv serverip <server ip> 58 59 The ramdisk kernel needs to be loaded into memory. If you use "0" as the 60 address, the default address location will be used by U-Boot: 61 62 # tftpboot 0 bsd.rd 63 Using octeth0 device 64 TFTP from server 192.168.178.30; our IP address is 192.168.178.89 65 Filename 'bsd.rd'. 66 Load address: 0x9f00000 67 Loading: ######################### 68 done 69 Bytes transferred = 7191474 (6dbbb2 hex), 8617 Kbytes/sec 70 71Booting the installation kernel 72 73 Now the kernel can be booted from the default memory location, with no 74 arguments provided: 75 76 # bootoctlinux 77