From owner-freebsd-hackers@freebsd.org Wed Oct 18 12:28:03 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5D42E37992 for ; Wed, 18 Oct 2017 12:28:03 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7442B7749C for ; Wed, 18 Oct 2017 12:28:03 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback6j.mail.yandex.net (mxback6j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10f]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 7A3AC7816A9; Wed, 18 Oct 2017 15:27:59 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback6j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id cIjQP6wBh5-RwKac8Gl; Wed, 18 Oct 2017 15:27:59 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1508329679; bh=iHdqJHlkjJrMbqZ5xcO40xhuJlfaiddR2+4b8Tpheag=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=gSqbFdiShJLKkfz136oNdea4aZ+lkAoPZGSzFg96rD7uYG+IiHV/7s6fdp/2vQuiu XXj5S6y/fZuAqWer8vUzSE3dHaaJOVJvT/rrtC9C78iOzIio1iyN4Sbxq+a4W/AxvR KIWPjOiqlPCYxJgalcq05rUpmVbS3cjITleaqRd4= Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 7HN4En5CUF-RwOONB8m; Wed, 18 Oct 2017 15:27:58 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1508329678; bh=iHdqJHlkjJrMbqZ5xcO40xhuJlfaiddR2+4b8Tpheag=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=hS4QRWZgjw+McWVCFLLPIBjSLDGSOOrpvLvtkf3pY4GCNk2nPxYkbxj5LHzsKGbzB HbQPAbwosC0Bu8CyQaplhuXRaCPTQXlxF4tPDn19cZkoPpzSiDpBZGGypkkPV5TbpT m6uZutFqonrgVjnVR+mQkH26Yq57JcQYcbwOJwN0= Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: apart difficulties To: Christopher Bowman , freebsd-hackers@freebsd.org References: From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: Date: Wed, 18 Oct 2017 15:27:22 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2017 12:28:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM Content-Type: multipart/mixed; boundary="9rWNv7U9GfaFVfaOI2BHnEv4w5NxFbmuH"; protected-headers="v1" From: "Andrey V. Elsukov" To: Christopher Bowman , freebsd-hackers@freebsd.org Message-ID: Subject: Re: apart difficulties References: In-Reply-To: --9rWNv7U9GfaFVfaOI2BHnEv4w5NxFbmuH Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 17.10.2017 07:13, Christopher Bowman wrote: > I have a home server with a fairly large amount of zfs disk space where= I keep all of my persistent data. As a result when new releases of Free= BSD come out I tend backup the root images of my machines to the zfs pool= and, starting with the least important box, I blow away all the local pa= rtitions and reinstall from scratch. Then I mount the server zfspool and= restore config files and packages. As a result my machines stay pretty = up to date and clean. Lately rather than burning DVDs I=E2=80=99ve decid= ed that I will create a usb boot disks containing the entire DVD contents= and simply go down the line and and install on one machine after the oth= er. My machine can now all boot off USB but don=E2=80=99t all have DVD d= rives. >=20 > I have the following script below which I was using to try configure an= MBR bootable memory stick. The commented out lines are a reminder to my= self of how to copy over the ISO contents to the slice I create (I only d= o this when there is a new release so I forget.) >=20 > gpart create -s MBR da0 > gpart add -i 1 -t freebsd da0 > gpart set -a active -i 1 da0 > gpart bootcode -b /boot/mbr da0 > gpart create -s BSD -n 8 da0s1 > gpart add -t freebsd-ufs -i 1 da0s1 > gpart bootcode -p /boot/boot -i 1 da0s1 BSD label uses embedded into partition table bootcode. You need to use "-b /boot/boot" argument to install it. What is going in your case: BSD label metadata was stored in first sector of da0s1 and GEOM object of PART_BSD class was created. Then you added partitions, that starts from zero offset, i.e. it contains BSD label metadata. Then /boot/boot content was written into da0s1a, and it has overridden BSD label. But since da0s1a is separate GEOM provider, the spoiling did not worked for da0s1. --=20 WBR, Andrey V. Elsukov --9rWNv7U9GfaFVfaOI2BHnEv4w5NxFbmuH-- --PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlnnSKoACgkQAcXqBBDI oXo9SQgAkTIZE5IJRBaKz2KhKTGvi7CuuZvOfNvowc0E9KHF57+CVL9za3Y23kYj ftC0qFgCu/IOsdUaYosDwS5ZyZXpPMapeXq41uJjpoFGI3KUUzpVG5VfcenSMpeJ 55ITq1TOpbZbGusQI6jEbjIRgz+W9QzQ0ABFig7Yy7vgjo6ooafSjR9uqXoIOYX+ OukUnEFca0fkjMVHTVsgOzvLBt+JAGevL+7NjaQzvHOTjsb5AYpCBUkh+sFXGVJe Hlgwd2NjsmbJ5URn3fOdUtAaoAO469R4JZdoIsgLH5Ib4DnJrbZtWB6SZRARc01u n8Srmp5WdQh08YVqXvvZYuWUbm6e3w== =KZJV -----END PGP SIGNATURE----- --PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM--