0

all documents mention syslinux/pxelinux as a way to pxeboot ESXi installation, but I'd like to stay with GRUB 2. How to do that?

I'm able, of course, to load GRUB 2 via network (i386-pc/core.0 for non-UEFI host) but then I can't figure out what should I put to load mboot.c32 or if it is possible to boot b.b00 somehow directly.

Jiri B
  • 497
  • 2
  • 11
  • From what I have seen ESX uses mboot format. You United all modules and then boot mboot.c32 to have that execute the real code. iPXE forum has some explanations here, for EFI I think it is mboot2 – NiKiZe Aug 19 '21 at 13:30
  • EFI boot works for me but I have no idea how to load mboot.c32 from GRUB. What is the link to iPXE forum you mentions please? – Jiri B Aug 19 '21 at 15:24
  • What are the reasons to use GRUB instead of iPXE for network booting? – Mircea Vutcovici Aug 20 '21 at 14:35
  • Good multiplatform support? It's main boot loader in all Linux distros and thus everybody knows how to use it... "I'd like to stay with GRUB 2" - this is clear message. – Jiri B Aug 21 '21 at 10:04

1 Answers1

0

You need to configure GRUB for network boot. The GRUB Networking documentation can be viewed on local machine with: pinfo grub2 --node=Network

A more advanced alternative to grub for PXE booting is iPXE. I find iPXE to be a better replacement for PXELINUX. You can build an iPXE bootable image that suits your needs, or download a generic one. You need just UNDI driver for BIOS and SNP for UEFI. iPXE is very configurable: you can have menus, authentication; supports iSCSI, NFS, CIFS, HTTP(S)... And it's possible to boot ESXi with it.

Mircea Vutcovici
  • 16,706
  • 4
  • 52
  • 80
  • You did not reply about GRUB and ESXi at all. A tip for iPXE, why? I'm happy with GRUB2. I've been using GRUB2 on network for ages... – Jiri B Aug 19 '21 at 14:53
  • Well, I did. Please follow the links. Last one is for iPXE but similar is for GRUB. – Mircea Vutcovici Aug 19 '21 at 15:49
  • "...similar is for GRUB" - have you tried that? GRUB2 does not have 'kernel' command. `grub> kernel error: ../../grub-core/script/function.c:119:can't find command 'kernel'.` – Jiri B Aug 20 '21 at 06:29
  • 1
    Try: `linux (tftp,192.168.1.1)/boot/vmlinuz... root=/dev/nfs nfsroot=[:][,]` then `initrd=(tftp,192.168.1.1)//boot/initrd....` – Mircea Vutcovici Aug 20 '21 at 14:24
  • Sorry, for your case, try: `linux (tftp,192.168.1.1)/boot/b.b00 ks=nfs://192.168.30.176/srv/nfs/esxi7/ks.cfg` – Mircea Vutcovici Aug 20 '21 at 14:29
  • What is the current grub configuration? And which version of grub are you using? And what is the configuration for TFP and DHCP servers? – Mircea Vutcovici Aug 20 '21 at 14:33
  • The whole problem is `mboot.c32` is not a format for `linux*`, `multiboot2*` GRUB2 commands. It's customized *syslinux* module. I think only workaround is to `pxechain` `pxelinux.0` and then use it as VMware states (this of course applies to legacy BIOS and it works for me!). "You can try" - this just confirms you have never seen it working directly from GRUB2. – Jiri B Aug 21 '21 at 10:00
  • I was configuring this kind of stuff 10+ years ago. My memory is not perfect and GRUB changed the syntax since then and industry moved to gPXE that evolved into iPXE. – Mircea Vutcovici Aug 21 '21 at 13:04