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

Boot from USB-Stick to get FOG menu for machines without PXE

Scheduled Pinned Locked Moved Solved
FOG Problems
4
11
7.4k
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.
  • X
    x9rok
    last edited by Nov 22, 2015, 3:49 PM

    Hi,

    i’m looking for a solution to boot machines without PXE-function and get the FOG-menu. (Register Host, Imaging Restoring and so on)

    At first i tried it with gpxe (iso which emulate a pxe boot process), but this doesn’t work.
    Then i read that it’s better to realize this with ipxe. So i followed this article: https://forums.fogproject.org/topic/4782/help-usb-boot-fog/27 but it don’t works full.

    I get an IP via dhcp, this is ok. But what i have to do to get the FOG-menu ?

    I cloned the ipxe repository from git and so on.

    Editing the ipxescript

    #!ipxe
    dhcp
    –> And now what i have to put there ? bzImage, init.xz or boot.php ???
    –> My knowledge fails here 😄

    After this i would create the the iso for my bootable stick with make bin/ipxe.iso EMBED=ipxescript.

    Have anyone some ideas ?
    Is there someone with the same requirement ?

    About an answer or help i would be very happy.

    Thanks.

    Richi

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth Nov 22, 2015, 1:22 PM Nov 22, 2015, 7:22 PM

      @x9rok Take a look at this ipxe script: http://sourceforge.net/p/freeghost/code/HEAD/tree/trunk/src/ipxe/src/ipxescript

      This is what is usually included (embedded) in the ipxe binaries loaded via PXE. The important part you are looking for is chain tftp://x.x.x.x/default.ipxe

      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
      • G
        george1421 Moderator
        last edited by Nov 22, 2015, 8:06 PM

        Funny I was just discussing this the other day with a colleague. I haven’t had a chance to put together a POC yet on this. But the general idea is to create the ipxe boot image on the usb device and then chain to the fog server using the command like Sebastian posted. On your USB boot stick you want to enter something like this: (Understand this just came out of my head, and may be filled with bugs).

        set fogserver:ipv4 <ip_addr_fog_server>
        set next-server ${fogserver}
        chain tftp://${fogserver}/undionly.kxpe
        

        That “should” tell the ipxe client using the boot media to chain to the fog server. Then the fog server will take over from there.

        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
        • G
          george1421 Moderator
          last edited by Nov 22, 2015, 8:09 PM

          This one may actually work a bit better since it should connect you right to the FOG menu

          set fogserver:ipv4 <ip_addr_fog_server>
          set next-server ${fogserver}
          chain http://${fogserver}/fog/service/ipxe/boot.php?mac=${net0/mac}
          

          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
          • J
            jbsclm Developer
            last edited by Nov 22, 2015, 8:19 PM

            I did one a couple of years ago, you could give it a try to see if it still works.

            The zip contains an iso which you can burn to usb, and also instructions on how to build it.

            https://forums.fogproject.org/topic/4253/physical-boot-disk-for-imaging
            0_1448223513202_ipxe_ask33.zip

            G X 2 Replies Last reply Nov 22, 2015, 9:14 PM Reply Quote 2
            • G
              george1421 Moderator @jbsclm
              last edited by Nov 22, 2015, 9:14 PM

              @jbsclm interesting, I’ll have to give it a spin on Monday. The discussion with my colleague was about finding a way to uefi boot systems that have a broken net boot under uefi. This may be adapted to help with that issue too.

              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
              • X
                x9rok
                last edited by Nov 23, 2015, 5:29 PM

                First of all thanks for all answers.

                @Sebastian Roth

                i tried your solution and it fails. But i’m sure that is running. Because i tried the ISO from jbsclm --> “0_1448223513202_ipxe_ask33.zip” this works. It is nearly the same with some modifications (echos, reads, gotos and so on, and at the end of the code, there is also the command chain tftp://…). So this problem is solved.

                The ISO from “jbsclm” is very good (Thanks! FYI it still works) but for my requirements it’s not enough.
                Because of this i want to create my own ipxe script.
                Now i think the way how i’m building / creating the ipxe.iso is wrong.

                Here some basic information:

                • CentOS 6.7
                • cloned git repository ipxe

                Here are my steps, how i’m building the ipxe.iso

                1. editing the ipxescript for example:
                !#ipxe
                dhcp && goto bootup || 
                echo FAIL
                
                :bootup
                echo Enter the IP-Address of the FOG-Server
                read fog-server
                chain http://${fog-server}/fog/service/ipxe/boot.php$mac=${net0/mac}
                

                Everything as root…
                2. make bin/ipxe.iso EMBED=ipxescript

                1. copy created ipxe.iso from /ipxe/src/bin/ipxe.iso to some temp folder

                2. create bootable stick or CD/DVD

                3. try the ISO

                My result: When i’m booting from the stick i see:

                ISOLINUX …
                iPXE ISO boot image
                Loading ipxe.krn…ready.
                _

                And then the machine reboot automatically and this never stops.

                Do i’m making something wrong ?

                Thanks.

                Richi

                1 Reply Last reply Reply Quote 0
                • X
                  x9rok @jbsclm
                  last edited by Nov 24, 2015, 11:57 AM

                  @all

                  Here some new information.

                  I tried another way to build my ipxe.iso. I tested rom-o-matic and included my ipxescript. It works but tomorrow i have to do further tests. But i’m still interested for some tips how to build it on centos.

                  @jbsclm

                  I used your script for some tests. For example:

                  1. Removable USB-Stick is set to the first boot-device in Bios --> OK
                  2. Hard Disk is set to second boot-device in Bios --> OK
                  3. Boot from USB-Stick to get an IP and FOG menu --> OK
                  4. If a task was generated on the FOG-Server, the task will run. -->
                  5. If no Task was generated on the FOG-Server, the client should boot from local hard disk. After 20 seconds the clients tries to start again from the usb-flashdisk.

                  ISOLINUX …
                  iPXE ISO boot image
                  Loading ipxe.krn…ready.

                  And then nothing.

                  @jbsclm Did you have the same problem ?

                  Thank.

                  J 1 Reply Last reply Nov 24, 2015, 6:39 PM Reply Quote 0
                  • G
                    george1421 Moderator
                    last edited by Nov 24, 2015, 1:15 PM

                    One comment here. You don’t need to change the boot order to the USB. Most systems will let you temporarly change the boot order by pressing F12 or F10 during the bios post test. From there you can select your boot media. This is a one time change. On the next reboot (unless you press the boot menu key again) it will return to the normal boot sequence.
                    .

                    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
                    • J
                      jbsclm Developer @x9rok
                      last edited by Nov 24, 2015, 6:39 PM

                      @x9rok
                      It is some while since I last used it, but from what I remember, if there was no task for the PC you should get the FOG menu, which would then time out after the period set in the FOG GUI, if you didn’t select an option.
                      If you don’t get the FOG menu then it may be that the ipxe script needs changing to pass extra parameters to boot.php.
                      If the reboot is caused by the timeout expiring, then it could be that the network card is left in a funny state by the previous boot attempt.

                      As per the comment from george1421, you don’t need to change the boot order, F10 or F12 should get you a boot menu, depending on the BIOS. We used Dell PCs, and it was F12 for them.
                      You really don’t want usb at the top of the boot order, as if you forget to change it back, it is security hole.
                      It is worth making your BIOS password protected and only having Hard Disk on the boot device list, that way only authorised people can boot from anything other than the Hard Disk.

                      G 1 Reply Last reply Nov 24, 2015, 7:21 PM Reply Quote 1
                      • G
                        george1421 Moderator @jbsclm
                        last edited by Nov 24, 2015, 7:21 PM

                        @jbsclm said:

                        @x9rok
                        It is some while since I last used it, but from what I remember, if there was no task for the PC you should get the FOG menu, which would then time out after the period set in the FOG GUI, if you didn’t select an option.
                        If you don’t get the FOG menu then it may be that the ipxe script needs changing to pass extra parameters to boot.php.

                        OP: From my post below the boot.php script is looking for the mac parameter to be passed to it. Without that I might understand why you are getting a different reaction.

                        http://${nextserver}/fog/service/ipxe/boot.php?mac=${net0/mac}

                        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 1
                        • 1 / 1
                        1 / 1
                        • First post
                          2/11
                          Last post

                        227

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project