encryptio.com

This sentence is very meta.

My Experience Installing FreeBSD on the EeePC (failure)

I attempted to use an Eee 901 w/ FreeBSD 7.0. In short: I'm stubborn as all hell, and doing this will not give you a usable system. This seems to only be valid for FreeBSD 7.0 specifically - from what I've heard, new versions of FreeBSD work.

To use FreeBSD on the Eee 901, you'll need a FreeBSD-CURRENT box and be willing to run -CURRENT on the Eee. Then you'll get wired networking access. Eventually I gave up on FreeBSD and tried OpenBSD.

First Attempt: USB Flash Drive Using a Converted Official FreeBSD Release ISO

My first possibly workable idea was to use the script in this message to convert a FreeBSD install CD ISO to a FreeBSD install flash drive image. The final work boiled down to:

wget schema://path/to/7.0-RELEASE-i386-disc1.iso
sh fbsdiso2flash.sh 7.0-RELEASE-i386-disc1.iso fbsd7.img # as root
dd if=fbsd7.img of=/dev/da0 bs=128k # the flash drive - mine copied faster with a higher block size
bsdlabel -B /dev/da0

This booted in the Eee after a little futzing around with the BIOS; I plugged in the USB drive, started the machine, ran the BIOS setup, and in the "Boot Settings" section set the flash drive first in the "Hard Disk Drives" section.

FreeBSD booted fine, sysinstall started fine, however, the "Installation Media" setting failed. It gave (relevant) options for "CD/DVD", "FTP", and "Filesystem" - none of which I can install from. The CD/DVD option requires a physical optical drive to be used. The FTP option requires a network, which requires a patched kernel.

"Filesystem" sysinstall option (failure)

The "Filesystem" option is a good start, but eventually a dead end. The option is woefully opaque in its arguments - it asks for a path and gives no other options for viewing the filesystem. I eventually came to the realization that I could start a holographic shell beforehand to mount the flash drive, but that didn't quite work:

# ls
ls: not found

Oh boy, this doesn't look fun. I figured out that I could use "echo *" to get a file listing, and in doing so found that there was no "mount" command. With no way to mount the flash drive, using the flash drive as the sole installation media failed.

This installation path is 95% working, it just needs a few patches for the old code in sysinstall to make it more lenient towards other forms of local installation media. Alternatively, one could include the suite of "mount" programs in the holographic shell.

Second Attempt: USB Flash Drive Using a Converted Hand-Compiled FreeBSD Release ISO With Wireless Patches Applied

As mentioned on http://nighthack.org/wiki/EeeBSD, the wireless network card does not work with the GENERIC kernel as given in the official releases. Hopefully a future release will integrate these patches into the main tree.

Here's the idea: same as above, but using an install .iso that has been made with the madwifi hal patches applied to the kernel. Then we can use the network FTP install.

During all this, I needed to resize my virtual machine to have enough space for the CVS tree.

cvsup supfile

cd /usr/src
make buildworld
# wait 75min

fetch http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6/madwifi-hal-0.10.5.6-r3875-20081105.tar.gz # latest as of this writing
tar -xzvf madwifi-hal-0.10.5.6-r3875-20081105.tar.gz
cd madwifi-hal-0.10.5.6-r3875-20081105/hal
cp -Rv * /usr/src/sys/contrib/dev/ath/

mkdir /root/releasechroot
cd /usr/src/release
make release CHROOTDIR=/root/releasechroot BUILDNAME=7.0-RELEASE EXTSRCDIR=/usr/src EXTPORTSDIR=/usr/ports CVSROOT=/var/empty RELEASETAG=RELENG_7_0_0_RELEASE
# wait

I was never able to get past the make release demon - it wanted a real CVSROOT despite me giving it (as far as I know) everything it wanted in other directories. I tried modifying my supfile to get a CVSROOT, but I couldn't find a way.

By this time, I had ordered (but not recieved) a USB CD drive to use for sysinstall.

Third Attempt: Ubuntu Eee bootstrap followed by a depenguination

I remembered the Depenguinator, a script that makes installing FreeBSD off a running linux install without rebooting. I decided to use Ubuntu Eee, a derivative of Ubuntu with special support for the Eee's hardware oddities and a standard way to install from a USB stick.

So I made myself a Debian virtual machine and followed the install instructions for ubuntu eee.

Once I got the USB stick booted, I decided to install onto the SD card I had in the machine, to make going back easier if that was neccessary. I also set up a 1.2 GB swap partition for future use with the depenguinator.

After grabbing the required .deb files and installing them on ubuntu, I ran the depenguinator. Alas, it was not meant to be - the same issue cropped up after I booted the minimal FreeBSD install partition. I still had no install media that I could use properly.

Fourth Attempt: Spending $15 on an external USB optical drive

By this time, my USB CD drive had finally arrived. I did the standard install then - burn the .iso to a CD-R, boot it on the machine to install on.

This was quick to fail, unlike my other attempts. The drive would not mount or boot any CD I tried on any machine I tried. The one I had recieved required a special driver to mount the drive, although it would show up as a physical drive to any standard USB host. There are only windows drivers.

Fifth Attempt: Install onto a USB stick with a virtual machine, then clone the install to the internal drive

I had an epiphany - my VMWare resizing operation that I did earlier in the process sparked a thought: could I clone my install from one disk to another? If so, I could use either the SD card or my USB flash drive (both of which are bootable on the Eee) to install FreeBSD onto using another machine with a CD drive (or a virtual one with a virtual drive), then I could probably clone the system using a similar method.

I used yet another VMWare virtual machine to install onto the USB stick. No troubles on that step. Interestingly, VMWare did not want to boot the install from the USB disk (I didn't try very hard.) It did boot when I plugged it into the Eee.

I mainly followed my VMWare resizing instructions, with a few exceptions: I created separate partitions for /, /tmp, /var, and /usr, because the disk configuration required it (two logical disks), and also changed /etc/fstab in the clone before rebooting so that it would know where its new partitions were.

After this, I compiled a custom kernel with the atheros hal patches as mentioned in the second attempt. Note: oddly, my /usr/src/sys/dev/ubsec/ubsec.c was missing the first 700 lines or so. I got the complete file for 7.0-RELEASE from a cvsweb.

No network. FreeBSD-7.0 does not support any of the EEE 901's network cards, wired or wireless.

I Give Up

At this point, I'm tired and frustrated. I used Ubuntu Eee for a few weeks until I had time to read through the OpenBSD FAQs and figure out what everything on the most relevant OpenBSD install page I could find meant.

I made an OpenBSD virtual machine and installed a -CURRENT snapshot. I created a flash install key with the aformentioned page's instructions. I installed it on the Eee, no problems. I booted it, one problem: no wired network. Wireless works fine though, through the ral driver.

With that, I end this endeavour and move on to other things.

2008-12-05

2009/07 Update

I've heard from some people that FreeBSD-7.2 and up support the network cards in the EEE 901. If the installer isn't already fixed, the "Fifth Attempt" method should work now. The "Fourth Attempt" would also work if you avoid crappy drives. As for myself, I'm hooked on OpenBSD's UNIX-like simplicity. Odds are any new server I set up will be an OpenBSD box.