From owner-svn-src-head@freebsd.org Tue Sep 3 18:37:56 2019 Return-Path: Delivered-To: svn-src-head@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 05AD5D06F7; Tue, 3 Sep 2019 18:37:56 +0000 (UTC) (envelope-from mmacy@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46NG0g6QVCz42j0; Tue, 3 Sep 2019 18:37:55 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A709E72A5; Tue, 3 Sep 2019 18:37:55 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x83Ibt8x019838; Tue, 3 Sep 2019 18:37:55 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x83Ibtsn019837; Tue, 3 Sep 2019 18:37:55 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201909031837.x83Ibtsn019837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 3 Sep 2019 18:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351771 - in head: release/amd64 tools/boot X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: release/amd64 tools/boot X-SVN-Commit-Revision: 351771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2019 18:37:56 -0000 Author: mmacy Date: Tue Sep 3 18:37:55 2019 New Revision: 351771 URL: https://svnweb.freebsd.org/changeset/base/351771 Log: Use makefs -t msdos in make_esp_file With this last piece in place, make -C /usr/src/release release.iso is finally able to run in a jail. This was not possible before because msdosfs cannot be mounted inside a jail. Submitted by: ryan@ixsystems.com Reviewed by: emaste@, imp@, gjb@ MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D21385 Modified: head/release/amd64/mkisoimages.sh head/tools/boot/install-boot.sh Modified: head/release/amd64/mkisoimages.sh ============================================================================== --- head/release/amd64/mkisoimages.sh Tue Sep 3 18:35:55 2019 (r351770) +++ head/release/amd64/mkisoimages.sh Tue Sep 3 18:37:55 2019 (r351771) @@ -45,7 +45,7 @@ if [ "$1" = "-b" ]; then # This is highly x86-centric and will be used directly below. bootable="-o bootimage=i386;$BASEBITSDIR/boot/cdboot -o no-emul-boot" - # Make EFI system partition (should be done with makefs in the future) + # Make EFI system partition. # The ISO file is a special case, in that it only has a maximum of # 800 KB available for the boot code. So make an 800 KB ESP espfilename=$(mktemp /tmp/efiboot.XXXXXX) Modified: head/tools/boot/install-boot.sh ============================================================================== --- head/tools/boot/install-boot.sh Tue Sep 3 18:35:55 2019 (r351770) +++ head/tools/boot/install-boot.sh Tue Sep 3 18:37:55 2019 (r351771) @@ -43,7 +43,7 @@ get_uefi_bootname() { } make_esp_file() { - local file sizekb loader device mntpt fatbits efibootname + local file sizekb loader device stagedir fatbits efibootname file=$1 sizekb=$2 @@ -57,17 +57,17 @@ make_esp_file() { fatbits=12 fi - dd if=/dev/zero of="${file}" bs=1k count="${sizekb}" - device=$(mdconfig -a -t vnode -f "${file}") - newfs_msdos -F "${fatbits}" -c 1 -L EFISYS "/dev/${device}" > /dev/null 2>&1 - mntpt=$(mktemp -d /tmp/stand-test.XXXXXX) - mount -t msdosfs "/dev/${device}" "${mntpt}" - mkdir -p "${mntpt}/EFI/BOOT" + stagedir=$(mktemp -d /tmp/stand-test.XXXXXX) + mkdir -p "${stagedir}/EFI/BOOT" efibootname=$(get_uefi_bootname) - cp "${loader}" "${mntpt}/EFI/BOOT/${efibootname}.efi" - umount "${mntpt}" - rmdir "${mntpt}" - mdconfig -d -u "${device}" + cp "${loader}" "${stagedir}/EFI/BOOT/${efibootname}.efi" + makefs -t msdos \ + -o fat_type=${fatbits} \ + -o sectors_per_cluster=1 \ + -o volume_label=EFISYS \ + -s ${sizekb}k \ + "${file}" "${stagedir}" + rm -rf "${stagedir}" } make_esp_device() {