FreeBSD 10 on a Raspberry Pi - Notes

As of FreeBSD 10 support for the Raspberry pi (B board only) has been added, and snapshots are also being generated regularly. To install, grab a snapshot from a mirror, I used this one and its checksum.

Verify that we downloaded the entire file with sha256sum

$ sha256sum -c CHECKSUM.SHA256-10.0-STABLE-arm-armv6-RPI-B-20140222-r262336
FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140222-r262336.img.bz2: OK

Uncompress the image

$ bunzip2 FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140222-r262336.img.bz2

Write the image to the SD card with dd

$ sudo dd if=/FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140222-r262336.img \

From here we’re ready to boot the Raspberry Pi for the first time. You need to attach a monitor and keyboard to the raspberry pi since the root password is unset and there are no other users installed so you won’t be able to connect over ssh. So boot it and fix that and a few other things

# passwd

Add a user so we can ssh in (FreeBSD blocks root ssh login by default)

# adduser

Set a timezone (from /usr/share/zoneinfo)

# cp /usr/share/zoneinfo/UTC /etc/localtime

And sync our system clock with an ntpd server

# ntpdate -v -b

Next, reboot. This will grow your filesystem automatically and you can now connect to your pi via ssh with the user account you created. Now to install some software. FreeBSD 10 now uses the pkg tool for binary package installation and management, but the only official packages generated are for amd64 and i386, so we’re going to have to use ports. Install ports with portsnap (be warned, even on a class 10 card this takes over an hour).

# portsnap fetch && portsnap extract

Other things to consider are, due to lack of support the binary package tools (pkg) and binary system updates (freebsd-update) are not available so you will be stuck using keeping your system patched manually. This won’t be practical for most users, but if you want to use FreeBSD on a Raspberry pi it’s working! Keeping it updated is going to be a lot more difficult especially with slow SD and USB storage, but if you have additional resources it is possible to build packages for arm6 on a faster system via qemu armv6, a few patches, poudriere and some luck.

Related Links:

Show Comments