Where are the general iPXE settings?
-
Good Morning gentlemen,
I got a small question. Now I got another task to do: We want to establish in one of our locations a Thin Client System. My Idea is: Besides our FOG Server on that side, that on specific MAC Adresses it should just start a Live Linux System via Netboot.
Well years ago I used only the normal PXE, where I was able to write a “config” file for every MAC-Adress that asking, if I don’t had any specific config file, it just loaded the menu from the default config.
Where is that in iPXE / FOG? Or the other way asked: How could I set it up, that specific MAC-Adresses doesn’t see the iPXE Menu and boot straight into the Live Linux that I’m sharing via NFS?
Thanks in Advance for any help!
Cheers,
Gamie -
Hmm, maybe have to get a little bit creative, unless I’m missing something.
If you install the plugin tasktypeedit, you can create a new task that boots to the live linux.
Then you could cron schedule that task for the hosts in question for every minute. This does leave a windows of time where it wouldn’t work if they reboot within that minute, but should otherwise work I think.
-
@Gamienator the fog ipxe boot file is compiled to load /tftpboot/default.ipxe as soon as it starts. this is the writable file that we use to give a writable address location for the fog server, so we don’t have to recompile the boot file for every server.
normally, this file just gathers some information and chain loads
http://<your-fog-server-address>/fog/service/ipxe/boot.php##params
this “file” is a dynamically generated boot file that will change according to scheduled tasks for that host
but, something you can do, and what i do to direct my testing machines to my development fog server and away from the production one, is add a few lines before the chain load like this
iseq ${serial} <your-machine-serial-number> && chain <alternative-boot-file-destination> ||
this reads
iseq (is equal)
${serial} (one of the pieces of info that we have ipxe already gathering and assigning to a variable)
<your-machine-serial-number> (the serial number of the host you want to redirect booting of)
&& (if previous condition tested true, do the next command)
chain (boot the following)
<alternative-boot-file-destination> (can be local to the default.ipxe, or http location, etc)
|| (if previous conditions fail, proceed to the available command instead of throwing an error)these command descriptions aren’t exact, but effectively what’s happening here. for more info, check out ipxe’s website
-
important side note: if you make modifications to this file, make backups of your changes. the default.ipxe file is overwritten on any fog upgrade.
-
@Junkhacker Wow! Thanks for the hints! I’m trying out tomorrow if there are easy changes for me or not But with that said year, should be possible. I already build the normal PXE Menu:
DEFAULT menu.c32 PROMPT 0 MENU TITLE Test Boot Menu TIMEOUT 100 LABEL netboot kernel ... initrd blablabla
so maybe I’m able to chain it to that menu. Since I never used iPXE I have to investigate.
But thanks again for your help!
-
@Gamienator ipxe.org has references to all of the commands and functions available, and you can find examples of ipxe menus on the forums.
-
@Gamienator if you’d like examples on how to make iPXE menus (a good starting point) just search the forum for “advanced menu”
-
I have a few resources for you too.
-
I have a tutorial on how to setup FOG as a netboot server: https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-images This will show you the structure you need to create a netboot server depending on the OS you need to netboot.
-
If you want to look at the structure of the FOG iPXE menu that the FOG Project wizards created you can point your web browser at
http://<fog_server_ip>/fog/service/ipxe/boot.php
and it will print out the program behind the ipxe menu.
I would suggest that you make two servers for this one for FOG and one for netboot and not try to use the same server for both.
I also question the number of devices you want to netboot this way. I don’t see this solution as very scalable. If your total number is less than 10 this could be a workable solution.
@Junkhacker solution of
iseq ${serial} <your-machine-serial-number> && chain <alternative-boot-file-destination> ||
could be used if you changed it up to be mac based. (Understand I haven’t put a lot of thought into this just yet). But you could chain to another ipxe menu that would contain the boot information for that mac address. Something like
chain tftp://$(mac).ipxe
and that should pull the file from the tftpboot directory. But then you will need to have a mac address file for each system. But then what happens if you don’t have a mac address file the boot fails.
The goal here would be to not adjust the fog programming code if possible but work within the framework of FOG that way upgrades won’t kill your implementation. But then again since you wouldn’t be doing imaging with this system there would be no real reason to upgrade FOG.
Lets start out with what scale (number of systems) are you talking about here, then we can look towards a sustainable path.
-
-
@george1421 said in Where are the general iPXE settings?:
and that should pull the file from the tftpboot directory. But then you will need to have a mac address file for each system. But then what happens if you don’t have a mac address file the boot fails.
in this case, you could just end the chain command with || and it would try the next available command, which can be booting to the fog server