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

    KPXE Exit to USB Boot

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    3
    37
    5.0k
    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.
    • george1421G
      george1421 Moderator @sourceminer
      last edited by

      @sourceminer What version of FOG are you using?

      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!

      1 Reply Last reply Reply Quote 0
      • S
        sourceminer
        last edited by

        Running Version 1.5.0-RC-10
        SVN Revision: 6080
        Dec 08, 2017 1:53 am

        george1421G 1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator @sourceminer
          last edited by

          @sourceminer Whelp then the developers removed the file then. Just modify the other one, the 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!

          1 Reply Last reply Reply Quote 0
          • S
            sourceminer
            last edited by

            OK so the file: /var/www/fog/lib/fog/bootmenu.class.php
            I have changed line 134 to include hd1
            Doesn’t seem to work.

            0_1512699116208_2017-12-07_18-09-03.png

            1 Reply Last reply Reply Quote 0
            • S
              sourceminer
              last edited by

              Well I guess for now I will just tell people to hit ESC when they see the PXE boot so that the units will boot up for now. Would like to see an EXIT option for alternate hard disk.

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

                @sourceminer said in KPXE Exit to USB Boot:

                Would like to see an EXIT option for alternate hard disk.

                Quite frankly… this is not a musical request programme! FOG is an open source project and its people (!) are doing all this just for the fun of it. George hast offered his ideas and quite some time over the last hours trying to open your mind to other solutions than booting off that USB stick as a second hard drive. If you wanna stick to it that’s fine. And we still try to give you a hand with that. But it’s got no priority on our list whatsoever! Hardly anyone is using FOG this way and doing that heavily depends on BIOS firmware playing nicely. So it might work but won’t promise it does.

                That said, I have done booting off a second drive years ago and it worked for me on some machines but not all. So keep that in mind.

                OK so the file: /var/www/fog/lib/fog/bootmenu.class.php
                I have changed line 134 to include hd1
                Doesn’t seem to work.

                Seems like you’re looking at the right spot. Can you please post a picture of the changed code as well as open the following URL in your browser - http://x.x.x.x/fog/service/ipxe/boot.php?mac=yy:yy:yy:yy:yy:yy (but substitute x.x.x.x with your FOG server IP and yy:yy:yy:yy:yy:yy with a MAC addresses of one of your clients) - and post the full text here.

                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
                  sourceminer
                  last edited by

                  Totally understand the position of not being musical… I was simply asking if it was doable. I mean if you already have the option to set the option for primary disk wouldn’t you potentially want to add that disk as the exit boot to as well? Just a thought. Also I appreciate help from everyone especially @george1421 and love thinking out of the box, however as seen in my responses, i was answering questions but they seemed to have been disregarded. So I apologize if my annoyance offended others.

                  I had posted this as well due to someone suggesting posting again as I re-opened an older topic (as another person wanted to do this as well as yourself) the solution honestly fits perfect for this.

                  So with all that said. It was a long night. We we ended up placing the boot order to usb then pxe.
                  This allowed us to image then boot. However it will not allow us to remotely image again due to the issue of not booting to the usb after pxe.

                  Interestingly there were 2 newer models of these Wyse terminals that when set to boot from usb after pxe in the bios they worked (as we would usually expect) also we had to change the primary disk back to /dev/sda. The older ones just didn’t work the same for whatever reason.

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

                    @sourceminer As I said, we are more to happy to help you. So I’ll just ask my questions again: Can you please post a picture of the changed code as well as open the following URL in your browser - http://x.x.x.x/fog/service/ipxe/boot.php?mac=yy:yy:yy:yy:yy:yy (but substitute x.x.x.x with your FOG server IP and yy:yy:yy:yy:yy:yy with a MAC addresses of one of your clients) - and post the full text here.

                    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
                      sourceminer
                      last edited by sourceminer

                      Thank you

                      Interesting that the file downloading from the server is different from the one I edited… (EDITED: Realized that I didnt register this test device yet, Registered and added to the same group as the other WYSE terminals). Since doing this still I see that the default boot will go to hd0. When does Exit to Grub_First_HDD take into effect?
                      Where is that file located to edit the first boot disk to hd1?

                      As @george1421 suspected did the bootmenu.class file change location in RC10?

                      0_1512763785694_2017-12-08_12-09-07.png

                      0_1512754153738_2017-12-08_09-24-29.png

                      1 Reply Last reply Reply Quote 0
                      • S
                        sourceminer
                        last edited by

                        OK so I have managed to find something that works, still however this requires manual intervention otherwise the machine will not boot unless you select the item from the menu. Im not familiar enough with GRUB to know if you can Attempt to boot to HD0 but if its unavailable go to HD1…

                        Here is what I have done:

                        Created a PXE Menu fog.usbboot
                        Parameters:
                        chain -ar http://${fog-ip}/${fog-webroot}/service/ipxe/grub.exe --config-file=“rootnoverify (hd1);map (hd1) (hd0);chainloader (hd1)+1” || MENU

                        0_1512769694716_2017-12-08_12-52-05.png

                        It is not set as default and displays for all hosts.

                        This allows the PXE to see the disk as hd1
                        0_1512769804682_2017-12-08_12-31-40.png

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

                          @sourceminer I just changed that file /var/www/fog/lib/fog/bootmenu.class.php (line 134) on my RC10 server, saved change, reloaded the page in the browser and sure see the change. So there is something wrong on your side. Possibly there are still other versions of FOG in the web root directory. Run this command to check (withou the shell>😞

                          shell> find /var/www/ -name "bootmenu.class.php"
                          /var/www/html/fog/lib/fog/bootmenu.class.php
                          

                          See there usually is a link /var/www/fog pointing to /var/www/html/fog - this is for kind of historical and compatibility reasons. Check it out to see if you have a proper link:

                          shell> ls -al /var/www/
                          total 4
                          drwxr-xr-x.  4 root root   44 Nov 11 19:48 .
                          drwxr-xr-x. 21 root root 4096 Nov 11 19:43 ..
                          drwxr-xr-x.  2 root root    6 Oct 19 22:39 cgi-bin
                          lrwxrwxrwx.  1 root root   18 Nov 11 19:48 fog -> /var/www/html/fog/
                          drwxr-xr-x.  3 root root   17 Nov 11 19:46 html
                          

                          As well I wanted to point out that in the old post you are referring to in your initial post I actually used a GRUB command map ... as well. You might want to play with that as well to possibly make it work: rootnoverify (hd1);map (hd1) (hd0);chainloader (hd1)+1

                          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
                            sourceminer @sourceminer
                            last edited by sourceminer

                            @Sebastian-Roth we must have posted at the same time. Along the same lines I did the same thing with a menu item. See above your post.

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

                              @sourceminer Good to hear that you found a workaround. You could even make that the default on boot but that’s up to you.

                              In any case I would look into what I wrote about web root directory and link as I have a feeling that something could be wrong on your server. Might cause you a head ace at some point in time. It’s really wired that you’d upload a changed file via WinSCP and the change does not show up on page reload.

                              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

                                @sourceminer Let me know if you’re fine with me marking this solved…

                                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
                                  sourceminer
                                  last edited by

                                  @Sebastian-Roth is there any way to have the GRUB Try to boot to hd0 and if it fails boot to hd1?

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

                                    @sourceminer There is a GRUB4DOS (that’s what it actually is, so it’s not a full blown official GRUB binary) command called fallback. Description reads like that:

                                    Go into unattended boot mode: if the default boot entry has any errors,
                                    instead of waiting for the user to do anything, it immediately starts
                                    over using the NUM entry (same numbering as the ‘default’ command).
                                    This obviously won’t help if the machine was rebooted by a kernel that
                                    GRUB loaded.

                                    I myself haven’t tried that yet. You might give it a go. Though I am not sure how the numbers are for how we use GRUB4DOS on the command line rather than a real config file.

                                    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
                                      sourceminer
                                      last edited by

                                      OK I will check that out first before marking as solved… just incase someone else wants to do the same thing. This company is to damn cheap to get new 100 dollar machines to replace the 30 thin clients… BAUGH… yes I agree its not the norm but I know Fog can do it… It can do anything 🙂

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

                                      276

                                      Online

                                      12.0k

                                      Users

                                      17.3k

                                      Topics

                                      155.2k

                                      Posts
                                      Copyright © 2012-2024 FOG Project