EFI, UEFI, PXE: FreeBSD-12.1-RELEASE-amd64-bootonly.iso boot from SAN device failed, error 0x7f22208e

Victor Sudakov vas at sibptus.ru
Wed Dec 30 06:56:48 UTC 2020

Dave Hayes wrote:


> > 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

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

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) which
> gets dropped into the iso by dd(1). 

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.

> 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 mfsroot?

Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet http://vas.tomsk.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20201230/5bd57529/attachment-0001.sig>

More information about the freebsd-questions mailing list