Moving root on ZFS on GELI so GELI is no longer used

Johan Hendriks joh.hendriks at gmail.com
Sun Dec 29 20:33:09 UTC 2019


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.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


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 
code.

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.



regards
Johan



More information about the freebsd-questions mailing list