efi boot question

Trond Endrestøl trond.endrestol at ximalas.info
Fri May 1 08:42:47 UTC 2020


On Fri, 1 May 2020 11:16+0300, Daniel Braniss wrote:

> 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, 
> 	  or if set to “pmbr” then goes and boots off the hard disk.
> 	(this is faster than changing the bios boot order)
> 
> 
> so now i'm experimenting with efi boot, 
> the GPT is:
> 
> =>         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)
> 
> but am at loss figuring out what boot file to download.
> any insight is appreciated,

You can try this:

gpart bootcode -p /boot/boot1.efifat -i 1 mfid0

This will populate /dev/mdid0p1 with a FAT filesystem containing 
/boot/boot1.efi, saved as efi/boot/BOOTx64.efi. You may later replace 
the latter file with /boot/loader.efi. You will also find 
efi/boot/startup.nsh which simple instructs the boot firmware to load 
and run BOOTx64.efi.

I haven't worked out how you can grow the small 800K FAT filesystem to 
take advantage of your 200M partition. And indeed, we will need an ESP 
of more than 800K in the near future.

This fstab entry might be handy:

# Device	Mountpoint	FStype	Options				Dump	Pass#
/dev/mfid0p1	/esp		msdosfs	rw,-l,-m=664,-M=775,noauto	0	0

-- 
Trond.


More information about the freebsd-hackers mailing list