Having burned out both the original flash drive and its replacement, I can’t recommend using an ERL in a serious setting.

The Ubiquiti EdgeRouter Lite machine is an interesting alternative for a light router/gateway. It’s cheap, small, low power, and includes three network interfaces. Almost like it’s purpose built to be a router. The OpenBSD octeon port supports the ERL. Note that the EdgeRouter X is a quite different machine and not supported.

The web page and INSTALL.octeon file have more extensive notes, but sometimes it can be too much info. Here’s the short version.



install

On the network side, you need a DHCP and tftpd server, with the octeon bsd.rd in /tftproot.

You’ll need a serial cable like this one. The port is set to 115200, so to connect you run something like cu -l /dev/cuaU0 -s 115200 . Plug it in, watch it boot, smash enter a few times to halt the boot process. First command: dhcp to get an IP. Then tftpboot 0 bsd.rd to load the kernel over the network. And finally bootoctlinux to actually run the kernel. This will take you to the installer.

The ERL, like other u-boot systems, doesn’t have an OpenBSD bootloader. Instead, the kernel is loaded from an MSDOS FAT partition. Keep this in mind during disk setup. The installer should set this up for you, or you can use fdisk to change the existing MBR and change the main partition type to A6 (OpenBSD). Space is a little tight, so I skipped the normal disklabel scheme and just made a single large root partition.

Installing the sets and working through the rest of the installer is pretty regular.

After rebooting, u-boot needs some touching up to boot OpenBSD by default. setenv old_bootcmd ${bootcmd} saves the old boot command, not that you’re likely to need it after wiping the disk. Now for the real magic.

setenv bootcmd 'fatload usb 0 $loadaddr bsd; bootoctlinux rootdev=/dev/sd0'

Note that we’re loading from usb, and also setting the root device to sd0. Now you can set a boot timeout with setenv bootdelay 5 if desired, and save everything with saveenv . Reboot and OpenBSD should start normally.



notes

The ERL is an octeon machine, not a high octane machine. It does a pretty good job pushing packets around, certainly doesn’t struggle at this task for my network speeds, but it’s not the kind of thing you’d want to use as an IPsec gateway or more sophisticated proxy. Compiling software is almost unbelievably slow, even compared to an Atom machine.

The onboard USB stick is or was somewhat low quality. When it gets hot, as tends to happen inside the fanless case, it starts reporting errors and generally misbehaving. Many users, running the stock Ubiquiti software, have reported this on various forums. Some newer revisions of the hardware may or may not have fixed this. It’s hard to tell. The fix is to replace it with something small. I used a $7 16GB SanDisk Cruzer. On the bright side, if you’re installing onto a new system, it’s easy to dd miniroot.fs onto the USB stick, replace and reboot. No fussing with a netboot environment and easy to swap back if you want the stock software. Something to consider.

The power draw is consistently about 8 watts, measured over a period of one week.

The dwctwo USB driver is still a little raw. If it gets overwhelmed, you’ll get mutex locking panics. Fixable, but not fixed yet. (The driver was ported to OpenBSD, and some of the finer points of interrupts and recursion are apparently different.) In normal usage, this has not been a problem, but trying to build some ports and doing a cvs checkout at the same time didn’t fare so well.

After deciding I didn’t need my new home router to also be a build server, it’s been quite stable. It’s now the primary DHCP and DNS (unbound) server for my network, and pf NAT gateway to the world.

There’s no onboard clock, so you’ll need ntpd to keep the time straght.



dmesg