Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Dec 2019 21:32:52 +0100
From:      Johan Hendriks <>
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

Op 29-12-2019 om 18:37 schreef Kralj Karlo:
> 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.
> _______________________________________________
> mailing list
> To unsubscribe, send any mail to ""

I think he ment to create the same partition schema on the new disk and 
copy the boot code to the boot partition.
 I always use a GPT schema and 
never MBR, so i think it works for both schema's but i am not sure.

To copy the partition layout of your active disk you can use the backup 
and restore option from gpart.
# /sbin/gpart backup ada0 | /sbin/gpart restore -F ada1 ada2

To copy the bootcode you can do that with the following command.

If you use EFI use both commands, if you do not use EFI only the gpart 

In this example, the efifat file is copied to the second partition of 
disk ada1. The boot code to the first partition of disk ada1
# dd if=/boot/boot1.efifat of=/dev/ada1p2
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1

Replace ada1 with the device name of your new disk also change -i 1 if 
your bootcode is on another partition.


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