PXE boot menu order



  • Re: Change menu boot order

    I thought I had seen some options in the current version (1.5.5) to reorder the menu, but I’m not finding them. I found the thread above from about a year ago, with the suggestion that it’s not worth time/effort to implement, and explaining the difficulty when determining whether a host is registered or not, etc.

    My ideal would be that first boot into FOG’s PXE menu would default to full host registration. Once registered, the next time it could default to booting to the drive (which is fine, since tasks preclude the menu, so if you requested an image deployment during registration, that would proceed).

    Another idea I would like to see if possible is to update the BIOS/UEFI boot order when finished. That way, I could receive a new computer, set LAN as the first boot item, then restart. Type in my registration info, request deployment, and restart. Image the computer, restart, update the BIOS/UEFI. Connect to AD, run Snapins, restart as needed, finish.



  • Hey Sebastian, thanks for the response. Some external vendors nuked our network over the weekend while performing some kind of maintenance in the data center, so I’m without access to the FOG server until the pieces can be mended. I’ll get back to you with the info once I can. They worked through the night and the network is 98% functional! Here’s what you asked for:

    #!ipxe
    set fog-ip 172.17.207.144
    set fog-webroot fog
    set boot-url http://${fog-ip}/${fog-webroot}
    cpuid --ext 29 && set arch x86_64 || set arch i386
    goto get_console
    :console_set
    colour --rgb 0x00567a 1 ||
    colour --rgb 0x00567a 2 ||
    colour --rgb 0x00567a 4 ||
    cpair --foreground 7 --background 2 2 ||
    goto MENU
    :alt_console
    cpair --background 0 1 ||
    cpair --background 1 2 ||
    goto MENU
    :get_console
    console --picture http://172.17.207.144/fog/service/ipxe/bg.png --left 100 --right 80 && goto console_set || goto alt_console
    :MENU
    menu
    colour --rgb 0x00567a 0 ||
    cpair --foreground 1 1 ||
    cpair --foreground 0 3 ||
    cpair --foreground 4 4 ||
    item --gap Host is registered as LNPC08CU55!
    item --gap -- -------------------------------------
    item fog.local Boot from hard disk
    item fog.memtest Run Memtest86+
    item fog.keyreg Update Product Key
    item fog.deployimage Deploy Image
    item fog.multijoin Join Multicast Session
    item fog.quickdel Quick Host Deletion
    item fog.sysinfo Client System Information (Compatibility)
    choose --default fog.reginput --timeout 3000 target && goto ${target}
    :fog.local
    sanboot --no-describe --drive 0x80 || goto MENU
    :fog.memtest
    kernel memdisk initrd=memtest.bin iso raw
    initrd memtest.bin
    boot || goto MENU
    :fog.keyreg
    login
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param username ${username}
    param password ${password}
    param keyreg 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    param sysuuid ${uuid}
    :fog.deployimage
    login
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param username ${username}
    param password ${password}
    param qihost 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    param sysuuid ${uuid}
    :fog.multijoin
    login
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param username ${username}
    param password ${password}
    param sessionJoin 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    param sysuuid ${uuid}
    :fog.quickdel
    login
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param username ${username}
    param password ${password}
    param delhost 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    param sysuuid ${uuid}
    :fog.sysinfo
    kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=http://172.17.207.144/fog/ consoleblank=0 rootfstype=ext4 storage=172.17.207.144:/images/ storageip=172.17.207.144 loglevel=4 mode=sysinfo
    imgfetch init_32.xz
    boot || goto MENU
    :bootme
    chain -ar http://172.17.207.144/fog/service/ipxe/boot.php##params ||
    goto MENU
    autoboot
    

  • Developer

    @ckasdf Please open the following URL in your browser and you should get some text code back. Please copy & paste all that text in the forums here.

    http://172.17.207.144/fog/service/ipxe/boot.php?mac=50:7b:9d:43:e0:25



  • @Sebastian-Roth I was able to capture it on video finally. :)

    Video of the issue


  • Developer

    @ckasdf Please send us a picture of that or even better a video!



  • One other question along this line of discussion: I’ve noticed when I choose “Boot from hard disk” in the FOG PXE menu, it goes to a black background, white text, with items that look similar to the regular menu, and a countdown timer that keeps looping 3,2,1,3,2,1… without actually booting to the drive. I can get a picture later, but have you seen that / know what the issue is?

    Bump.



  • Flash BIOS/firmware or change boot order?

    I want to change boot order, but I understand it would be vendor specific. I brought it up, as I remember reading a thread where the BIOS was changing after deployment, and it was an undesired action for them, but in my situation, I’d want it to change. I’ll set that aside for now, though.

    … fog.reginput and check Default Item there. …

    Hey, this worked, thanks!

    One other question along this line of discussion: I’ve noticed when I choose “Boot from hard disk” in the FOG PXE menu, it goes to a black background, white text, with items that look similar to the regular menu, and a countdown timer that keeps looping 3,2,1,3,2,1… without actually booting to the drive. I can get a picture later, but have you seen that / know what the issue is?


  • Developer

    @ckasdf said in PXE boot menu order:

    update the BIOS/UEFI

    What exactly do you mean by that? Flash BIOS/firmware or change boot order? Both things cannot be handled in general code for all hardware vendors so you’d have to implement that for your specific hardware.

    My ideal would be that first boot into FOG’s PXE menu would default to full host registration

    Go to the web UI -> FOG Configuration -> iPXE Menu Item Settings -> fog.reginput and check Default Item there. Unknown hosts will boot into registration as default then.


Log in to reply
 

481
Online

5.8k
Users

13.1k
Topics

123.1k
Posts