From owner-freebsd-questions@freebsd.org Wed Dec 30 06:56:48 2020 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 C74064B8D9F for ; Wed, 30 Dec 2020 06:56:48 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5MXH60rRz4jVL for ; Wed, 30 Dec 2020 06:56:47 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=9X68sb5fpQoplTVR8nArmzcr+rZ3iq7vwp5OB7hQFBY=; b=iqOb+KrECtkOfRp/VGa0dLvREZ 70PGpESCK/b2yqGWoUSHx6cChZzfUBjYs+nO2al2qJqWD69vBeFcZPsrVctPMgGc5c0xEtR0X4AYl Qur+ujrkJJoslZoka6fD26Rs8THZzINlWn565TNlBprmyEjg4R5DJRYTFXx9zAvZF2UQ=; Received: from vas by admin.sibptus.ru with local (Exim 4.94 (FreeBSD)) (envelope-from ) id 1kuVPW-000L3Z-LQ; Wed, 30 Dec 2020 13:56:42 +0700 Date: Wed, 30 Dec 2020 13:56:42 +0700 From: Victor Sudakov To: Dave Hayes Cc: Rick Miller , Graham Perrin , FreeBSD Questions Subject: Re: EFI, UEFI, PXE: FreeBSD-12.1-RELEASE-amd64-bootonly.iso boot from SAN device failed, error 0x7f22208e Message-ID: <20201230065642.GA79433@admin.sibptus.ru> References: <20201225084305.GA60871@admin.sibptus.ru> <20201228152202.4ba4fec9@bigus.dream-tech.com> <20201229022714.GA95031@admin.sibptus.ru> <20201228191306.3edcdab1@bigus.dream-tech.com> <20201229034211.GA98610@admin.sibptus.ru> <20201228225756.30870717@bigus.dream-tech.com> <20201229074017.GA9211@admin.sibptus.ru> <20201229142737.3b2b3692@bigus.dream-tech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <20201229142737.3b2b3692@bigus.dream-tech.com> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 4D5MXH60rRz4jVL X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=iqOb+KrE; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-6.09 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:19f0:5001:21dc::10:from]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; SPAMHAUS_ZRD(0.00)[2001:19f0:5001:21dc::10:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; NEURAL_HAM_SHORT(-0.99)[-0.987]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; MAILMAN_DEST(0.00)[freebsd-questions]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 06:56:48 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dave Hayes wrote: [dd] >=20 > > Therefore my cheat sheet for making a UEFI bootable freebsd UFS volume = is > > like this: > >=20 > > gpart create -s gpt ada1 # will become ada0 > > gpart add -s200M -t efi ada1 > > gpart add -s2G -t freebsd-swap ada1 > > gpart add -t freebsd-ufs ada1 > > gpart bootcode -p /boot/boot1.efifat -i 1 ada1 =20 > >=20 > > Instead of "gpart bootcode -p /boot/boot1.efifat -i 1 ada1" we can just > > as well run=20 > > "newfs_msdos /dev/ada1p1 ; mount_msdosfs /dev/ada1p1 /mnt ; rsync -r ..= =2E /mnt" >=20 > Of course my 'cheat sheet', being /usr/src/release/amd64/mkisoimages.sh > is probably amd specific, and I don't ever put boot code on a hard disk t= hese > days unless I have to. Nevertheless, I seem to be using /boot/pmbr as the You don't need /boot/pmbr nor any other MBR for UEFI booting. The UEFI BIOS does not care what's in the MBR, all it needs is a GPT with an efi partition. But maybe it's safe to have a pmbr after all, in case you attach your disk somewhere else, where a stupid "Disk Doctor" can be surprised by the absence of an MBR. > actual boot code and I have the GPT image being created with mkimg(1) whi= ch > gets dropped into the iso by dd(1).=20 Oh, I did not even know about mkimg(1). When I needed a disk image, I would mount a file via mdconfig. Thank you for this information, because mkimg seems to know many image formats (vhd, vmdk...), not only raw. Can be useful. >=20 > UEFI appears to be sensitive to large sizes of mfsroots. I had to make > EFI_STAGING_SIZE 300 and NKPT 220 to get this to all work properly. How and where do you adjust EFI_STAGING_SIZE and NKPT when building an mfsr= oot? --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJf7CSqAAoJEA2k8lmbXsY0oy0H/iw7qZdfQnBJPdiU8fgl/SV0 Kekx6Y2/gCki73mT2nmvR1wWCfXpOoyhez4xEK9xyIkUiIGiz7p4+cvQ2ibUCEuC XXffjj+7SMczVRrEUJHIRvgj2iFL5HDfWq4Yr6ZlLKqtizEkLGprt2QfBXru4jZd 4G4nXlvII4ODLXAlPFA54KzFurhLo08nsjZVwpNR8BCAlpEYUhjb6bQA/+7hruPj VLBF2JjYAajAp9htSJ37t0R99vo+mNveNKl9vxY4jUKG7oLrI80/gXs/13lpoQHN gOTo5e//iLxJ3+d5RZpZ0Ibnm9dujQahJAzI25FPjgdX/1KdCdex8cq3bMv+UYI= =AQ7e -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--