• Hi, I wonder if it’s possible to make boot menu like in clonezilla and how to do it because i don’t find any tutorial for it ! (want to boot on a particular chainloader)
    thanks 🙂

  • @george1421 Thanks ! I found the problem few minutes after this post, with this subject

  • Moderator

    @koni said in Boot menu:

    @koni I dont know what he is reading but it’s not reefind.conf

    It better be it should be in this path on the fog server: /var/www/html/service/ipxe/refind.conf You may need to turn on the menu features, FOG has a lot of the settings commented out because for most people refind locates the uefi boot partition and just does its thing automatically.

  • @koni I dont know what he is reading but it’s not reefind.conf

  • @george1421 I will use refind.conf looks easier and similar to clonezilla however when I changed something in the conf, it’s not updating did i have to restart something ?

  • Moderator

    @koni said in Boot menu:

    Do you know which files is getting modified when we change menu entry in fog management site ?

    The answer is easy and complicated at the same time. When you change the exit mode for uefi or bios computers, the FOG Program updates the menu entries in the FOG iPXE menu. This is done quickly based on programming.

    So how can you see this? If you point a browser to http://<fog_server_ip>/fog/service/ipxe/boot.php?mac0=00:00:00:00:01:00&arch=x86_64&platform=efi

    This is the text behind the iPXE menu.

    For example this section is relevant to your question

    choose --default fog.local --timeout 3000 target && goto ${target}
    imgfetch ${boot-url}/service/ipxe/refind.conf
    chain -ar ${boot-url}/service/ipxe/refind_x64.efi || goto MENU

    The fog.local section gets called after the timeout value. The content of fog.local changes based on the platform of the computer (bios or uefi).

    The default values of refind.conf work on 95% of the systems. FOG is only using a small part of the power of rEFInd. There are menuing options in refind that FOG doesn’t use. They might be helpful for your deployment. We can also alter (i.e. hack) the FOG code slightly if you want to continue using the fault refind.conf for general imaging and a custom refind.conf (i.e. refind2.conf) file for a different purpose.

  • @george1421
    At first thanks for your help.
    I tried the thing above with : “sanboot --no-describe --drive 0 --filename /EFI/kali/grubx64.efi”
    But it didn’t work.
    Do you know which files is getting modified when we change menu entry in fog management site ?

    To use rEFInd did i have to change this file ?

  • Moderator

    @george1421 Well that’s an interesting find on the iPXE exit code. I don’t find the time to dig into this at the moment but I hope we don’t loose track of this. Would you open an issue on github on this topic? Things just tend to get lost here in the forums more easily.

  • Moderator

    @Developers I don’t work with github but can you tell from this document if this feature has been added to the master branch in iPXE? https://github.com/ipxe/ipxe/pull/612 This looks like it might solve both the OPs issue as well as could be utilized in FOG as a possible exit mode in addition to rEFInd for uefi exit modes.

    Also in researching this I also came across this post that talked about the Exit , where it chains to the next device in the uefi boot order. https://forum.ipxe.org/showthread.php?tid=6775 post #8 Specifically some uefi firmware needs Exit 1 (to see the failure level) to chain to the next boot item in the uefi boot order. So if I understand this if the boot order is {PXE, Windows OS} the Exit 1 ipxe menu item would make it boot uefi boot menu {Windows}.

    @koni The commands you use are specific to syslinux. They are unknown to iPXE. FOG uses refind.efi (typically) as an exit mode from the iPXE menu. Meaning that iPXE doesn’t directly manage booting from the local hard drive. It appears the patch I referenced above for iPXE will give us that ability. Please give us some time to get this sorted out. There is a way (I’ve done before) to chain load grub.efi so we can make a grub menu to do what you want. Also we can do something similar with rEFInd and have a custom refind menu to boot locally. It would be cleaner to do in iPXE directly as the patch has mentioned. Lets see what solution we can find.

  • @george1421 I tried to do my own menu pxe boot but it’s written :
    could not boot exec format error e2008081
    chainloading failed

    but he find my chainloading repository

    just wirte :
    chain (hd1,gpt1) /efi/kali/grubx64.efi

    is the equivalent of insmod missing like “insmod fat” or something like that ?

    I have a boot menu for clonezilla represent like that
    insmod fat
    set root=(hd1,gpt1)
    chainloader /EFI/kali/grubx64.efi

    If someone has an idea can’t find solutions on the net
    thanks !

  • Moderator

    @koni The concept is the same for netbooting vs local. The purpose of that tutorial for you is:

    1. To see its possible to add custom iPXE menus
    2. A general understanding of the iPXE commands needed to chain load different kernels.

    As I mentioned before iPXE is not syslinux. They are competing technologies, but also compatible with their commands. Here are the commands iPXE uses: https://ipxe.org/cmd

  • @george1421 I didn’t need to install it I have a multiple partition harddisk (linux,kali,windows and centos) and I need fog to propose the kali linux grub in boot menu

  • Moderator