<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Yet Another SysAdmin Website - QEMU</title><link>/tags/qemu/</link><description>Recent content in QEMU on Yet Another SysAdmin Website</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>2026-05-29</lastBuildDate><atom:link href="/tags/qemu/index.xml" rel="self" type="application/rss+xml"/><item><title>Installing FreeBSD 15 on any VPS</title><link>/blog/2026/05/29/installing-freebsd-15-on-any-vps/</link><pubDate>2026-05-29</pubDate><guid>/blog/2026/05/29/installing-freebsd-15-on-any-vps/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Not many Virtual Private Server (VPS) providers consider FreeBSD a first-class
citizen, and few encourage you to encrypt your hard drive from inside the VPS.&lt;/p&gt;
&lt;p&gt;Though encrypting a VPS hard drive does not protect against everything and
requires one to access the web KVM of the provider to type in a password on each
reboot, I still find it reassuring.&lt;/p&gt;
&lt;p&gt;You need a little know-how to be able to set up FreeBSD in a not so friendly
environment. There are several procedures to achieve this floating around the
Internet, but I found those either too complicated or out of date. This article
presents my preferred way to install a FreeBSD operating system on a provider
that does not officially support it, and it works even for other unsupported
operating systems.&lt;/p&gt;
&lt;h2 id="install-a-linux-system-to-inspect-the-pre-provisioned-vps"&gt;Install a Linux system to inspect the pre-provisioned VPS&lt;/h2&gt;
&lt;p&gt;Depending on your provider, you will want to prepare either a BIOS boot image
(for example at OVH) or a UEFI boot image (for example on Azure or on Oracle
Cloud). One way to find out which one is to install any Linux image supported by
your provider and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dmesg &lt;span class="p"&gt;|&lt;/span&gt; grep -i &lt;span class="s2"&gt;&amp;#34;efi:&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you see lines like the following, then you need to prepare a UEFI boot image.
Otherwise, prepare a BIOS boot image:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt; 0.000000&lt;span class="o"&gt;]&lt;/span&gt; efi: EFI v2.7 by EDK II
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt; 0.000000&lt;span class="o"&gt;]&lt;/span&gt; efi: &lt;span class="nv"&gt;SMBIOS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0xbbea9000 &lt;span class="nv"&gt;ACPI&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0xbbf9c000 ACPI 2.0&lt;span class="o"&gt;=&lt;/span&gt;0xbbf9c014 &lt;span class="nv"&gt;MEMATTR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0xba639518 &lt;span class="nv"&gt;MOKvar&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0xbbe97000
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="bootstrap-the-freebsd-installer-on-a-local-virtual-machine"&gt;Bootstrap the FreeBSD installer on a local virtual machine&lt;/h2&gt;
&lt;p&gt;Create the RAW hard drive image for your virtual machine. Using the minimal
necessary size will speed up the later image transfer. At the time of this
writing, FreeBSD bootstraps fine on 1.6G of storage:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qemu-img create -f raw freebsd.raw 1600M
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Download the installer image from &lt;a href="https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/15.0/FreeBSD-15.0-RELEASE-amd64-bootonly.iso"&gt;an official
mirror&lt;/a&gt;
then start up the installer in the virtual machine.&lt;/p&gt;
&lt;p&gt;I start a BIOS booted virtual machine with something like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qemu-system-x86_64 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -drive &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;none,id&lt;span class="o"&gt;=&lt;/span&gt;disk,file&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;/freebsd.raw,format&lt;span class="o"&gt;=&lt;/span&gt;raw,cache&lt;span class="o"&gt;=&lt;/span&gt;writeback &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -cdrom &lt;span class="nv"&gt;$HOME&lt;/span&gt;/Downloads/FreeBSD-15.0-RELEASE-amd64-bootonly.iso &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -boot d -machine &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;q35,accel&lt;span class="o"&gt;=&lt;/span&gt;kvm &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -cpu host -smp &lt;span class="m"&gt;2&lt;/span&gt; -m &lt;span class="m"&gt;4096&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -nic user,model&lt;span class="o"&gt;=&lt;/span&gt;virtio-net-pci,hostfwd&lt;span class="o"&gt;=&lt;/span&gt;tcp::10022-:22 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -device virtio-blk-pci,drive&lt;span class="o"&gt;=&lt;/span&gt;disk &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -device virtio-serial-pci &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -device virtserialport,chardev&lt;span class="o"&gt;=&lt;/span&gt;spicechannel0,name&lt;span class="o"&gt;=&lt;/span&gt;com.redhat.spice.0 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -vga qxl -spice &lt;span class="nv"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5902,addr&lt;span class="o"&gt;=&lt;/span&gt;127.0.0.1,disable-ticketing&lt;span class="o"&gt;=&lt;/span&gt;on &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -chardev spicevmc,id&lt;span class="o"&gt;=&lt;/span&gt;spicechannel0,name&lt;span class="o"&gt;=&lt;/span&gt;vdagent
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To boot in UEFI mode instead, add the following line somewhere in the middle.
You might need to install another package and customize the path on your system,
this one is for Gentoo:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -bios /usr/share/edk2/OvmfX64/OVMF_CODE.fd &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you are short on memory, tune down the &lt;code&gt;-m 4096&lt;/code&gt; flag that configures the
amount allocated to the virtual machine.&lt;/p&gt;
&lt;p&gt;This virtual machine starts up with a SPICE display device, which I like better
than VNC, and can be accessed with a SPICE client like &lt;code&gt;spicy&lt;/code&gt;. If you would
rather use VNC instead, replace the lines mentioning SPICE with the following
to start a VNC server on port 5900:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -display vnc 127.0.0.1:0 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -vga none -device virtio-vga,edid&lt;span class="o"&gt;=&lt;/span&gt;on,xres&lt;span class="o"&gt;=&lt;/span&gt;2560,yres&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1440&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="install-freebsd"&gt;Install FreeBSD&lt;/h2&gt;
&lt;p&gt;Proceed to install FreeBSD as you normally would. I personally switched to
&lt;code&gt;pkgbase&lt;/code&gt; instead of the venerable distribution sets and am very happy with this
choice. For simple host setups like this with only one drive, I use the auto ZFS
partitioning mode. Make sure to choose the correct &lt;code&gt;Partitioning Scheme&lt;/code&gt; and to
encrypt your disks if you wish to. I also disable swap at this point.&lt;/p&gt;
&lt;p&gt;To type in passwords, either for disk encryption or for the root and user
accounts, the SPICE or VNC GUI can be unwieldy. When it is time for a password
prompt, I like to use &lt;code&gt;xdotool&lt;/code&gt; to simulate the keyboard inputs, bypassing the
fact that copy/paste is not functional:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;read&lt;/span&gt; -rs pass
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sleep 2&lt;span class="p"&gt;;&lt;/span&gt; xdotool &lt;span class="nb"&gt;type&lt;/span&gt; -- &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$pass&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;unset&lt;/span&gt; pass
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After pressing Enter to execute this command, I have two seconds to switch to
the SPICE or VNC window before the password is typed for me.&lt;/p&gt;
&lt;p&gt;Once the installation is complete, shut down the virtual machine.&lt;/p&gt;
&lt;h2 id="prepare-the-network-configuration"&gt;Prepare the network configuration&lt;/h2&gt;
&lt;p&gt;Restart the virtual machine on the newly installed system by setting the boot
device to &lt;code&gt;c&lt;/code&gt; and removing the ISO image flags. Make sure to keep the UEFI
setting if you need it!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qemu-system-x86_64 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -drive &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;none,id&lt;span class="o"&gt;=&lt;/span&gt;disk,file&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;/freebsd.raw,format&lt;span class="o"&gt;=&lt;/span&gt;raw,cache&lt;span class="o"&gt;=&lt;/span&gt;writeback &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -boot c -machine &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;q35,accel&lt;span class="o"&gt;=&lt;/span&gt;kvm &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -cpu host -smp &lt;span class="m"&gt;2&lt;/span&gt; -m &lt;span class="m"&gt;4096&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -nic user,model&lt;span class="o"&gt;=&lt;/span&gt;virtio-net-pci,hostfwd&lt;span class="o"&gt;=&lt;/span&gt;tcp::10022-:22 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -device virtio-blk-pci,drive&lt;span class="o"&gt;=&lt;/span&gt;disk &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -device virtio-serial-pci &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -device virtserialport,chardev&lt;span class="o"&gt;=&lt;/span&gt;spicechannel0,name&lt;span class="o"&gt;=&lt;/span&gt;com.redhat.spice.0 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -vga qxl -spice &lt;span class="nv"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5902,addr&lt;span class="o"&gt;=&lt;/span&gt;127.0.0.1,disable-ticketing&lt;span class="o"&gt;=&lt;/span&gt;on &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -chardev spicevmc,id&lt;span class="o"&gt;=&lt;/span&gt;spicechannel0,name&lt;span class="o"&gt;=&lt;/span&gt;vdagent
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Log in as root, then edit your &lt;code&gt;/etc/rc.conf&lt;/code&gt;. You likely used DHCP for the
installation, but for most providers this needs to be customized for FreeBSD (in
particular if you want IPv6). I found that there are no general rules here: the
best indicator is to install a Linux system supported by your VPS provider and
inspect the pre-provisioned configuration.&lt;/p&gt;
&lt;p&gt;For example on an OVH VPS, I set everything statically in a
&lt;code&gt;/etc/start_if.vtnet0&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ifconfig vtnet0 inet 37.187.244.19/32
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;route -4 add 37.187.244.1/32 -interface vtnet0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;route -4 add default 37.187.244.1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ifconfig vtnet0 inet6 2001:41d0:401:3100::fd5/64
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;route -6 add default 2001:41d0:401:3100::1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But on Oracle Cloud Infrastructure, I use something like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ifconfig vtnet0 inet 10.0.0.62/24
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;route -4 add default 10.0.0.1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ifconfig vtnet0 inet6 2603:c022:c002:8500:e2a4:f02e:43b0:c1d8/64 accept_rtadv
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You will have to figure out what you need based on the provider you chose.&lt;/p&gt;
&lt;h2 id="boot-the-vps-in-rescue-mode-and-transfer-the-disk-image"&gt;Boot the VPS in rescue mode and transfer the disk image&lt;/h2&gt;
&lt;p&gt;Most VPS providers offer a rescue mode that will boot your server on a Linux
image with diagnostic tooling. If yours does not offer that capability, maybe
you can do something similar by creating a second Linux server and attaching the
boot disk of the first one to it (that&amp;rsquo;s what I did to get my FreeBSD image to
Oracle Cloud).&lt;/p&gt;
&lt;p&gt;Whatever way you proceed, your first step is to identify what the &lt;code&gt;/dev&lt;/code&gt; path of
the target block device is with &lt;code&gt;blkid&lt;/code&gt; and &lt;code&gt;fdisk -l&lt;/code&gt;. I will use &lt;code&gt;/dev/sdb&lt;/code&gt; as
an example. Make sure your disk is not mounted anywhere (rescue modes love to do
that).&lt;/p&gt;
&lt;p&gt;Once ready, completely erase your disk with &lt;code&gt;blkdiscard /dev/sdb&lt;/code&gt;. If
&lt;code&gt;blkdiscard&lt;/code&gt; is unsupported for some reason, you can skip it. Then copy over
your raw image. I usually copy it in place with a command like the following
(replace &lt;code&gt;myth.adyxax.org&lt;/code&gt; with your actual server address):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dd &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="s2"&gt;/freebsd.raw&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; ssh root@myth.adyxax.org dd &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/sdb
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="first-boot"&gt;First boot&lt;/h2&gt;
&lt;p&gt;Once the image has finished transferring, you should be able to disable rescue
mode (or shut down the temporary installation instance and reattach the boot
disk to your original instance if you went that route). Reboot your server to
enjoy your new FreeBSD system!&lt;/p&gt;
&lt;p&gt;If you chose full disk encryption, or if anything goes wrong and you need to
debug the boot process, then the web KVM of your provider will be your best
friend.&lt;/p&gt;
&lt;h2 id="resizing-the-root-disk"&gt;Resizing the root disk&lt;/h2&gt;
&lt;p&gt;I deliberately set up a very small virtual disk as to speed up transfer of the
resulting image. After booting into the new system, we will want to make use of
the full storage space allocated to the instance. When using FreeBSD with root
on ZFS, I first inspect the storage layout with these two commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# gpart show -p&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;gt; &lt;span class="m"&gt;40&lt;/span&gt; &lt;span class="m"&gt;41942960&lt;/span&gt; da0 GPT &lt;span class="o"&gt;(&lt;/span&gt;20G&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="m"&gt;40&lt;/span&gt; &lt;span class="m"&gt;1024&lt;/span&gt; da0p1 freebsd-boot &lt;span class="o"&gt;(&lt;/span&gt;512K&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="m"&gt;1064&lt;/span&gt; &lt;span class="m"&gt;984&lt;/span&gt; - free - &lt;span class="o"&gt;(&lt;/span&gt;492K&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="m"&gt;2048&lt;/span&gt; &lt;span class="m"&gt;41940952&lt;/span&gt; da0p2 freebsd-zfs &lt;span class="o"&gt;(&lt;/span&gt;20G&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# zpool status -P&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; pool: zroot
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; state: ONLINE
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;config:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; NAME STATE READ WRITE CKSUM
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zroot ONLINE &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; /dev/da0p2.eli ONLINE &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I then do the resizing with something like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpart recover da0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpart resize -i &lt;span class="m"&gt;2&lt;/span&gt; da0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;geli resize /dev/da0p2
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;zpool online -e zroot /dev/da0p2.eli
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This method has served me well for years, and I am glad I finally took the time
to write the FreeBSD version of these instructions for future reference.&lt;/p&gt;</description></item></channel></rss>