[ipxe-devel] Status Update: Booting VMWare ESXi 5.1 installer via iPXE native Multiboot

Brandon Penglase bpenglase-ipxe at Spaceservices.net
Mon Sep 17 03:07:46 UTC 2012


So I figured I would update the list on what I've found so far, and
since I'm not at a loss, maybe someone else can pick up and get it
going.
So with 5.1 being released, I decided to move my trial to that version.
Besides now having to load more modules, it happens to be just about
the same.
First, you'll want to extract the entire ISO to a directory on your
http/tftp/netboot server. I did this by mounting it via loop on the
command line, and using cp -R to also grab the directories (although I
don't think these are needed). 
Here: http://node4.smart-serv.net/~brandon/esxi51.ipxe is the file
(also attached) that I chain to in my iPXE menu to load the installer.
Few things to note here:
   1. I had to use imgfree here since I did have pxelinux.0 embedded
   into iPXE for my vesamenu (which actually isn't used anymore, but it
   doesn't hurt to have it anyway).

   2. The tboot.b00 file was gunzip'd (gunzip -S b00 tboot.b00; mv
   tboot. tboot) and renamed to just tboot. The option "runweasel" it
   set on the kernelopts line in the esxi5 boot.cfg file (as noted
   previously on the mailing list)

   3. All of the modules are actually gzip'd. I used this script
   (http://node4.smart-serv.net/~brandon/esxi-script.sh also attached)
   to extract almost all of the modules, and rename them back to what
   they were called. The ones I don't gunzip are the ones ending in .gz
   or similar format, as iPXE does handle them, and it seems the kernel
   wants to unpack them itself. From what I was finding, the kernel
   would never boot for me when I included all of these as-shipped from
   VMWare. 

   4. The "useropts.gz" module is missing from the list. I found this
   is actually a file of 0 size, that was gzip'd to 20bytes, and I
   found by including it (either compressed, or not), ipxe either fails
   to boot the image, or it keeps trying to download a 0byte file
   (which obviously there is nothing to download).

   5. chardevs is just that in the file, while it is actually named
   chardevs.b00, this is explained below.

On the iPXE side, the following needs to be changed to work:
   * src/arch/i386/image/multiboot.c
	* Line 55 (on current GIT): #define MAX_MODULES needs to be
	  changed to a much higher value. I set mine to 100.
	* Line 65 (on current GIT): #define MB_MAX_CMDLINE needs to be
	  set to a _much_ higher value. I set mine to 4096, as it
	  includes all the characters of each module.

So, with all of these changes, I at least get the ESXi kernel to boot!
One step in the right direction! 
However, it gets the Pink Screen, when it tries to start loading
modules: http://node4.smart-serv.net/~brandon/esxi-pink.png (also
attached). If you hit ESC, then open l (lowercase L), to display the
VMKernel log, you can see what the issue is:
http://node4.smart-serv.net/~brandon/esxi-moderr.png (again, also
attached). 
The line that peaked my interest was: "BootModule: 133: unknown boot
module type for chardevs". This brings us to issue 5 above.

It seems no matter what I try, including the raw chardevs.b00 (gzip'd,
but does still boot), or unpacking it to just the chardevs file that
Nautilus identifies as an Object Code file, I get the above error. 
If I do not include this module at all, when it tries to load the
user.b00 file, it fails on the chardevs namespace, indicating to me
that it is required. 

So.. this is where I got to trying to boot ESXi's installer via iPXE's
multiboot image functionality. 

I did come up with a workaround for a person in the IRC channel that
chainloads to pxelinux.0 to load the installer via it's mboot.c32 file,
so they could at least get ESXi installing. I can post that if there is
interest. 

Hopefully this can be useful to someone trying to debug further, to
actually get ESXi to boot.

	Brandon Penglase
-------------- next part --------------
A non-text attachment was scrubbed...
Name: esxi51.ipxe
Type: application/octet-stream
Size: 1433 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20120916/7d15ebd5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: esxi-script.sh
Type: application/x-shellscript
Size: 300 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20120916/7d15ebd5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: esxi-pink.png
Type: image/png
Size: 5729 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20120916/7d15ebd5/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: esxi-moderr.png
Type: image/png
Size: 28848 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20120916/7d15ebd5/attachment-0001.png>


More information about the ipxe-devel mailing list