Booting from USB on RPi3
Jonathan Chen
jonc at chen.org.nz
Mon Apr 20 19:31:59 UTC 2020
On Tue, 21 Apr 2020 at 05:25, bob prohaska <fbsd at www.zefox.net> wrote:
[...]
> At some point the Raspberry Pi foundation introduced a new bootcode.bin
> as described in
> https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
> which was intended to give older Pi2 and Pi3 models the ability to boot from
> USB at the price of keeping a minimal microSD card in place. All that's
> required on the card is the new version of bootcode.bin plus an empty
> file named timeout to give a mechanical drive time to spin up.
>
> Has anybody tried it? I wouldn't expect it to work "out of the box",
> but perhaps with some adjustments.
[...]
This is how I got my RPI3 running 12-STABLE to boot off USB. It does
require a microSD card with u-boot, and the loader.efi built sometime
after Sep 2019 though. However, my root-filesystem (and swap) lives on
an external USB drive.
1. Copy the loader.efi to EFI/BOOT/bootaa64.efi
2. Create a text file: EFI/FreeBSD/loader.env, this file contains a
one-line directive to loader(8) on where to find a kernel to boot.
Mine contains:
rootdev=disk1p1:
The disk entry should be the same as what loader(8) expects with your
USB disk setup. Mine has a GPT partitioning scheme, with the root-fs
on partition-1.
3. All /etc/fstab entries should use symbolic name entries instead of da0*. eg:
7:27am# cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/gpt/topaz-root / ufs rw 1 1
/dev/gpt/topaz-swap none swap sw 0 0
Hope this helps.
--
Jonathan Chen <jonc at chen.org.nz>
More information about the freebsd-arm
mailing list