• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Where are the general iPXE settings?

Scheduled Pinned Locked Moved
General Problems
4
9
1.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    Gamienator
    last edited by Nov 27, 2019, 8:54 AM

    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

    J 1 Reply Last reply Nov 27, 2019, 2:58 PM Reply Quote 0
    • Q
      Quazz Moderator
      last edited by Nov 27, 2019, 1:50 PM

      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.

      1 Reply Last reply Reply Quote 0
      • J
        Junkhacker Developer @Gamienator
        last edited by Junkhacker Nov 27, 2019, 8:59 AM Nov 27, 2019, 2:58 PM

        @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

        signature:
        Junkhacker
        We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

        J G 2 Replies Last reply Nov 27, 2019, 3:02 PM Reply Quote 2
        • J
          Junkhacker Developer @Junkhacker
          last edited by Nov 27, 2019, 3:02 PM

          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.

          signature:
          Junkhacker
          We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

          1 Reply Last reply Reply Quote 0
          • G
            Gamienator @Junkhacker
            last edited by Nov 27, 2019, 4:38 PM

            @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!

            J 2 Replies Last reply Nov 27, 2019, 4:44 PM Reply Quote 0
            • J
              Junkhacker Developer @Gamienator
              last edited by Nov 27, 2019, 4:44 PM

              @Gamienator ipxe.org has references to all of the commands and functions available, and you can find examples of ipxe menus on the forums.

              signature:
              Junkhacker
              We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

              1 Reply Last reply Reply Quote 0
              • J
                Junkhacker Developer @Gamienator
                last edited by Nov 27, 2019, 5:29 PM

                @Gamienator if you’d like examples on how to make iPXE menus (a good starting point) just search the forum for “advanced menu”

                signature:
                Junkhacker
                We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                1 Reply Last reply Reply Quote 0
                • G
                  george1421 Moderator
                  last edited by Nov 29, 2019, 1:44 PM

                  I have a few resources for you too.

                  1. 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.

                  2. 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.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  J 1 Reply Last reply Dec 2, 2019, 2:24 PM Reply Quote 1
                  • J
                    Junkhacker Developer @george1421
                    last edited by Dec 2, 2019, 2:24 PM

                    @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

                    signature:
                    Junkhacker
                    We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      2/9
                      Last post

                    157

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project