Menu

Refind.conf ignored in custom ESXi image with rEFInd as bootloader

2020-07-15
2022-09-30
  • Michael Mueller

    Michael Mueller - 2020-07-15

    Hello everybody,

    I'm trying to create a custom ESXi .iso-file with rEFInd as its boot loader instead of the custom VMWare boot loader. The iso file shall then be mounted on a remote server as its (virtual) installation medium (basically following these instructions). The servers must boot in EFI mode, not legacy unfortunately.

    So far I did the following:
    0. Unpack the original ESXi iso image and copy its content to a work directory
    1. Within the work directory, rename the original boot loader (mv EFI/BOOT/bootx64.efi EFI/BOOT/esxboot.efi)
    2. Move rEFInd_x64.efi to the location of the original boot loader to trick ESXi into running rEFInd_x64.efi first (mv <...>/rEFInd_x64.efi EFI/BOOT/bootx64.efi)
    3. Create a custom refind.conf file which also resides in EFI/BOOT/. In the refind.conf I declared two menu entries that both use the esxboot.efi (original boot loader) as loader argument + some custom kickstart-related options appended.
    4. Make iso file from work directory via genisoimage

    When I plug the iso into the server and boot it, the following happens:
    1. The rEFInd menu appears (indicating that the server accepts the new boot loader (refind_x64.efi instead of bootx64.efi).
    2. However, the boot menu just shows the 'default' menu entries -- custom boot stanzas are ignored, timeout is ignored too. It feels like the refind.conf is simply not used at all.

    My refind.conf looks like this:

    timeout 60
    scanfor manual
    
    menuentry "Node1" {
        loader \EFI\boot\esxboot.efi
        options "ks=CD:/NODE1.KS"
    }
    
    menuentry "Node2" {
        loader \EFI\boot\esxboot.efi
        options "ks=CD:/NODE2.KS"
    }
    

    From this behavior I assume that I'm missing a small step where refind.conf must be referenced to the boot loader. Did anyone every try/experience something similar to this? Is my endeavor even possible?

    Any help is much appreciated!
    Cheers

     
  • joevt

    joevt - 2020-07-15

    I believe you have refind.conf in the correct location
    EFI/BOOT/refind.conf

    boot should be uppercase in the refind.conf?

    Did you try pressing escape key in rEFInd to refresh the list?

     
  • Michael Mueller

    Michael Mueller - 2020-07-17

    Hey, thanks for the comment!

    Quick update after fiddling around with rEFInd for a while: I decided to try GRUB instead of rEFInd as the initial bootloader that chainloads the ESXi bootloader. I had to make some slight adjustments (e.g. syntax for menu stanzas varies a bit between grub and refind), but after a couple of hours everything worked like a charm! :-)

    Gonna post a brief update on the ESXi forum soon, too, just in case anybody else is still struggling with this use case.

     
  • Chris Leblanc

    Chris Leblanc - 2022-09-30

    (I would like to see the grub config)

    Just an update for anyone chasing this using rEFInd, I did have it work with his config.

    The slashes were the wrong way for Linux

    This gave me the options for Node1 and Node2

    (Updated version of his config)

    timeout 60
    scanfor manual

    menuentry "Node1" {
    loader /EFI/BOOT/ESXBOOT.EFI
    options "ks=CD:/NODE1.KS"
    }

    menuentry "Node2" {
    loader /EFI/BOOT/ESXBOOT.EFI
    options "ks=CD:/NODE2.KS"
    }

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.