From owner-freebsd-questions@freebsd.org Sun Dec 29 20:33:09 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 383191E8C5A for ; Sun, 29 Dec 2019 20:33:09 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47mC1c0BKCz44W8 for ; Sun, 29 Dec 2019 20:33:07 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: by mail-wr1-x435.google.com with SMTP id z7so31016335wrl.13 for ; Sun, 29 Dec 2019 12:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=5dwLzjZMNvYkTirnas6ZUWOh6h/h4P+DeI/MZ+pthUo=; b=R4AMegREK8KrRIJgiHvGVpSyhFePhYMgNlApEhzj9I7JvEd6i3Xf3qtPEmGE6BZyrn AviLXC2rQuX3Ag4HKAPyN0tEKfrKJBDBD6cmza9Irr+z+mhQWDYus3XHEo0WPQEeOJs/ 8LZwYZGJtAxXPwyodTl/DHaZ3L9fw+Swh/OsircxqF1O0JWeXLl5F4RqZvfjrJWmMFi8 35O+A1i5dmdqGJGO4Wgc7eLP0EvYcENbzo4Sv4b59NtoDWDkiUa+bFCcXYOoCawsS8Zr Ebe3rDv65x55URQwgRPkIEguBK0wtk66ldovUPS+uiHZ3ARdsd8buRQglVpjDbCjGAB9 DnMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=5dwLzjZMNvYkTirnas6ZUWOh6h/h4P+DeI/MZ+pthUo=; b=luhQVXWx/+x2pAgFn+PWR97o6x+5VDEJjFcV8bHEEVf9LrM2Ce3xocS0e7Txi6067g am6Oo46W9lo0Qa3YwsmTcBWKSLHm50t2+nuxNMbe5uvlk6mr8nuPrZKOMFtVYgMK3Ets //5tslZC3sQpUwP63aYRnyQI1grREiwmmHnwfyfpcyupe+CTK2I2islD/0mJkbPvVecf dX5rj+DK44WB+uSuaNCGxlyq0sFVBI7nwvMAXNT/WRCQp78rk2FU8QcQ0D+Bb9ZaLk2A +S+3bvsGKmAvrh3+cVNxDypa1NkZdz/5W0YSPpPUV1oLfIJiIE5JbuO8dXQUhOJRMgRX GFqA== X-Gm-Message-State: APjAAAWK3X+stz39k+AGTov76HcKuSYXaNEk8zKpb1lv+A05wr3y6i17 mGO3hHKhmckhx0TkUpC09FT1KBib X-Google-Smtp-Source: APXvYqwY/m7zxYeXRDas2Am29ngWjQ/ZEBepYcKMJW/UoNMmT4yCJOsQEfYlM148GMFXMaCIZBWJVA== X-Received: by 2002:adf:db41:: with SMTP id f1mr64529380wrj.392.1577651585892; Sun, 29 Dec 2019 12:33:05 -0800 (PST) Received: from MBP-van-Johan.lan (85-147-130-226.cable.dynamic.v4.ziggo.nl. [85.147.130.226]) by smtp.gmail.com with ESMTPSA id t25sm18357101wmj.19.2019.12.29.12.33.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Dec 2019 12:33:05 -0800 (PST) Subject: Re: Moving root on ZFS on GELI so GELI is no longer used To: freebsd-questions@freebsd.org References: <20191204223149.A880630600A8@mailuser.nyi.internal> <20191229173722.EB89680060@mailuser.nyi.internal> From: Johan Hendriks Message-ID: Date: Sun, 29 Dec 2019 21:32:52 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20191229173722.EB89680060@mailuser.nyi.internal> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: nl X-Rspamd-Queue-Id: 47mC1c0BKCz44W8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=R4AMegRE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of johhendriks@gmail.com designates 2a00:1450:4864:20::435 as permitted sender) smtp.mailfrom=johhendriks@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.46), ipnet: 2a00:1450::/32(-2.64), asn: 15169(-1.87), country: US(-0.05)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[5.3.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org 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: Sun, 29 Dec 2019 20:33:09 -0000 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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@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