From owner-freebsd-questions@freebsd.org Tue Dec 29 22:27:40 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 E0D484CC821 for ; Tue, 29 Dec 2020 22:27:40 +0000 (UTC) (envelope-from dave@jetcafe.org) Received: from fedex2.jetcafe.org (fedex2.jetcafe.org [205.147.26.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "fedex2.jetcafe.org", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D58Dq6G15z3kX5 for ; Tue, 29 Dec 2020 22:27:39 +0000 (UTC) (envelope-from dave@jetcafe.org) X-Envelope-To: freebsd-questions@freebsd.org Received: from bigus.dream-tech.com (bigus.jetcafe.org [205.147.26.7]) by fedex2.jetcafe.org (8.15.2/8.15.2) with ESMTPS id 0BTMRbVc016923 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Dec 2020 14:27:38 -0800 (PST) (envelope-from dave@jetcafe.org) Date: Tue, 29 Dec 2020 14:27:37 -0800 From: Dave Hayes To: Victor Sudakov 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: <20201229142737.3b2b3692@bigus.dream-tech.com> In-Reply-To: <20201229074017.GA9211@admin.sibptus.ru> References: <20201224134403.GB13527@admin.sibptus.ru> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1 ( out of 6) ALL_TRUSTED,SHORTCIRCUIT X-Spam-Checker-Version: SpamAssassin version 3.4.4-jetcafeglobal X-Scanned-By: MIMEDefang 2.83 X-Rspamd-Queue-Id: 4D58Dq6G15z3kX5 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of dave@jetcafe.org designates 205.147.26.23 as permitted sender) smtp.mailfrom=dave@jetcafe.org X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; 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.10)[text/plain]; DMARC_NA(0.00)[jetcafe.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[205.147.26.23:from]; SPAMHAUS_ZRD(0.00)[205.147.26.23:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:7397, ipnet:205.147.0.0/18, 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: Tue, 29 Dec 2020 22:27:40 -0000 On Tue, 29 Dec 2020 14:40:17 +0700 Victor Sudakov wrote: > Dave Hayes wrote: > > > > > Was this happening over network (PXE boot) or from a physical medium > > > > > like USB drive/CD-ROM ? > > > > > > > > Actually both. However, this thread implied that the mfsBSD/ramdisk > > > > techniques did not work, and I wanted to provide a datapoint to the > > > > contrary. > > > > > > > > We have one installation which gets the ISO image over FTP and boots > > > > from that, > > > > > > Can you please elaborate on that? Is this installation using UEFI or > > > legacy mode loader? What tools are used? pxelinux/memdisk or anything > > > else? > > > > This particular installation is a Dell DRAC that has the capability of > > booting given an http url for a bootable iso. There actually is still some > > problem booting the hybrid disk in BIOS mode, but UEFI works just fine. > > Highly effective on an isolated network. > > Ah, is this more like IPMI booting, where you can attach an ISO image to > the IPMI console which has its own networking stack, management > interface etc? I am not too familiar with IPMI, but what you describe is what we have been working with. > Therefore my cheat sheet for making a UEFI bootable freebsd UFS volume is > like this: > > 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 > > Instead of "gpart bootcode -p /boot/boot1.efifat -i 1 ada1" we can just > as well run > "newfs_msdos /dev/ada1p1 ; mount_msdosfs /dev/ada1p1 /mnt ; rsync -r ... /mnt" 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 these days unless I have to. Nevertheless, I seem to be using /boot/pmbr as the actual boot code and I have the GPT image being created with mkimg(1) which gets dropped into the iso by dd(1). 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. -- Dave Hayes - Consultant - LA CA, USA - dave@dream-tech.com >>>> *The opinions expressed above are entirely my own* <<<< One of the most common defenses against really learning something is to believe that one knows it already.