From owner-freebsd-hackers@freebsd.org Fri May 1 09:54:00 2020 Return-Path: Delivered-To: freebsd-hackers@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 18DA22D08DE for ; Fri, 1 May 2020 09:54:00 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49D6yv2Fk6z4K0l for ; Fri, 1 May 2020 09:53:59 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: by mailman.nyi.freebsd.org (Postfix) id 4B7AF2D08DD; Fri, 1 May 2020 09:53:59 +0000 (UTC) Delivered-To: hackers@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 4B3492D08DC for ; Fri, 1 May 2020 09:53:59 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49D6yt3qmCz4K0k for ; Fri, 1 May 2020 09:53:58 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type:Message-Id:From; bh=G+NYUzNEASnSysYWN/HDAFB7w6eQrf9TGHgyQMs59LE=; b=Ki07krcx7enFxZNyykkX/xWqZNsc8Vzb4r11+QYf9iCDbYdW8/8s4f8Cv4paEFFaU7KM9eQJ7UATtv6rHEu1igTa4QiCXVVCLrpf+OHhfYqHg7SwTjWJwF7dBpyXQHX7GE65Rmm7JsQQFLNyPJFEw0izQXdnhkH8GmE14qvJoC93xIpRYxOU9dSuKLxglT3QPmgjzbvgktP52nveLPwliXVwWwJO3L/Vx5YR/ExuPUhc5dDJO8lxBWxUCmsM8Wz8XK2Kz+nHtYP3q3xVLkM/VIg3dt5TFQPCkr4sGJL/KioGAQaFfdOk/h5JaBw3IDFEKmc4EDM6yW5HQdmgUoFMqQ==; Received: from macmini.bk.cs.huji.ac.il ([132.65.179.19]) by kabab.cs.huji.ac.il with esmtp id 1jUSMl-0007EX-Oy; Fri, 01 May 2020 12:53:55 +0300 From: Daniel Braniss Message-Id: <9FAAF98B-77D1-4D39-8E8E-D20F2B4C2E5C@cs.huji.ac.il> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: efi boot question Date: Fri, 1 May 2020 12:53:48 +0300 In-Reply-To: Cc: hackers@freebsd.org To: =?utf-8?Q?Trond_Endrest=C3=B8l?= References: <8B798F61-783C-4A1C-AEED-4B42E88E5010@cs.huji.ac.il> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49D6yt3qmCz4K0k X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=Ki07krcx; dmarc=pass (policy=none) header.from=huji.ac.il; spf=none (mx1.freebsd.org: domain of danny@cs.huji.ac.il has no SPF policy when checking 132.65.116.210) smtp.mailfrom=danny@cs.huji.ac.il X-Spamd-Result: default: False [-4.70 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(-2.40)[ip: (-6.24), ipnet: 132.64.0.0/13(-3.24), asn: 378(-2.59), country: IL(0.05)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[210.116.65.132.list.dnswl.org : 127.0.10.0]; DMARC_POLICY_ALLOW(-0.50)[huji.ac.il,none]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:378, ipnet:132.64.0.0/13, country:IL]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2020 09:54:00 -0000 > On 1 May 2020, at 11:42, Trond Endrest=C3=B8l = wrote: >=20 > On Fri, 1 May 2020 11:16+0300, Daniel Braniss wrote: >=20 >> hi, >> I have none efi boot that: >> - the bios is set to do network boot/pxe >> - if the dhcpd.conf is configured with filename set to pxeboot, = it loads as diskless,=20 >> or if set to =E2=80=9Cpmbr=E2=80=9D then goes and boots off = the hard disk. >> (this is faster than changing the bios boot order) >>=20 >>=20 >> so now i'm experimenting with efi boot,=20 >> the GPT is: >>=20 >> =3D> 40 5857345456 mfid0 GPT (2.7T) >> 40 409600 1 efi (200M) >> 409640 8388608 2 freebsd-ufs ( 4.0G) >> 8798248 100663296 3 freebsd-swap (48G) >> 109461544 5747883952 4 freebsd-zfs (2.7T) >>=20 >> but am at loss figuring out what boot file to download. >> any insight is appreciated, >=20 > You can try this: >=20 > gpart bootcode -p /boot/boot1.efifat -i 1 mfid0 >=20 > This will populate /dev/mdid0p1 with a FAT filesystem containing=20 > /boot/boot1.efi, saved as efi/boot/BOOTx64.efi. You may later replace=20= > the latter file with /boot/loader.efi. You will also find=20 > efi/boot/startup.nsh which simple instructs the boot firmware to load=20= > and run BOOTx64.efi. >=20 > I haven't worked out how you can grow the small 800K FAT filesystem to=20= > take advantage of your 200M partition. And indeed, we will need an ESP=20= > of more than 800K in the near future. >=20 > This fstab entry might be handy: >=20 > # Device Mountpoint FStype Options = Dump Pass# > /dev/mfid0p1 /esp msdosfs rw,-l,-m=3D664,-M=3D775,noauto = 0 0 >=20 > --=20 > Trond. the fat partition is fine, has all that is needed, but I need the right bootblock instead of pmbr, and there are many *efi* in = /boot and I don=E2=80=99t know which one to use :-( thanks, danny