rpi4 zfs-on-root boot-to-usb3

Mark Millard marklmi at yahoo.com
Thu May 6 12:55:29 UTC 2021


On 2021-May-6, at 04:12, tech-lists <tech-lists at zyxst.net> wrote:

> How can zfs-on-root boot-to-usb3 on rpi4 be accomplished?
> 
> I've tried bsdinstall from a mmcsd-booted rpi4 but there seems to be
> problems with it that I can't work around. What's really needed is an
> installer, but these aren't made for arm64.aarch64 rpi4 from what I can
> see (I'm no expert though, it's entirely feasible i've missed
> something).
> 
> Maybe one way of doing it would be to have a usb key (as ufs2) for the
> system to boot on, then have /home /usr/obj and other larger dirs on the
> usb3-zfs disk.

I used bsdinstall from booting a releng/13.0's release/13.0.0.0
microsd card in a 8 GiBYte RPi4B to produce the:

# gpart show -pl da0
=>       40  468862048    da0  GPT  (224G)
         40     532480  da0p1  efiboot0  (260M)
     532520       2008         - free -  (1.0M)
     534528   25165824  da0p2  swp12a  (12G)
   25700352   25165824  da0p4  swp12b  (12G)
   50866176  417994752  da0p3  zfs0  (199G)
  468860928       1160         - free -  (580K)

# gpart show -p da0
=>       40  468862048    da0  GPT  (224G)
         40     532480  da0p1  efi  (260M)
     532520       2008         - free -  (1.0M)
     534528   25165824  da0p2  freebsd-swap  (12G)
   25700352   25165824  da0p4  freebsd-swap  (12G)
   50866176  417994752  da0p3  freebsd-zfs  (199G)
  468860928       1160         - free -  (580K)

that I'm using to experiment with bectl and the like.
It boots the RPi4B 8 or 4 GiByte, the OverDrive 1000,
and the MACCHIATObin Double Shot. (I had to separately
add the RPi firmware and U-Boot to the efi file
system efiboot0 in order to enable the RPi4B booting.
Later I tried booting the other two.)

But until I go back and do it again to another USB3
SSD, recording steps as I go, I can not supply a
step-by-step sequence to go through. I might have to
again figure things out that I figured out the first
time. I just do not remember all the detail. It had
been years since I'd used bsdinstall.

It will be a while before I can try that but I
expect that I can and I then I should be able to
report an example sequence.

(I split the original swap space in two later.
I use only 1 of them as swap for 4 GiByte RPi4B's.
Part of my experiments have been using tmpfs in
poudriere and the large swap total for 8 GiBYte+
machines is tied to that activity for how I have
poudriere configured and building things like
llvm*, possibly multiple of them in parallel.)

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list