RBPI3B+ FreeBSD 12 ZFS
ticso at cicely7.cicely.de
Sat Feb 23 14:14:22 UTC 2019
On Fri, Feb 22, 2019 at 05:38:03PM +0200, Stefan Parvu wrote:
> I know ZFS would need a decent amount of RAM to start with. So for such low sized
> SBC systems, like Raspberry PI having ZFS for root might be no go.
> What I meant was: how complicated would be right now for FreeBSD 12 to have an
> ARM64 RBPI3B+ image image which could use ZFS to boot from a SD Card.
It just works.
I'm also running zroot on a Pi1 (512MB version).
My workflow on an amd64 machine with SD-reader as da0.
This is not the perfect way of doing it, but I wanted it fast without finding out
how to partition a bootable card myself first.
I will change that into complete partitioning later, which also has the advantage
of not writing unallocated blocks to the card, which makes the cards slower later
Write the standard image for your board.
mount /dev/da0s2a and copy the files aside (/tmp/FreeBSD-12-arm64 in the following code).
Boot the image in a raspberry to resize.
Reinsert into the amd64 system.
dd if=/dev/zero of=/dev/da0s2 bs=1m count=100
gpart create -s BSD da0s2
gpart add -t freebsd-zfs -a 4k da0s2
zpool create -R /mnt -O mountpoint=none -O atime=off -O compression=lz4 zroot /dev/da0s2a
zfs create -o canmount=off -o mountpoint=none zroot/ROOT
zfs create -o mountpoint=/ zroot/ROOT/default
zfs create zroot/ROOT/default/usr
zfs create zroot/ROOT/default/usr/obj
zfs create zroot/ROOT/default/var
zfs create zroot/ROOT/default/var/log
zfs create -o mountpoint=/home zroot/home
zpool set bootfs=zroot/ROOT/default zroot
find -d . | cpio -pdvm /mnt
echo 'opensolaris_load="YES"' >> /mnt/boot/loader.conf
echo 'zfs_load="YES"' >> /mnt/boot/loader.conf
echo 'vfs.zfs.arc_max="256M"' >> /mnt/boot/loader.conf
echo 'zfs_enable="YES"' >> /mnt/etc/rc.conf
# disable / and /boot/msdos mounts
zpool export zroot
Now you can boot it on a raspberry.
/boot/msdos is required to be disabled, because it fails to probe for the
label with zfs using /dev/diskid/...s2a
You can mount it via /dev/diskid/...s1, but the name is media dependend.
You might want to increase vfs.zfs.arc_max to 512MB, depending on your
I usually add another identic card via USB reader (or secondary slot in
case it is not a Raspberry and has 2 slots) for zmirror.
> Stefan Parvu
> sparvu at kronometrix.org
> > On 22 Feb 2019, at 17.23, Karl Denninger <karl at denninger.net> wrote:
> > On 2/22/2019 09:07, Stefan Parvu wrote:
> >> Hi,
> >> Just curious, would ZFS work on a RBPI3B+ board with 1 GB RAM only
> >> using FreeBSD 12 STABLE ? the hardware is 64bit but would it boot on
> >> 1 GB RAM for its own ARC internal operations ?
> >> Thanks,
> >> Stefan Parvu
> >> sparvu at kronometrix.org
> > Are you talking about attempting to mount root off a ZFS filesystem on
> > the SD card or booting it as usual and then loading zfs once running
> > (e.g. to talk to a USB-attached disk)?
> > I think you'll find that while it might run it's a very bad idea for a
> > whole host of reasons; what purpose do you have in doing this?
> > --
> > Karl Denninger
> > karl at denninger.net <mailto:karl at denninger.net>
> > /The Market Ticker/
> > /[S/MIME encrypted email preferred]/
> freebsd-arm at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
More information about the freebsd-arm