Installing Big-endian FreeBSD
This tutorial is a step-by-step guide to installing Big-endian FreeBSD. It largely follows the default options, but notes where alternatives can be entered. It also highlights pitfalls and solutions.
What is known to not work is device discovery after installation, and autoboot. Solutions to the former and diagnostic information on the latter are presented.
Contents
- 1 OpenBMC Part 1
- 2 FreeBSD Installer
- 2.1 Console selection and Welcome!
- 2.2 Keymap
- 2.3 Naming the host
- 2.4 Selecting components
- 2.5 Partitioning the disk
- 2.6 Verifying components
- 2.7 Root password
- 2.8 Network interface
- 2.9 Additional services
- 2.10 Hardening the installation
- 2.11 Firmware
- 2.12 Additional users
- 2.13 Configuration Review
- 2.14 Final Tweaks
- 2.15 Rebooting
- 3 OpenBMC Part 2
- 4 FreeBSD boot
- 5 Troubleshooting
- 6 Developer access
OpenBMC Part 1
Virtual Media
For this installation, big-endian FreeBSD was obtained from the FreeBSD official powerpc64 ISO RELEASE repository. They also have a little-endian release.
If you do not have direct access to the machine, you can use the Virtual Media interface.
Choose a local file for the installation. There is no option for choosing a file on a remote server. In this case the big-endian FreeBSD installer is selected.
Serial over LAN
To interact with petitboot, select Serial over LAN from the Server Control menu
While booting, you should see output such as
Note that by default, the window area might not be selected. Click into the console area to activate it.
Selecting the FreeBSD Installer
Once you have booted, the first stop is the boot menu.
Using the arrow keys, select "FreeBSD Installer" and hit 'enter'
The system will reboot into the FreeBSD system on the installer iso.
FreeBSD Installer
Console selection and Welcome!
After the boot process is nearly complete, you will need to select the console type.
The next message should be the installer interface:
If you would like to explore FreeBSD before installing it, select "Shell" or "Live System." Otherwise, select the default "Install" option.
Keymap
You will need to select a keymap. For most English installations, the default will work. Many others are provided.
Naming the host
Enter a name for the host. In our case, we entered "FreeBSD_BE" to identify this installation as "Big endian," as opposed to the little-endian version maintained by Raptor.
Selecting components
Select the components you want installed. To select or de-select, navigate to the option with the arrow keys and hit the space bar. Hitting the 'return' key will accept the entries. For this installation, we have additionally selected the ports tree and the source code.
Partitioning the disk
The default destination disk might come up opalflash0. This is a read-write RAM disk provided by petitboot. Do not select it. Choose an alternative that looks reasonable or expected. In this case, the NVMe disk will be identified as nda0.
The installer will present you with options for partitioning. Unless you have specific needs and can manage those yourself, choose the Auto/Guided UFS Setup option.
Unless you have need to partition the disk (perhaps to support additional installations), use the entire disk. You may be given a warning about erasing previous partitions, or using the entire partition.
Select GPT.
You can make some last minute changes in the partition map editor.
And one last chance to not erase the disk:
Verifying components
Upon successful partitioning of the destination disk, the installer will begin to download the previously selected components. Since this connection is from your local computer to the host, the length of time this takes is entirely dependent on your internet connection.
Root password
If all has gone well, the next prompt will ask you to enter a password for the root account. The default setting in FreeBSD is not allow remote logins with root; only console logins are accepted.
Network interface
Your Talos II system has two ethernet interfaces. We are selecting bge0.
This system is hosted by Raptor; the values are from their network. Enter yours as appropriate. If you do not want to manually enter the values, select DHCP (not shown).
We configured IPv4, but do not want to configure IPv6 for this example.
Last, enter your choices for DNS lookup servers. We have entered two from OpenDNS.
Additional services
The installer allows you to select some basic startup services. We would like ntpd to run.
Hardening the installation
There are several options for hardening the installation. As this is a development-focused machine, we are not activating any at this time.
Firmware
For some hardware, FreeBSD has components to work with the firmware and will ask you to install them.
There are none for this hardware, so you do not need to do anything except hit "enter."
Additional users
It is a good idea to add at least one additional user at this time. The step-by-step process is guided and omitted here. the final setting might look like:
In this example, we created a "user1" account, but locked it out. For actual installations, it is advisable to have a user that is added to the "wheel" group. This will allow that user to su to root from an ssh session. Note that user1 has id 1002; we added the wheel group member earlier.
Configuration Review
The installer has collected the installation details and offers a chance to modify your choices.
Final Tweaks
You may have some custom settings not covered by the installer. This is when you can apply them, via the shell.
Rebooting
With everything complete, you can reboot, shutdown, or launch a Live System.
OpenBMC Part 2
Making nda0 bootable
Upon rebooting, you are going to find yourself back in petitboot.
Unfortunately, at the time of this writing, there are a few issues that prevent autoboot from working. Further details are found in the #Troubleshooting section below. For now, at the above menu, type 'n' to add a new device:
Select the destination disk (use arrow keys to navigate and space bar to choose), and enter '/kernel/kernel' in the kernel location. Navigate to "OK" and type enter. If all has gone well, and you still have the FreeBSD installer CD in the Virtual Media, it should look like:
Navigate to "user item 1" and type enter.
FreeBSD boot
Selecting root device
However, you will likely stall partially through the boot process:
The syntax once in mount is different than if you pass arguments via the command line. Enter "ufs:nda0p2" to mount the second partition (/) and hit "return/enter."
If all goes well, you should see
Troubleshooting
Lots of time things don't go so well, and below are some tips for trying figure out why not.
Accessing pb-discover.log
Many of the errors are actually logged. This file is at /var/log/petitboot/pb-discover.log
It can be accessed by selecting "Exit to shell" and then basic utilities are available as found in buildroot.
In the example above, the error is because the FreeBSD kernel is not at /boot/kernel, it is as /boot/kernel/kernel. As noted in #OpenBMC Part 2, this has to be manually added to the device in order for petitboot to find it.
Mounting UFS disks
In petitboot, it might be necessary to mount the FreeBSD partitions. Linux does not automatically recognize UFS file systems, so the specifics have to be passed to 'mount':
mount -t ufs -o ufstype=ufs2 /dev/nvme0n1p2 /mnt
This has mounted the / partition of the FreeBSD installation to /mnt.
Note that the boot partition is likely already loaded at /var/petitboot/dev/mnt/* where * is the Linux-derived name for the disk. In the example below, two boot partitions are already mount (read-only), nvme0n1p1 (the actual installation) and sda0 (the virtual media-based iso installer image).
If you need to modify files in the boot partition of the installation, in theory you can remount it read-write. However, depending on the file system, journaling may prevent files written by one operating system from persisting when the drive is booted by another.
Autoboot doesn't work
Beats me. Everything is selected. You will have to add the destination disk to the boot drives and navigate to the bottom to "OK" for the changes to be saved.
Basically, go back to #OpenBMC Part 2 and follow those steps. The FreeBSD installation hangs up with mount each time, even though the geometry is correct.
There is no mismatch in /etc/fstab:
Developer access
Raptor Computing Systems supports many different development models from bare metal access (e.g. kernel hacking) through software development. If you are interested in developing with FreeBSD and would like an account on our system, please email support@ this domain (raptorcs.com) with a description of your interests.

