VMware Cloud Community
joecunliffelsi
Contributor
Contributor

Has anyone been able to invoke the VMware BOOTX64.efi from a BOOTX64.efi (grub.efi) menu?

I am trying to build a USB stick that will EFI boot and install a variety of Linux's (SLES, RHEL, CentOS) and VMware.  I have been able to create a menu and get all but the VMware piece working.  I have tried a chainload of the BOOTX64.efi that came out of the EFI directory on the VMware ESX5i install media, which seems to correctly invoke the binary, but the arguments get messed up and I get a "file not found".  Does anyone have insights into how tio get this working?

Thanks,

JoEC.   

28 Replies
TimMann
VMware Employee
VMware Employee

I personally wrote the document that you linked above and personally developed and tested every scenario. We network boot in UEFI mode daily within VMware.

The one thing that does not work is chaining to our bootloader from GRUB, due to an issue with GRUB as previously discussed.  Note that the document above does not describe any scenarios that involve chaining from GRUB, only booting mboot64 directly or chaining from ipxe to mboot64.

It would be good for us to document the incompatibility with chaining from GRUB. I wasn't aware of it the time I was working on the document. Perhaps a KB article and/or a note in the next rev of the document.

Reply
0 Kudos
TimMann
VMware Employee
VMware Employee

ESXi's mboot.c32 and mboot64.efi have similar names to a multiboot plugin that comes with syslinux/pxelinux, but they aren't meant to be general-purpose multiboot standard bootloaders that could boot a Linux kernel.  ESXi started off using the multiboot standard, but we've been slowly making additions (which should be compatible, but aren't tested with anything other than ESXi). So although the newest ESXi mboot should be able to boot old ESXi versions going back quite far (possibly all the way to 3.5, though I haven't personally tested back that far), I would be more surprised if it does boot Linux than if it doesn't.

Reply
0 Kudos
TusharVaghode
Contributor
Contributor

Just like many others in the thread I am switching to UEFI based system ESXi install. The UEFI/mboot.efi worked fine for me.

I do have a request for feature though. Currently the default is that it starts installing after 5 seconds of countdown. I was wondering if a menu item can be added where the default is local-disk boot instead - just like all other boot loaders have out there.

The way it is right now with mboot.efi/boot.cfg is that there is no protection against someone accidentally hitting F12...  and will result in system getting re-installed.

Thanks!

-Tushar

Reply
0 Kudos
justShyOf8
Contributor
Contributor

Any word on this? Did this make it into 6.7?

Reply
0 Kudos
TimMann
VMware Employee
VMware Employee

The workaround for the GRUB bug where it does not null-terminate device paths is in the 6.7 ESXi bootloader, so I think chaining from GRUB to our bootloader will work for disk and ISO image boots now.

However, as explained earlier in this thread, the reason that chaining from GRUB into VMware's bootloader during PXE boot does not work is a limitation in GRUB. GRUB calls Stop on the UEFI PXE prototol before handing off to our bootloader, so our bootloader cannot load any more files over the network. It's not possible to restart the protocol (I tried). I don't know of a way to work around this on our side. You could perhaps try modifying GRUB to not do that.

More simply, I suggest using something other than GRUB to create menus, also as discussed earlier in this thread.

Reply
0 Kudos
justShyOf8
Contributor
Contributor

I am actually inserting kickstart files within the iso image,. I've had this working with legacy mode for quite a while, with multiple entries in isolinux.cfg, but have been struggling to get this to work with UEFI.

Can you point me to an example of what the efi/boot/boot.cfg would look like? Would I be putting the  menu items into bootx64.conf, or maybe grub.conf? If so, can you tell me what they would look like? Any help you can provide would be greatly appreciated.

TimMann
VMware Employee
VMware Employee

> I am actually inserting kickstart files within the iso image,. I've had this working with legacy mode for quite a while, with multiple entries in isolinux.cfg, but have been struggling to get this to work with UEFI.

>

> Can you point me to an example of what the efi/boot/boot.cfg would look like? Would I be putting the  menu items into bootx64.conf, or maybe grub.conf? If so, can you tell me what they would look like? Any help you can provide would be greatly appreciated.

Hmm, I think you're saying you want to have multiple different kickstart files on an ISO image that you can select from using a menu. I see where the missing piece is here. An ESXi ISO image uses isolinux as the first stage for booting in legacy BIOS mode, and that has a menu feature. I gather you're using that. But for booting in UEFI mode, there's nothing on the ISO image that has a menu feature. The first stage is isobounce (which is installed as bootx64 in the ISO's second El Torito image), which loads an ISO9660 filesystem driver from the El Torito image and then chains to mboot (which is installed as bootx64 on the iso9660 filesystem). Neither isobounce nor mboot has a menu feature.

If you want to create something on the ISO that shows a menu when booted in UEFI mode, there are a few alternatives you could try. I haven't done this myself, though, so I'm not aware if there are any pitfalls or which is best.

Personally I'd probably try VMware menu.efi, but mostly that's because I wrote it and we use it a lot internally at VMware. We haven't advertised it for customer use, but it's available under the GPL as part of our bootloader (esx-boot) source disclosure. There's documentation at the top of the source code at esx-boot/menu.c at master · vmware/esx-boot · GitHub . It's not very easy to compile the esx-boot package that it lives in, though.

You could also try grub, rEFInd, or rEFIt.

Whatever you try as a menu program, you will have to get the ISO image to execute it instead of booting right into ESXi. I suppose you could modify the ISO9660 filesystem to rename its \efi\boot\bootx64.efi to something else (say mboot.efi), and put in the menu program you choose as \efi\boot\bootx64.efi. Alternatively, you could modify the second El Torito image to invoke your menu program -- that seems like it would be more work, though.

zelvrba
Contributor
Contributor

I was in the same boat and have been using the isolinux Menu with ks files for ESXi installs on legacy BIOS. But we have installations also with UEFI for which this didn't work.

For me solution for hosts using UEFI was to keep the same setup with KS files in iso, but skip the menu. Instead I adjusted \EFI\BOOT\BOOT.CFG to have a long timeout and added CFG to kernelops line (so we don't have to type it all every time). When ESXI install boots we press Shift-O and change ks filename, rest is the same as having a menu.

timeout=5000000

kernelopt=runweasel ks=cdrom:/KS/CHANGE_EVERY_TIME.CFG

Thank you very much TimMann for a description of the boot process.

Reply
0 Kudos
jmroth
Enthusiast
Enthusiast

I've been working extensively on an UEFI network install the last few days.

Turns out that using iPXE seems to work. (syslinux and grub(2) do not.) iPXE also allows you to create a menu.

Essentially you tell your machine via DHCP to boot ipxe.efi. In the DHCP transaction inside iPXE you tell it to get the iPXE config via HTTP. From there you can have a menu, chainload bootx64.efi/mboot and whatever else you like. You just need to put the different files (bootcfg, kernel etc.) in the appropriate places.

In essence i've been working with ultimate deployment appliance (uda) and tweaking it a little bit. If it works I'll have to see if I find the time to put a patch together.

So far I have only tested nested ESXi, next step will be on real hardware. 🤞

UPDATE Can confirm, works on Proliant DL380 G11

Reply
0 Kudos