SOLVED Custom client boot menus for each client

  • Server
    • FOG Version: 1.3.4
    • OS: Ubuntu 16.10
    • Service Version:
    • OS:

    Hi list,
    I am working on a project that I need some help with. I have 6 small thin-clients that I want to boot via ipxe from my FOG server without user interaction. I.E. no keyboard or mouse. I have this working very nicely with one unit which I set the default boot device to the iso I want it to boot from, but I am at a loss as how to create individual boot menus each with a different default boot item for each specific client. Can this be done? These clients are used for VNC viewing of different servers on our network and each needs a slightly different O/S depending on which flavor of server it is connected to.
    Thanks for all the great work on this project!

  • @george1421 I think we can mark this as solved. This conditional test works very well. I ended up using the MAC address for this and then creating a separate menu for each iso.
    Example: In fog.local parameters
    iseq ${net0/mac} f4:4d:30:65:23:94 && goto fog.Ubuntu-16 ||
    iseq ${net0/mac} 00:30:1b:82:d2:d2 && goto fog.Gparted ||


  • Moderator


    There is another thread that is trying to solve a different problem, but the same logic can be applied to your quests.

    And FWIW I also submitted a feature request for something similar.

  • @george1421 Yes, I think that client A will always boot from the same iso, but I am thinking that I could change iso’s by simply changing the fog.local parameters and point to another iso. This idea looks like it will work, so it is just a matter of trying it out in my lab setup. If that works, I’ll roll it out into the production environment.
    As far as using FOG for imaging, I don’t really know at this point. Probably yes, but since I just discovered FOG, it will be a work in progress. Almost all of our Windows machines boot from SAN over FC, and to take snaps of their O/S’s I use dd right on the SAN array. The only problem with that is that the machines need to be shut down for this procedure. Possibly FOG could make this simpler…
    Thanks for all the input. I will report back hopefully within the week and let you all know how this is working.

  • Moderator

    @guthriesound (sorry, my OCD kicking in here).

    1. Just to be clear thin client A will always boot iso image 12345.iso?

    2. One last question. Will the FOG server ever be used for typical FOG imaging?

    What we’ve (junkhacker) defined (below) may just work based on how you answer question #1.

  • Developer

    @guthriesound so, did you figure out what you needed to do based on our replies?

  • @george1421 Thanks for all the replies. I’ll try to be more concise on how I need it to work. It basically comes down to how the various flavors of VNC work. I run the sound department of a fairly large regional theater company. We use both Windows and Mac based PC’s to run our audio playback software. The thin-clients are used as view-only monitors that various personnel use to monitor which cues are running during the performances. On the Windows side we use UltraVNC utilizing the MS logon feature to control access. The Mac screen sharing, on the other-hand, just needs a password to authenticate. vncviewer will work fine with the Macs but not with the Windows machines. For these we run UltraVNC under WINE. Thus, these thin-clients need to have different ISO’s if I want them to start up, load the appropriate version of VNC with the necessary command line switches. The goal is to create a system where the user simply plugs in the thin-client to power and a net connection and turns it on. I would administer which ISO each machine would boot to via configuration of the FOG boot menus. Currently we are using USB sticks with the different ISO’s on them. This works but is more cumbersome to manage.
    I hope that better explains what I am trying to accomplish.

  • Developer

    @george1421 the first example i listed could do that, if you named the iso files after the serial of the target computer, but i think it’s more practical to just add another line for each one, since you may want to use the same iso for more than one target computer.
    ipxe knows many things you can use for your conditional test, for a handy list i have this entry in my advanced menu

    echo This computer : ||
    echo MAC address....${net0/mac} ||
    echo IP address.....${ip} ||
    echo Netmask........${netmask} ||
    echo Serial.........${serial} ||
    echo Asset number...${asset} ||
    echo Manufacturer...${manufacturer} ||
    echo Product........${product} ||
    echo BIOS platform..${platform} ||
    echo ||
    echo press any key to return to Menu ||
    goto MENU

    i try not to use mac address because a computer may have more than one, and you can get the wrong one by referencing net0/mac, making you rest against multiple potential network adapters to get the one with the mac address you want

  • Moderator

    @Junkhacker Thinking along the same lines. If the iPXE menu supported a conditional test, you could test the serial number and then call that serial number $(serial}.iso file. That way you could do it with just one fog.local. It would then switch the the correct iso based on the serial number or asset tag of the pxe booting system.

    I would assume you could also use the mac address, that would be unique enough too. iPXE would already know that one.

  • Developer

    @guthriesound here’s one way you can do it
    add to the fog.local for each different boot iso you need to boot to something like this to the “Parameters” section
    iseq ${serial} DellSerial && initrd http://${fog-ip}/${fog-webroot}/special.iso && chain memdisk iso raw ||

    or you could add those new menus with names like fog.iso1, fog.iso2… and have the lines be like

    iseq ${serial} DellSerial && goto fog.iso1 ||

  • Moderator

    My gut reaction is FOG isn’t the tool for this project.

    BUT, can you explain this a bit more? Some points of your post are not clear.

    I get the unattended boot thing.

    But here is where I’m a bit confused, you have multiple OS images for each thin client and depending on the target system they are connecting to you want to load a different OS on that thin client?

    I’m thinking a syslinux environment would probably do what you need, but more details are needed.