Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2019 00:33:51 +0100 (CET)
From:      =?UTF-8?Q?Trond_Endrest=C3=B8l?= <>
To:        Kralj Karlo <>
Cc:        FreeBSD Questions <>
Subject:   Re: Moving root on ZFS on GELI so GELI is no longer used
Message-ID:  <>
In-Reply-To: <20191229173722.EB89680060@mailuser.nyi.internal>
References:  <20191204223149.A880630600A8@mailuser.nyi.internal> <> <20191229173722.EB89680060@mailuser.nyi.internal>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, 29 Dec 2019 17:37-0000, Kralj Karlo wrote:

> Trond Endrestøl writes:
> > man zfs, searching for zfs snapshot, zfs send, and zfs receive.
> >
> > My take usually is:
> >
> > 1. Make sure boot partitions are present and populated on the new disk(s).
> >    The same for any swap partitions.
> Could you elaborate on this step or refer to relevant man pages?
> This is the step I don't know how to do.

Assuming da0 and da1 are your new disks, and you want these disks to 
be bootable on both legacy (BIOS) and UEFI systems, then I would do 
something like this:

# Create GPT on da0 and da1
gpart create -s gpt da0
gpart create -s gpt da1

# Create legacy boot partition and ESP for UEFI on da0
gpart add -a 4K -s 512K -t freebsd-boot -l gptboot0 da0
gpart add -a 4K -s 800K -t esp          -l esp0     da0

# Ditto for da1
gpart add -a 4K -s 512K -t freebsd-boot -l gptboot1 da1
gpart add -a 4K -s 800K -t esp          -l esp1     da1

# Write bootcode to da0
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot   -i 1 da0
gpart bootcode               -p /boot/boot1.efifat -i 2 da0

# Ditto for da1
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot   -i 1 da1
gpart bootcode               -p /boot/boot1.efifat -i 2 da1

Further, I probably would add a couple of swap partitions for swap, 
and another couple of swap partitions for dumps (though only one of 
them will actually be used), and a couple of ZFS partition for a 
mirrored root pool:

gpart add -a 4K -s 16G -t freebsd-swap -l swap0  da0
gpart add -a 4K -s 16G -t freebsd-swap -l swap1  da1

gpart add -a 4K -s 16G -t freebsd-swap -l dump0  da0
gpart add -a 4K -s 16G -t freebsd-swap -l dump1  da1

gpart add -a 4K        -t freebsd-zfs  -l zroot0 da0
gpart add -a 4K        -t freebsd-zfs  -l zroot1 da1

Consult gpart(8) for more information on the syntax.

For SSDs, you might want an alignment of 1M. And if you don't have or 
plan on using 4Kn drives, you can omit specifying alignment 

You could move the swap and dump partitions to a dedicated disk. I use 
such a setup for my VMs where conservation of physical disk space is 
something to consider.

Next, create your ZFS pools as you normally would.

In the case of 4Kn drives, you might want to do sysctl 
vfs.zfs.min_auto_ashift=12 before creating any new pools. Run the 
sysctl command after you have run kldload zfs, unless your kernel has 
internal/static support for ZFS.

I prefer to take advantage of the GPT labels. That way I can shuffle 
my disks around without any ill results. The gpart add commands above 
will lead to:



You can expand on the GPT labels, e.g. letting them include the 
hostname, if desired.

GPT labels are limited to 36 characters stored as UTF-16LE.

From  Mon Dec 30 04:57:43 2019
Return-Path: <>
Received: from ( [IPv6:2610:1c1:1:606c::19:1])
 by (Postfix) with ESMTP id 770D11D532B
 for <>;
 Mon, 30 Dec 2019 04:57:43 +0000 (UTC) (envelope-from
Received: from (
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by (Postfix) with ESMTPS id 47mQCp2bJcz4Yqy
 for <>; Mon, 30 Dec 2019 04:57:42 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;; 
 s=20181118; h=Message-ID:Subject:To:From:Date:In-Reply-To;
 bh=K1C0CqgFKfPC3M+PQc5heooleWeZrAmYgg0hpB8kYLA=; b=hSE5QFcQ+4NqyfxU/G1AIVS3Gf
Received: from vas by with local (Exim 4.92.3 (FreeBSD))
 (envelope-from <>) id 1iln7c-0005Uv-2U
 for; Mon, 30 Dec 2019 11:57:40 +0700
Date: Mon, 30 Dec 2019 11:57:40 +0700
From: Victor Sudakov <>
Subject: kernel: drmn0: This code is obsolete abandonware. Install the
 graphics/drm-legacy-kmod pkg
Message-ID: <>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3"
Content-Disposition: inline
X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9  3532 0DA4 F259 9B5E C634
X-Rspamd-Queue-Id: 47mQCp2bJcz4Yqy
X-Spamd-Bar: --------
 dkim=pass header.s=20181118 header.b=hSE5QFcQ;
 dmarc=pass (policy=none);
 spf=pass ( domain of designates
 2001:19f0:5001:21dc::10 as permitted sender)
X-Spamd-Result: default: False [-8.35 / 15.00]; ARC_NA(0.00)[];
 FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx];
 TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 IP_SCORE(-3.25)[ip: (-9.88), ipnet: 2001:19f0:5000::/38(-4.94), asn:
 20473(-1.38), country: US(-0.05)]; 
 SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[];
 MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[];
 ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US];
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: User questions <>
List-Unsubscribe: <>, 
List-Archive: <>;
List-Post: <>
List-Help: <>
List-Subscribe: <>, 
X-List-Received-Date: Mon, 30 Dec 2019 04:57:43 -0000

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Dear Colleagues,

On an "HP ProBook 6560b" notebook running FreeBSD 12.1, I've installed
graphics/drm-kmod and loaded it via
kld_list=3D"/boot/modules/radeonkms.ko" in rc.conf. The X server even works=

# pkg which "/boot/modules/radeonkms.ko"
/boot/modules/radeonkms.ko was installed by package drm-fbsd12.0-kmod-4.16.=

However, the kernel complains:

"kernel: drmn0: This code is obsolete abandonware. Install the graphics/drm=
-legacy-kmod pkg"

Is this some kind of bug? Why would graphics/drm-kmod be considered obsolet=

Victor Sudakov,  VAS4-RIPE, VAS47-RIPN

Content-Type: application/pgp-signature; name="signature.asc"




Want to link to this message? Use this URL: <>