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

    Fog 0.33b edit PXE menu

    Scheduled Pinned Locked Moved
    General
    16
    67
    39.7k
    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.
    • Tom ElliottT
      Tom Elliott
      last edited by

      You should try to mess with the file that creates the iPXE stuff as it’s very picky about how it operates. However, need2 is correct in the best method.

      Also see this post on what to add.
      [url]http://fogproject.org/forum/threads/switching-to-gpxelinux.3995/page-2#post-26341[/url]

      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
      • J
        jbsclm Developer
        last edited by

        Further to what Tom says, as you have noticed ipxe has a completely different menu structure to pxelinux which 0.32 used.
        If you set anything in the fog settings->pxe boot menu->advanced configuration menu a new item (advanced) will appear at the bottom of the first level menu.
        What you have to do is make sure that what you put in the advanced configuration menu is a valid ipxe menu.

        The example from the above post is below, note that the code inserts #!ipxe as the first line.

        :MENU
        menu
        item example1 Boot to disk
        item example2 Iso Boot
        item example3 Example Text 3
        :example1
        sanboot --no-describe --drive 0x80 || goto MENU
        :example2
        kernel memdisk iso raw
        initrd win764.iso
        boot || goto MENU
        :example3
        kernel memdisk iso raw
        initrd win8-164.iso
        boot || goto MENU
        autoboot

        It is useful to point you browser at the following urls, you can then see what is returned as the menu.
        [url]http://<fog[/url] ip>/fog/service/ipxe/boot.php for the initial menu.
        [url]http://<fog[/url] ip>/fog/service/ipxe/advanced.php for the advanced.

        you need to make sure that the files you are trying to use, (initrd, win764 etc) , can be accessed via http,

        The example below is an adaptation of one I have used at work, I’ve not tested it in this form, but you would need to copy memdisk and the diags files to a fog/dell folder in the apache folder.
        Don’t forget to change the ip address below to that of your fog server.

        set fog-server 192.168.1.11
        set boot-url [url]http://${fog-server}/fog/[/url]

        FONT=Courier Newmenu Imaging and Diagnostics[/FONT]

        FONT=Courier Newitem dell1 Dell Diags - GX760 GX380 E5400 XT2 E4200[/FONT]
        FONT=Courier Newitem dell2 Dell Diags - D4x0 D600-D630 GX240-GX755 P370-T3400[/FONT]
        FONT=Courier Newitem dell3 Dell Diags - XT[/FONT]
        FONT=Courier Newitem dell4 Dell Diags - T1500[/FONT]
        FONT=Courier New#item foginfo FOG system info[/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier Newitem shell shell[/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier Newchoose fog-opt && goto ${fog-opt}[/FONT]
        FONT=Courier New [/FONT]

        FONT=Courier New [/FONT]
        FONT=Courier New:dell1[/FONT]
        FONT=Courier Newkernel ${boot-url}fog/dell/memdisk raw[/FONT]
        FONT=Courier Newinitrd ${boot-url}fog/dell/diags1.img [/FONT]
        FONT=Courier Newboot[/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New:dell2[/FONT]
        FONT=Courier Newkernel ${boot-url}fog/dell/memdisk raw[/FONT]
        FONT=Courier Newinitrd ${boot-url}fog/dell/diags2.img [/FONT]
        FONT=Courier Newboot[/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New:dell3[/FONT]
        FONT=Courier Newkernel ${boot-url}fog/dell/memdisk raw[/FONT]
        FONT=Courier Newinitrd ${boot-url}fog/dell/diags3.img [/FONT]
        FONT=Courier Newboot[/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New:dell4[/FONT]
        FONT=Courier Newkernel ${boot-url}fog/dell/memdisk raw[/FONT]
        FONT=Courier Newinitrd ${boot-url}fog/dell/diags4.img [/FONT]
        FONT=Courier Newboot[/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New:foginfo[/FONT]
        FONT=Courier Newkernel ${boot-url}fog/kernel/bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web=${fog-server}/fog/ loglevel=4 consoleblank=0 mode=sysinfo[/FONT]
        FONT=Courier Newinitrd ${boot-url}fog/images/init.gz [/FONT]
        FONT=Courier Newboot[/FONT]
        FONT=Courier New [/FONT]
        FONT=Courier New:shell[/FONT]
        FONT=Courier Newshell[/FONT]

        Hope this helps

        1 Reply Last reply Reply Quote 0
        • Jaymes DriverJ
          Jaymes Driver Developer
          last edited by

          [quote=“jbsclm, post: 26417, member: 3158”]Further to what Tom says, as you have noticed ipxe has a completely different menu structure to pxelinux which 0.32 used.
          If you set anything in the fog settings->pxe boot menu->advanced configuration menu a new item (advanced) will appear at the bottom of the first level menu.
          What you have to do is make sure that what you put in the advanced configuration menu is a valid ipxe menu.

          The example from the above post is below, note that the code inserts #!ipxe as the first line.

          …[/quote]

          Very informative, I know this will be of use to me in the near future thank you!

          WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

          1 Reply Last reply Reply Quote 0
          • JunkhackerJ
            Junkhacker Developer
            last edited by

            i feel i should point out that yesterday Tom and I came up with an idea and added it to the advanced.php file.
            [CODE]print “set fog-ip “.$FOGCore->getSetting(‘FOG_WEB_HOST’).”\n”;
            print “set fog-webroot “.basename($FOGCore->getSetting(‘FOG_WEB_ROOT’)).”\n”;
            [/CODE]
            have been added so that you may use the ipxe variables “fog-ip” and “fog-webroot” for the creation of menus. here is a usable example that you should be able to paste into your advanced menu setting field without modification.
            [CODE]:MENU
            menu
            item --gap – ---------------- iPXE boot menu ----------------
            item ipxedemo ipxe online boot demo
            item shell ipxe shell
            item return return to previous menu
            choose --default return --timeout 5000 target && goto ${target}

            :ipxedemo
            chain http://boot.ipxe.org/demo/boot.php ||
            goto MENU

            :shell
            shell ||
            goto MENU

            :return
            chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
            prompt
            goto MENU

            autoboot[/CODE]

            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
            • JunkhackerJ
              Junkhacker Developer
              last edited by

              here is an example of a menu for loading WinPE based ISO disks from a folder named ISO in the root of the web server
              [CODE]:MENU
              menu
              item --gap – ---------------- iPXE boot menu ----------------
              item WIN7PE64BIT Boot Windows 7 64 bit iso
              item WIN7PE32BIT Boot Windows 7 32 bit iso
              item shell ipxe shell
              item return return to previous menu
              choose --default WIN7PE64BIT --timeout 5000 target && goto ${target}

              :WIN7PE64BIT
              initrd http://${fog-ip}/ISO/Win7PE_x64.ISO
              chain memdisk iso raw ||
              goto MENU

              :WIN7PE32BIT
              initrd http://${fog-ip}/ISO/Win7PE_x86.ISO
              chain memdisk iso raw ||
              goto MENU

              :ipxedemo
              chain http://boot.ipxe.org/demo/boot.php ||
              goto MENU

              :shell
              shell ||
              goto MENU

              :return
              chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
              prompt
              goto MENU

              autoboot[/CODE]

              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
              • N
                need2 Moderator
                last edited by

                My only regret is that I can only give a post one ‘like’.

                1 Reply Last reply Reply Quote 0
                • JunkhackerJ
                  Junkhacker Developer
                  last edited by

                  a bunch of people liked those, so i’ll give you one more just to show more with ipxe

                  [CODE]
                  :MENU
                  menu
                  item --gap – ---------------- iPXE boot menu ----------------
                  item ipxedemo ipxe online boot demo
                  item shell ipxe shell
                  item return return to previous menu
                  item hostinfo details about this computer
                  choose --default return --timeout 5000 target && goto ${target}

                  :ipxedemo
                  chain http://boot.ipxe.org/demo/boot.php ||
                  goto MENU

                  :shell
                  shell ||
                  goto MENU

                  :return
                  chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
                  prompt
                  goto MENU

                  :hostinfo
                  echo This computer : ||
                  echo MAC address…${net0/mac} ||
                  echo IP address…${ip} ||
                  echo Netmask…${netmask} ||
                  echo Serial…${serial} ||
                  echo Asset number…${asset} ||
                  echo Manufacturer…${manufacturer} ||
                  echo Product…${product} ||
                  echo BIOS platform…${platform} ||
                  echo ||
                  echo press any key to return to Menu ||
                  prompt
                  goto MENU

                  autoboot
                  [/CODE]

                  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
                  • D
                    d31b0y
                    last edited by

                    Could someone do an entry for GParted? The [URL=‘http://www.fogproject.org/wiki/index.php?title=Include_GParted’]Include Gparted[/URL] wiki page is out of date now and I can’t get the ISO to boot properly using the methods above.
                    I get as far as the GParted grub menu but once I try to boot to gparted, I get pages of
                    [CODE]modprobe: module unknown not found in modules.dep[/CODE]
                    followed by a blackscreen.

                    iPXE menu entry below
                    [CODE]:gparted
                    initrd http://${fog-ip}/ISO/gparted-live-0.18.0-2-i486.iso
                    chain memdisk iso raw ||
                    goto MENU[/CODE]

                    I found this which appears to be the same issue (a memdisk issue) but I am not sure how to implement the fix.
                    [url]http://gparted-forum.surf4.info/viewtopic.php?id=16884[/url]

                    1 Reply Last reply Reply Quote 0
                    • D
                      d31b0y
                      last edited by

                      UPDATE; I got it working.
                      I copied vmlinuz, initrd.img and filesystem.squashfs from gparted into /var/www/fog/gparted/
                      and then updated my iPXE menu as follows:

                      kernel http://${fog-ip}/fog/gparted/vmlinuz
                      initrd http://${fog-ip}/fog/gparted/initrd.img
                      imgargs vmlinuz boot=live config union=aufs noswap noprompt vga=788 fetch=http://${fog-ip}/fog/gparted/filesystem.squashfs
                      boot[/CODE]

                      All tested and working now.

                      1 Reply Last reply Reply Quote 0
                      • aruhunoA
                        aruhuno
                        last edited by

                        Hi!
                        To contribute a little, here is my advanced menu:
                        [CODE]# Chemin de boot de FOG
                        set boot_url http://${fog-ip}/fog_boot/
                        set boot_nfs ${fog-ip}:/images/fog_boot/

                        Détection de l’architecture

                        isset ${arch} && goto skip_arch_detect ||
                        cpuid --ext 29 && set arch x86_64 || set arch i386
                        :skip_arch_detect

                        :MENU
                        menu
                        item --gap – --------------------- Outils ---------------------
                        item SystemRescueCD Lancer SystemRescueCD (${arch})
                        item --gap –
                        item Debian Installer Debian Stable
                        item WS2008R2 Installer Windows Server 2008R2
                        item WS2012R2 Installer Windows Server 2012R2
                        #item --gap –
                        #item lubuntu32 Lubuntu 14.04 LTS (32 bits)
                        item --gap –
                        item retour Retouner au menu principal
                        choose --default SystemRescueCD --timeout 10000 target && goto ${target}

                        :SystemRescueCD
                        initrd ${boot_url}sysrescuecd/initram.igz
                        kernel ${boot_url}sysrescuecd/rescue_${arch} scandelay=1 dostartx docache nfsboot=${boot_nfs}sysrescuecd/ setkmap=fr
                        boot
                        goto MENU

                        :Debian
                        #set dir ${dir}${menu}-installer/${arch_a}/
                        imgfree
                        kernel http://ftp.fr.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux priority=low ${desktop_param} – quiet ${params}
                        initrd http://ftp.fr.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
                        boot

                        :WS2008R2
                        sanboot ${boot_url}discimg/WS2008R2.iso
                        goto MENU

                        :WS2012R2
                        sanboot ${boot_url}discimg/WS20128R2.iso
                        goto MENU

                        :precedent
                        chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
                        prompt
                        goto MENU

                        autoboot[/CODE]

                        "Parce que la connaissance appartient à tout le monde", inios.fr

                        1 Reply Last reply Reply Quote 0
                        • D
                          domii666
                          last edited by

                          where must i copy the iso files?

                          Grezz

                          1 Reply Last reply Reply Quote 0
                          • JunkhackerJ
                            Junkhacker Developer
                            last edited by

                            to whatever location you specified in the 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
                            • D
                              domii666
                              last edited by

                              okay. i saved the iso under var/www/fog/Win7AIO/WindowsAIO.iso. but it doesnt work.

                              :MENU
                              menu
                              item --gap – ---------------- iPXE boot menu ----------------
                              item WIN7PE64BIT Boot Windows 7 64 bit iso
                              item WIN7PE32BIT Boot Windows 7 32 bit iso
                              item shell ipxe shell
                              item return return to previous menu
                              choose --default WIN7PE64BIT --timeout 5000 target && goto ${target}

                              :WIN7PE64BIT
                              initrd var/www/fog/Win7AIO/WindowsAIO.iso
                              chain memdisk iso raw ||
                              goto MENU

                              :WIN7PE32BIT
                              initrd [url]http://${fog-ip}/ISO/Win7PE_x86.ISO[/url]
                              chain memdisk iso raw ||
                              goto MENU

                              :ipxedemo
                              chain [url]http://boot.ipxe.org/demo/boot.php[/url] ||
                              goto MENU

                              :shell
                              shell ||
                              goto MENU

                              :return
                              chain [url]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac}[/url] ||
                              prompt
                              goto MENU

                              autoboot

                              1 Reply Last reply Reply Quote 0
                              • D
                                domii666
                                last edited by

                                pls help

                                1 Reply Last reply Reply Quote 0
                                • J
                                  jbsclm Developer
                                  last edited by

                                  The client doesn’t understand paths on the fog server, only http paths.

                                  :WIN7PE64BIT
                                  initrd var/www/fog/Win7AIO/WindowsAIO.iso
                                  chain memdisk iso raw ||
                                  goto MENU

                                  Needs to be

                                  :WIN7PE64BIT
                                  initrd [URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${fog-ip}/${fog-webroot}[/URL]/Win7AIO/WindowsAIO.iso
                                  chain memdisk iso raw ||
                                  goto MENU

                                  OR

                                  :WIN7PE64BIT
                                  initrd [URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${fog-ip}/fog[/URL]/Win7AIO/WindowsAIO.iso
                                  chain memdisk iso raw ||
                                  goto MENU

                                  Both should tell the client to look in the same place, although the first form is preferable.

                                  If this fails check your apache log, it will tell you where i is looking for the iso.

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    domii666
                                    last edited by

                                    okay thx, where i find the apache log?

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      jbsclm Developer
                                      last edited by

                                      The log location is os dependent,

                                      Debian based Location (normally)
                                      /var/log/apache2
                                      Redhat based Location (normally)
                                      /var/log/httpd

                                      there are 2 logs, access.log and error.log.

                                      The messages you need will probably be in the access log, search for WindowsAIO.iso starting at the end, you should see a status 404, which says not found
                                      You can test by typing the following in to your browser

                                      [URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://<fog_ip_address>/fog[/URL]/Win7AIO/WindowsAIO.iso
                                      replacing <fog_ip_address> with your fog server ip.

                                      eg
                                      [URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://192.168.3.11/fog[/URL]/Win7AIO/WindowsAIO.iso

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        domii666
                                        last edited by

                                        my fog ip is 192.168.2.100

                                        is this correct? [URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${fog-ip}/${fog-webroot}[/URL]/Win7AIO/WindowsAIO.iso

                                        or [URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${192.168.2.100}/${fog-webroot}[/URL]/Win7AIO/WindowsAIO.iso

                                        1 Reply Last reply Reply Quote 0
                                        • JunkhackerJ
                                          Junkhacker Developer
                                          last edited by

                                          the first of those two is correct, assuming that you have that file located in /var/www/fog/Win7AIO/WindowsAIO.iso
                                          [URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]${fog-ip}[/URL] is a variable set to your server’s IP, in your case “fog”
                                          [URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]${fog-webroot}[/URL] is a variable set to the root of your fog installation, in your case “192.168.2.100”

                                          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
                                          • D
                                            domii666
                                            last edited by

                                            when i type [url]http://192.168.2.100/ISO/Windows8x64.iso[/url] it will start the download…i think it work but in the fog menu it goes direclty back to the menu.

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

                                            223

                                            Online

                                            12.1k

                                            Users

                                            17.3k

                                            Topics

                                            155.3k

                                            Posts
                                            Copyright © 2012-2024 FOG Project