From nobody Mon Aug 15 18:47:36 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M63Dm5SRzz4YXfx; Mon, 15 Aug 2022 18:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M63Dm51gHz47X3; Mon, 15 Aug 2022 18:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660589256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3pILWOJK56Tm+iULldNhJpMICXVbYhRRSbwy22js3lA=; b=FMuNs7Q9frzJO2XDMCLn8Fxv3paDNBd+NjJMpAkK9cFA+ucWJenl3VtYyNasTuHoDbeh1w F7SoGiRBKxF5YQ5TEvA7BJit6cWG81Ec/U7KMIZ9vESA0owqiWMkBsbjJ9gA/PRZ1WvgA9 OCLBils0jQX05C2Bv4mn67Lte+esgjl/q8XyftvtzykaypB8vz60XdeNIoBPdYOm+W1rYW 3RRXTpSX8oCTE/HXstTj7VK2v3qmaLq5MRPtOYjya0RB6jq1Wr5NPH2uYI+GoB4Hx46lUy uMo55sXVoYZuSc//aOFzrkAEH5DpXLKIn0xflV4fewNR/AmLh4pGyaUKL1MKAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M63Dm42JszgBF; Mon, 15 Aug 2022 18:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27FIlaYm027219; Mon, 15 Aug 2022 18:47:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27FIlavq027218; Mon, 15 Aug 2022 18:47:36 GMT (envelope-from git) Date: Mon, 15 Aug 2022 18:47:36 GMT Message-Id: <202208151847.27FIlavq027218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 26a241a0e2fe - main - stand: Update GELI UFS cases to use ufs labels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26a241a0e2fea980e7506a610b774add9ac07aae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660589256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3pILWOJK56Tm+iULldNhJpMICXVbYhRRSbwy22js3lA=; b=mCzwm42XJdEQZ04nmHQbArgHZMGAmMeewsEpqZbi+VsVBqinqGlGC54pL1fAyyFg2OPTJl hXb/wJ+QXxtRNy6yx3v6l9Vc7tanQPZJnrA1IiYH9Yf6+NIYFGFEjld73r43Glfu+WTNdI UFQmjTzy9nkAN3zoh6kHPt92N5BD7PynMDvk8qvp5C9O6DoEJk9533jHM5HWzohRJCYDoG gzjuQw1PUEGgBW+I4TA/NZxK3rsbTlDSp6AaEPjwMEn31le13/vDcYgHRT4O+sd5RLzSxX TrBj3JWLn3J+x48MXiuSEe9vFN3gqrir0SkrH2ZulSIDkmPsbYC4kzqW4rYhKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660589256; a=rsa-sha256; cv=none; b=IRxGQpPuIbUW3YaTg4wrlRwHXJM/Xg8KS08YkzSH18hV/wLu03U/eebFzcon++LR+67A2Y leRqNXWqHd8vOBOeYuGcKWkc6BLW3WJtqBz6sSphFKoc8NIC1QkGn1uxmqmLsTYhHc7Y0q 2marhrRO3fWUwg2ZeyYwZMTLRO1xLYx9sM0gg6xn9Kub15q0OK41z3mnN3kscX6TOJyROx E70NTWGbnnILgExeFjg70ILOnNq1cW0pmtNSKJAIap9Jf56GM3NM94egzmPETPdJ8Hbr4V 1fMpEOGC9kzrwrbzNxnzb+t0kTcRa9YFanyKXUmLJZvqk0EvDO46YIpSJJ+4IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=26a241a0e2fea980e7506a610b774add9ac07aae commit 26a241a0e2fea980e7506a610b774add9ac07aae Author: Warner Losh AuthorDate: 2022-08-15 18:20:50 +0000 Commit: Warner Losh CommitDate: 2022-08-15 18:38:32 +0000 stand: Update GELI UFS cases to use ufs labels GELI images are created in a different manner than non-GELI images. Update them to set the label of 'root' on the UFS partition and use that in fstab. Drop comments about needing to do this, as well as the 'dev' variable now that it's unused. Sponsored by: Netflix --- tools/boot/rootgen.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tools/boot/rootgen.sh b/tools/boot/rootgen.sh index 3146b06216a2..bcf0aa92419f 100755 --- a/tools/boot/rootgen.sh +++ b/tools/boot/rootgen.sh @@ -7,13 +7,12 @@ iterations=50000 # The smallest FAT32 filesystem is 33292 KB espsize=33292 -dev=vtbd0 # # Builds all the bat-shit crazy combinations we support booting from, # at least for amd64. It assume you have a ~sane kernel in /boot/kernel # and copies that into the ~150MB root images we create (we create the du -# size of the kernel + 20MB +# size of the kernel + 20MB). # # Sad panda sez: this runs as root, but could be any user if someone # creates userland geli. @@ -21,9 +20,6 @@ dev=vtbd0 # This assumes an external program install-boot.sh which will install # the appropriate boot files in the appropriate locations. # -# These images assume ${dev} will be the root image. We should likely -# use labels, but we don't for all cases just yet (see GELI cases) -# # Assumes you've already rebuilt... maybe bad? Also maybe bad: the env # vars should likely be conditionally set to allow better automation. # @@ -386,7 +382,7 @@ mk_geli_gpt_ufs_legacy() { # install-boot will make this bootable echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p2 echo ${passphrase} | geli attach -j - ${md}p2 - newfs /dev/${md}p2.eli + newfs -L root /dev/${md}p2.eli mount /dev/${md}p2.eli ${mntpt} cpsys ${src} ${mntpt} # need to make a couple of tweaks @@ -394,7 +390,7 @@ mk_geli_gpt_ufs_legacy() { geom_eli_load=YES EOF cat > ${mntpt}/etc/fstab < ${mntpt}/etc/fstab < ${mntpt}/etc/fstab <