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

    Fog 0.33b edit PXE menu

    Scheduled Pinned Locked Moved
    General
    16
    67
    38.8k
    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.
    • E
      Eli Kelly
      last edited by

      This is working pretty well for me. Much credit to others on this forum who came up with most of this…

      [CODE]login && goto validate || goto return

      :validate
      iseq ${password} yourpasswordhere && goto MENU || goto return

      :MENU
      menu
      item --gap – ---------------- iPXE boot menu ----------------
      item ipxedemo ipxe online boot demo
      item shell ipxe shell
      item pe86 Generic WinPE x86
      item lt86 MDT Lite Touch x86
      item lt64 MDT Lite Touch x64
      item ghost Ghost Boot
      item dban Derek’s Boot and Nuke
      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

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

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

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

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

      :dban
      initrd http://${fog-ip}/ISO/dban.iso
      chain memdisk iso raw ||
      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
      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]

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

        remember though, that this method is only a mild level of security being added. if anyone goes to
        [FONT=Consolas][url]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php[/url][/FONT]
        they will see the password in plain text

        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
        • x23piracyX
          x23piracy
          last edited by

          Hi,

          [quote=“Junkhacker, post: 33174, member: 21583”]if anyone goes to
          [FONT=Consolas][url]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php[/url][/FONT]
          they will see the password in plain text[/quote]

          really? a webserver should never delivery a php file contents cleartext.

          Regards X23

          ║▌║█║▌│║▌║▌█

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

            that file generates the fog boot menu, which is a plain text file generated with php
            [FONT=Consolas]iseq ${password} yourpasswordhere && goto MENU || goto return[/FONT]
            is ipxe script code in plain text

            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
            • Tom ElliottT
              Tom Elliott
              last edited by

              In svn, I’ve added the ability to set the menu itself as either login or no login. I’m not going to work, quite yet, on the individual advanced menu password requirements.

              Hopefully this will help people out.

              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
              • x23piracyX
                x23piracy
                last edited by

                [quote=“Tom Elliott, post: 33187, member: 7271”]Hopefully this will help people out.[/quote]

                Works

                ║▌║█║▌│║▌║▌█

                1 Reply Last reply Reply Quote 0
                • L
                  Levi Smith
                  last edited by

                  Thanks for the responses everyone. I really appreciate it. Hiding the menu works for the time being, but having the ability to pick and choose which menu items have it, and which don’t down the road would be most welcome.

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

                    I’ve now added the ability to add “individual” password login settings to menu items
                    My current menu that is tested and working, although very minimal, is:
                    [code]isset ${userID} && goto do_me || goto MENU
                    :do_me
                    kernel bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns=10.10.10.1 web=10.10.10.118/fog/ consoleblank=0 loglevel=4 type=down img=win7actsysprep ftp=10.10.10.118 imgType=n osid=7 storage=10.10.10.118:/images capone=1 imgFormat=0
                    imgfetch init.xz && boot || goto MENU
                    :MENU
                    menu
                    item --gap Please Select one of the images below
                    item fog.local Boot from hard disk
                    item d101_64 D101 Base Image (64 bit load)
                    item return Return to main menu
                    choose --default fog.local target && goto ${target}
                    :fog.local
                    sanboot --no-describe --drive 0x80 || goto MENU
                    :d101_64
                    chain -ar ${boot-url}/service/ipxe/advanced.php?login=1 || goto MENU
                    :return
                    chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} || goto MENU
                    autoboot[/code]

                    Notice the :d101_64 how it has the chain -ar ${boot-url}/service/ipxe/advanced.php?login=1 || goto MENU ?That’s all that’s needed to have a “login” for your menu item. Notice the top where it says :do_me? This is important to note that it’s ABOVE the menu generation part of the advanced menu setup.

                    As I stated, this is very basic, but a method to :sort: the different functions could be:
                    [code]isset ${userID} && iseq ${bootnum} 1 && goto do_me ||
                    isset ${userID} && iseq ${butnum} 2 && goto do_me2 ||
                    goto MENU
                    :do_me
                    kernel bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns=10.10.10.1 web=10.10.10.118/fog/ consoleblank=0 loglevel=4 type=down img=win7actsysprep ftp=10.10.10.118 imgType=n osid=7 storage=10.10.10.118:/images capone=1 imgFormat=0
                    imgfetch init.xz && boot || goto MENU
                    :do_me2
                    kernel bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns=10.10.10.1 web=10.10.10.118/fog/ consoleblank=0 loglevel=4 type=down img=blahblah ftp=10.10.10.118 imgType=n osid=7 storage=10.10.10.118:/images capone=1 imgFormat=0
                    imgfetch init.xz && boot || goto MENU
                    :MENU
                    menu
                    item --gap Please Select one of the images below
                    item fog.local Boot from hard disk
                    item d101_64 D101 Base Image (64 bit load)
                    item return Return to main menu
                    choose --default fog.local target && goto ${target}
                    :fog.local
                    sanboot --no-describe --drive 0x80 || goto MENU
                    :d101_64
                    set bootnum 1
                    chain -ar ${boot-url}/service/ipxe/advanced.php?login=1 || goto MENU
                    :d102_64
                    set bootnum 2
                    chain -ar ${boot-url}/service/ipxe/advanced.php?login=1 || goto MENU
                    :return
                    chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} || goto MENU
                    autoboot[/code]

                    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
                    • T
                      TheFunk
                      last edited by

                      What’s the difference between Aru’s method of booting (sanboot) and Junkhacker’s method (initrd and chain memdisk) when it comes to booting a Windows iso? I have an image of my Windows 7 installer disk, and was wondering.

                      Edit: I done goofed.

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jose Antonio Sanchez
                        last edited by

                        [quote=“madskillz23, post: 28476, member: 8206”]Awesome, that got me most of the way there. Now its just messing around with kernel arguments for the two Ubuntu distros. But, I did get Xubuntu 13.04 working with the following code in case anyone else finds it useful:

                        [CODE]:Xubuntu 13.04
                        kernel ${boot_url}/xubuntu/casper/vmlinuz root=/dev/nfs/ boot=casper netboot=nfs nfsroot=xxx.xxx.xxx.xxx:/images/xubuntu/
                        initrd http://xxx.xxx.xxx.xxx/fog/service/ipxe/xubuntu/casper/initrd.lz
                        boot
                        [/CODE]

                        Thanks for all the help![/quote]

                        madskillz23,

                        Did you get Ubuntu 14.04 to boot??

                        I extracted all the files from the ISO and put them into /images/ubuntu14041/ and it tries to boot but I get the “(initramfs) Unable to find a live file system on the network” message…

                        1 Reply Last reply Reply Quote 0
                        • M
                          madskillz23
                          last edited by

                          [quote=“Jose Antonio Sanchez, post: 35731, member: 25349”]madskillz23,

                          Did you get Ubuntu 14.04 to boot??

                          I extracted all the files from the ISO and put them into /images/ubuntu14041/ and it tries to boot but I get the “(initramfs) Unable to find a live file system on the network” message…[/quote]

                          I am pretty sure these work. Let me know if they don’t though and I should be able to find the backup copy of the arguments.
                          [CODE]:Xubuntu14
                          kernel ${boot_url}/xubuntu14.04/casper/vmlinuz.efi root=/dev/nfs/ boot=casper netboot=nfs nfsroot=${boot_nfs}/xubuntu14.04/
                          initrd ${boot_url}/xubuntu14.04/casper/initrd.lz
                          boot

                          :Ubuntu14
                          kernel ${boot_url}/ubuntu14.04/vmlinuz.efi vga=normal boot=casper netboot=nfs fetch:${boot_url}/ubuntu/casper/filesystem.squashfs nfsroot=${boot_nfs}/ubuntu14.04/
                          initrd ${boot_url}/ubuntu14.04/initrd.lz
                          #imgargs
                          boot[/CODE]

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jose Antonio Sanchez
                            last edited by

                            [quote=“madskillz23, post: 35733, member: 8206”]I am pretty sure these work. Let me know if they don’t though and I should be able to find the backup copy of the arguments.
                            [CODE]:Xubuntu14
                            kernel ${boot_url}/xubuntu14.04/casper/vmlinuz.efi root=/dev/nfs/ boot=casper netboot=nfs nfsroot=${boot_nfs}/xubuntu14.04/
                            initrd ${boot_url}/xubuntu14.04/casper/initrd.lz
                            boot

                            :Ubuntu14
                            kernel ${boot_url}/ubuntu14.04/vmlinuz.efi vga=normal boot=casper netboot=nfs fetch:${boot_url}/ubuntu/casper/filesystem.squashfs nfsroot=${boot_nfs}/ubuntu14.04/
                            initrd ${boot_url}/ubuntu14.04/initrd.lz
                            #imgargs
                            boot[/CODE][/quote]

                            how is ${boot_nfs} built???

                            1 Reply Last reply Reply Quote 0
                            • M
                              madskillz23
                              last edited by

                              set boot_url [url]http://${fog-ip}/fog/service/ipxe[/url]
                              set boot_nfs 128.104.71.88:/images

                              1 Reply Last reply Reply Quote 0
                              • J
                                Jose Antonio Sanchez
                                last edited by

                                [quote=“madskillz23, post: 35736, member: 8206”]set boot_url [url]http://${fog-ip}/fog/service/ipxe[/url]
                                set boot_nfs 128.104.71.88:/images[/quote]

                                /images as in the same as where the computer images get stored and therefore that’s where my /ubuntu folder should be at

                                OR

                                /images as in /var/www/fog/service/ipxe/images/ubuntu

                                1 Reply Last reply Reply Quote 0
                                • M
                                  madskillz23
                                  last edited by

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    Jose Antonio Sanchez
                                    last edited by

                                    Actually, here is my menu… any help appreciated…

                                    I extracted all files from the Ubuntu 14.04.1 i386 to /var/www/fog/service/ipxe/images/ubuntu14041

                                    set boot-url [url]http://${fog-ip}/${fog-webroot}/service/ipxe[/url]
                                    set boot-nfs ${fog-ip}:/${fog-webroot}/service/ipxe
                                    :MENU
                                    menu
                                    item --gap – Boot Menu Advanced
                                    item WinPE7 WinPE 7
                                    item Ubuntu14 Ubuntu 14
                                    item return return to previous menu
                                    choose --default return --timeout 5000 target && goto ${target}

                                    :WinPE7
                                    sanboot ${boot-url}/iso/winpe7.iso
                                    goto MENU

                                    :Ubuntu14
                                    kernel ${boot-url}/images/ubuntu14041/casper/vmlinuz root=/dev/nfs/ vga=normal boot=casper netboot=nfs fetch:${boot_url}/images/ubuntu14041/casper/filesystem.squashfs nfsroot=${boot-nfs}/images/ubuntu14041/
                                    initrd ${boot-url}/images/ubuntu14041/casper/initrd.lz
                                    boot
                                    goto MENU

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      madskillz23
                                      last edited by

                                      [quote=“Jose Antonio Sanchez, post: 35737, member: 25349”]/images as in the same as where the computer images get stored and therefore that’s where my /ubuntu folder should be at
                                      [/quote]
                                      That one.

                                      /var… is boot_url and web directory
                                      /images is where the rest of your images are stored. that should have a fully extracted ubuntu dvd in a directory there. i

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        Jose Antonio Sanchez
                                        last edited by

                                        [quote=“madskillz23, post: 35740, member: 8206”]That one.

                                        /var… is boot_url and web directory
                                        /images is where the rest of your images are stored. that should have a fully extracted ubuntu dvd in a directory there. i[/quote]

                                        By this you mean the following?:

                                        /var/www/fog/service/ipxe/images/ubuntu14041 <- this folder has only these three files: vmlinuz initrd.lz and filesystem.squashfs

                                        /images/ubuntu14041 <- this has the entire contents of the ISO

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          Jose Antonio Sanchez
                                          last edited by

                                          Success!! Ubuntu 14.04.1 i386 Live boots off of iPXE!!!

                                          Thanks to madskillz23

                                          Here is a copy of my Advanced Boot Menu
                                          Note: I have a copy of the CONTENTS of entire ISO of Ubuntu 14.04.1 i386 in both o these locations:

                                          /images/ubuntu14041
                                          and in
                                          /var/www/fog/service/ipxe/images/ubuntu14041

                                          ==================================
                                          set boot-url [url]http://${fog-ip}/${fog-webroot}/service/ipxe[/url]
                                          set boot-nfs ${fog-ip}:/images
                                          :MENU
                                          menu
                                          item --gap – Boot Menu Title
                                          item WinPE7 WinPE 7
                                          item Ubuntu14 Ubuntu 14
                                          item return return to previous menu
                                          choose --default return --timeout 5000 target && goto ${target}

                                          :WinPE7
                                          sanboot ${boot-url}/iso/winpe7.iso
                                          goto MENU

                                          :Ubuntu14
                                          kernel ${boot-url}/images/ubuntu14041/casper/vmlinuz root=/dev/nfs/ boot=casper netboot=nfs nfsroot=${boot-nfs}/ubuntu14041/
                                          initrd ${boot-url}/images/ubuntu14041/casper/initrd.lz
                                          boot
                                          goto MENU

                                          EDIT: Ubuntu 14.04.1 boots but I have no network access no NIC detected???

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            Jose Antonio Sanchez
                                            last edited by

                                            Anyone got Kaspersky Rescue Disc 10 working on iPXE?

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

                                            206

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project