Re: Installing 13.1 ARM on SSD

From: Mark Millard <marklmi_at_yahoo.com>
Date: Fri, 08 Jul 2022 19:24:04 UTC
On 2022-Jul-8, at 10:40, Wall, Stephen <stephen.wall@redcom.com> wrote:

> I am attempting to install FreeBSD/ARM 13.1 on a RPi4 with a USB3 SSD attached.
> Steps I’ve taken:
> - Used Raspberry Pi Imager to set the board to boot from USB first, SD card second
> - downloaded and burned  FreeBSD 13.1 arm65-aarch64-RPI image
> - booted and run bsdinstall
> - selected ZFS
> - selected the USB SSD
>  
> Installation ran to completion, but when I reboot without the SD card, I get a “Firmware not found” error message.
> Searching the web gives lots of results for linux, but I can’t find anything for FreeBSD.
> Has anyone successfully done an install like this, and can point me toward some resources that will get me straightened out?

I've somewhat generalized these notes beyond the
aarch64 RPi* specifics.

Various devices require more than FreeeBSD installed in
order to boot. aarch64 SOC based examples include:

RPi*'s
PINE64
PINE64-LTS
PINEBOOK
ROCK64
ROCKPROD64

These need to have RPi* firmware and/or U-Boot (and
sometimes other related softwaere) or other such
(e.g, EDK2) installed as well.

FreeBSD's installer does not deal with such non-FreeBSD
firmware/software installation: only with FreeBSD itself.

The FreeBSD project prebuilds images for the above list:

FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img.xz
FreeBSD-13.1-RELEASE-arm64-aarch64-PINE64.img.xz
FreeBSD-13.1-RELEASE-arm64-aarch64-PINE64-LTS.img.xz
FreeBSD-13.1-RELEASE-arm64-aarch64-PINEBOOK.img.xz
FreeBSD-13.1-RELEASE-arm64-aarch64-ROCK64.img.xz
FreeBSD-13.1-RELEASE-arm64-aarch64-ROCKPRO64.img.xz

(Some or all of these are MBR based instead of GPT.)

The images are available from the likes of:

http://ftp3.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/13.1/

There are also ports for building U-Boot for other
SOCs/systems. Similarly for providing the RPi*
firmware and related that FreeBSD uses in its prebuilt
images.

In many cases, one can use one of the above images
expanded onto media and then replace the U-Boot/whatever
with U-Boot/whatever from one of the other FreeBSD U-Boot
ports. But some, for example, U-Boot's may not fit in the
space some images supply. So picking one that does needs
to be explicit (presuming one of them is sufficient).


None of these media are ZFS based as far as I know. That
probably goes along with the material in "The Design and
Implementation of the FreeBSD Operating System" about ZFS
(pages 548..549):

"Like all non-overwritingfile systems, ZFS operates best
when at least a quarter of its disk pool is free. Write
throughout becomes poor when the pool gets too full. By
contrast, UFS can run well to 95 percent full and acceptably
to 99 percent full."

". . . [The ZFS] design assumed that the would have many fast
64-bit CPUs with large amounts of memory to support these
enormous file systems. When these resources are available,
it works extremely well. However, it is not designed for
or well suited to run on resource-constrained systems using
32-bit CPUs with less than 8 Gbyte of memory and one small,
nearly full disk, which is typical of many embedded systems."

The RAM and/or free disk space constraints (for example) are
likely still at issue sometimes in 2022, not just back around
2015 (the Copyright year for the book). Thus the bias to
UFS-based rebuilt images.

===
Mark Millard
marklmi at yahoo.com