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

    Conditional boot menu (aka different boot menu for Windows and Mac)

    Scheduled Pinned Locked Moved
    General
    4
    10
    4.1k
    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.
    • S
      Sebastian Roth Moderator
      last edited by

      Booting and imaging our Macminis is working great with FOG 1.2.0 but it’s still a bit of a hassle as we have both Windows and Mac OS X clients in our labs and I have to customize the boot menu by hand everytime I want to switch between those.
      I started to add some code to ‘/var/www/fog/lib/fog/BootMenu.class.php’ to check $_REQUEST[‘mac’]. Depending on the MAC address a different boot menu is being send to the client…

      As far as I can see even in current SVN this cannot be configured eventhough you can add custom boot menu entries, right?

      I’ll happily implement it myself but I wonder what would be the best way to do it? Would be great if someone could give me a hint on how to implement this the “proper FOG way”… thanks in advance!

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        The boot menu shouldn’t have to be changed, unless you’re doing the “edit by hand” to remove the console issues for the Mac Mini’s.

        The “proper” method to get this working is technically to use user-class system.

        The DHCP server can detect how a client booting ((U)efi/legacy), and because of this, you can tell the systems what file to use to download. In the case of EFI booting, it can then tell the system to load up with the snp{,only}.efi and/or the ipxe.efi file. In the case of legacy it can direct to system to load the {ipxe,undionly}.{,k,kk}pxe file as needed.

        This is where I’ve not been able to come up with a “works” for all systems.

        I do know that the current svn stuff has fixes in place for the console issues, and that these files work fine on the efi systems, but it comes with the caveat that you need to tell the system to load the proper file at the proper time.

        I know this doesn’t give much insight but hopefully it can help lead you to a more automated system?

        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          [quote=“Uncle Frank, post: 42799, member: 28116”]Booting and imaging our Macminis is working great with FOG 1.2.0 but it’s still a bit of a hassle as we have both Windows and Mac OS X clients in our labs and I have to customize the boot menu by hand everytime I want to switch between those.
          I started to add some code to ‘/var/www/fog/lib/fog/BootMenu.class.php’ to check $_REQUEST[‘mac’]. Depending on the MAC address a different boot menu is being send to the client…

          As far as I can see even in current SVN this cannot be configured eventhough you can add custom boot menu entries, right?

          I’ll happily implement it myself but I wonder what would be the best way to do it? Would be great if someone could give me a hint on how to implement this the “proper FOG way”… thanks in advance![/quote]

          Please, please elaborate on all your steps to image Macs.

          I’m very interested in this, as we have a massive number of Macs in our school district.

          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!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            Thanks a lot for your answer Tom! I am sorry but I am still convinced that the decision needs to be done in the boot menu… let me explain. First scenario with PC/BIOS:
            [CODE]
            BIOS -> PXE ROM -> DHCP -> tftp://fog-ip/undionly.kpxe -> default.ipxe -> boot.php
            -> option 1 (no task scheduled): chainload windows (grub4dos) or linux (using grub with loopback support as we use wubi)
            -> option 2 (task scheduled): run task[/CODE]
            And now with Apple/EFI:
            [CODE]
            EFI -> PXE ROM -> DHCP -> tftp://fog-ip/ipxe.efi -> default.ipxe -> boot.php
            -> option 1 (no task scheduled): chainload mac os x (using grub with efi support)
            -> option 2 (task scheduled): run task[/CODE]
            As you can see I do have DHCP user class settings to serve the correct iPXE binary. But where do I go from there? I could point ipxe.efi to a different ipxe-file, yes. But at some point I need to ask boot.php if this particular client has been scheduled a job or not, right?? I don’t see how I could possibly distinguish between ‘task’ and ‘normal boot’ before I get to load boot.php…

            Any ideas and comments are highly appreciated! 🙂

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott
              last edited by

              Why would that matter?

              undionly.kpxe/ipxe.efi both have the same startup scripts. The ONLY purpose of default.ipxe is to point to the servers boot.php file. This process is identical, regardless of the bootup file itself. The boot file then get’s the information from BootMenu.class.php.

              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                [quote=“Tom Elliott, post: 42870, member: 7271”]Why would that matter?[/quote]
                Because I want to boot straight into windows/linux/mac os x if there is no task scheduled for that client. FOG uses grub4dos or sanboot method to boot from the hard drive. But this does not work with Apple! What works for me is loading my own version of grub64bit.efi and then chainloading into Mac OS X with that. But that doesn’t work on PCs on the other hand. So I need to distinguish between PC and Apple. Maybe it’s just stupid how I try to do things. Please bear with me.
                [B]EDIT: I just realized that I didn’t explain my situation quite well enough! Updated the above post too. What I am trying to achieve is displaying a different menu whether there is a PC asking for it or an Apple. YES, I could just show the same boot menu to all of them. But I wonder if it can be done better…[/B]

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  Current implementation checks ‘$this->Host->getOS()’. Depending an the return value I display Mac OS X in the boot menu or Windows. Quite simple and I guess I’ll be happy with this for now. Sorry for all the rumors I make about cosmetics like this…

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott
                    last edited by

                    That seems a better option that trying to make a guess at what menu is wanted when and wear based on the nic manufacturer (as at that point that’s all I can come up with to know “who” is connecting.)

                    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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman
                      last edited by

                      I’ll make a suggestion…

                      Perhaps, after registering a PC or a Mac, through the Web GUI, we can simply manually tick a check box that says what it is… and that can be stored in the database. If the check-box for Mac isn’t ticked, assume PC.

                      And then, maybe we can have two completely separate boot menus/methods depending solely on what the database has stored for said MAC address…

                      JUST a suggestion… It really seems to me that this needs to be more streamlined.

                      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!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      1 Reply Last reply Reply Quote 0
                      • V
                        VincentJ Moderator
                        last edited by

                        a very edge case… you will likely need to DIY it.

                        The developers can not program every single configuration, only the one that fits most use cases.

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

                        164

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project