FreeBSD is available for installation on Raspberry pi, from version 10.0. We can install and Configure FreeBSD 10.0 using the following procedure.
The FreeBSD is available as prebuilt image from the official repo.The following is a directory in one of the official mirrors of FreeBSD.
http://mirror.yandex.ru/freebsd/releases/ISO-IMAGES/10.2/
The image file can also be downloaded from this link. Download and save the image into your machine. The file will be in compressed xz format.Extract the image
unxz FreeBSD-10.2-RELEASE-arm-armv6-RPI-B.img.xz
The output file will be in .img format. This is the prebuilt image which can be directly written to the SD that is used to boot the Raspberry Pi. We can use “dd” to write the image file into the SD card.
dd if=FreeBSD-10.2-RELEASE-arm-armv6-RPI-B.img of=/dev/x
The “x” is the file relating to the SD card. It can be replaced according to your Operating System. If it is Linux, “x” should be replaced with “sdb”.
After this image is fully written into the SD card, remove it from the machine.
Insert it into SD slot of the Raspberry Pi.Switch on the Raspberry Pi.
FreeBSD boots with an empty password. You can create a new password now
passwd root
The setup also boot up with DHCP enabled on wired ethernet interface. If you want to ssh into it as root login using password, root login and password access should be enabled in sshd configuration. It can be done by editing the /etc/ssh/ssh_config file and making the following changes.
PasswordAuthentication yes PermitRootLogin yes
Restart the SSH service
service sshd restart
The date and time needs to be set after restart. Configure the timezone. For example, if the time zone is Indian Standard Time (IST) set the localtime to Asia/Kolkata.
cp /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
Reboot the machine
reboot
You can also set the time temporarily using the following command. The syntax is “date yymmddhhmm”
date 1411291239
By default “pkg” is not installed on the system. You might get the following error while trying to install pkg by running “pkg update”
root@raspberry-pi:~ # pkg update The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/freebsd:10:armv6:32:el:eabi:softfp/latest, please wait... pkg: Error fetching http://pkg.FreeBSD.org/freebsd:10:armv6:32:el:eabi:softfp/latest/Latest/pkg.txz: Not Found A pre-built version of pkg could not be found for your system. Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
Here we might need to install pkg from the ports. To get the portsnap from the repository, run the following commands.
portsnap fetch portsnap extract
Run the following commands to install pkg from ports
cd /usr/ports/ports-mgmt/pkg make install
Now you can use pkg to install and remove packages.
worked flawlessly