ZFSBOOT(8)
π ZFSBOOT(8) β the manual page, bestie edition β¨
okay so real talk β this is zfsboot from the System Manager's Manual, and we're gonna get you comfy with it. no gatekeeping, no cap. let's go π«Ά
β¨ NAME β¨
zfsboot β bootcode for ZFS on BIOS-based computers
like, it's the little guy that wakes up first and goes "bestie, your pool is right here" π
πΈ DESCRIPTION πΈ
zfsboot is what BIOS-based computers use to boot from a filesystem inside a ZFS pool. that's the whole vibe. no UEFI situations here, we're old school β¨
here's the part you gotta know: zfsboot gets installed in two parts on a disk or a partition that a ZFS pool uses.
- part one β a single-sector starter boot block, installed at the very beginning of the disk or partition. main character energy, first to arrive π
- part two β a main boot block, installed at a special offset within the disk or partition. the one that actually does the work, lowkey π
both of those areas are reserved by the ZFS on-disk specification for boot use β so don't go putting your own stuff there, that's literally their spot π
and hmm, one more thing: if you install zfsboot in a partition, then that partition should be made bootable using the appropriate configuration and boot blocks described in boot(8). iykyk π₯
π¦ BOOTING π¦
the zfsboot boot process is very similar to that of gptzfsboot(8). siblings fr fr π
but β one significant difference, and it's kind of a big one: zfsboot does not currently support the GPT partitioning scheme. π
so what does it probe for ZFS disk labels? only:
- whole disks, and
- MBR partitions (traditionally referred to as slices)
that's it. that's the list.
and also β check the BUGS section in gptzfsboot(8) for some limitations of the MBR scheme support. there are caveats, bestie, go read 'em π
π USAGE π
zfsboot supports all the same prompt and configuration file arguments as gptzfsboot(8). literally all of them. same energy, different partitioning situation π
β FILES β
/boot/zfsbootβ boot code binary/boot.configβ parameters for the boot block (optional)/boot/configβ alternative parameters for the boot block (optional)
π₯ EXAMPLES π₯
zfsboot is typically installed using dd(1). classic. iconic. a little unhinged but we move π
to install zfsboot on the ada0 drive:
dd if=/boot/zfsboot of=/dev/ada0 count=1
dd if=/boot/zfsboot of=/dev/ada0 iseek=1 oseek=1024
two commands, one starter block, one main block at that offset. slay β¨
β οΈ important warning bestie: if the drive is currently in use, the GEOM safety will prevent writes, and you must disable it before running the above commands: sysctl kern.geom.debugflags=0x10 yeah. it's that one. you've been warned π«Ά
zfsboot can also be installed in an MBR slice:
gpart create -s mbr ada0
gpart add -t freebsd ada0
gpart bootcode -b /boot/boot0 ada0
gpart set -a active -i 1 ada0
dd if=/dev/zero of=/dev/ada0s1 count=2
dd if=/boot/zfsboot of=/dev/ada0s1 count=1
dd if=/boot/zfsboot of=/dev/ada0s1 iseek=1 oseek=1024
one big beautiful block of commands. copy it exactly, don't get creative π
π note: commands to create and populate a pool are not shown in the example above. this is just the bootcode part. you gotta handle the pool yourself, bestie, that's a whole other manpage π§
π SEE ALSO π
dd(1), boot.config(5), boot(8), gptzfsboot(8), loader(8), zpool(8)
go read them. all of them. i'll wait π
π HISTORY π
zfsboot appeared in FreeBSD 7.3. vintage. retro. ate and left no crumbs π
π AUTHORS π
This manual page was written by Andriy Gapon <avg@FreeBSD.org>. ty for your service legend π«‘π
π BUGS π
Installingzfsbootwithdd(1)is a hack.
i said what i said. ZFS needs a command to properly install zfsboot onto a ZFS-controlled disk or partition. until then we're all out here with dd and vibes π
<div align="center">
β and that's the whole page bestie β
this one came from Debian, dated March 27, 2018, and the section's called ZFSBOOT(8) β it's giving classic manpage but make it cute π
stay slay, boot safe, and always iseek=1 πβ¨π¦
</div>
π¦ where this page comes from
- freebsd 14.5: base 14.5
- Copyright (c) 2014 Andriy Gapon <avg@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms