IPXE Menus for Booting Live OS


  • Moderator

    I have been working on adding back in some tools I had available in Fog 0.32, and have been slowed down by the iPXE menu structure. I have figured a couple of images out, but those were plain ISOs I was loading, so it wasn’t that hard.

    But now I have been trying to load the Trinity Rescue Kit (TRK). Sure, I could dump the whole ISO in the RAM, but that is far from ideal due to its size, and requires some fussing with just to get that to work due to how it loads. Before, I had it loading by pointing the PXE menu to its initrd and kernel, and passing some arguments. I have done my best to convert the entry to iPXE, but apparently I am doing it quite wrong since it dumps me back to the default Fog menu the moment I try to boot TRK.

    Here is my current entry for TRK:
    [CODE]:TRK
    kernel ${boot-url}/service/ipxe/trk/kernel.trk
    initrd ${boot-url}/service/ipxe/trk/initrd.trk
    imgargs ramdisk_size=99700 root=/dev/ram0 vga=788 trknfs=192.168.10.86:/trk ip=::::::dhcp splash=verbose pci=conf1 trkmenu ||
    goto MENU[/CODE]


  • Moderator

    The NFS that works is on a Windows server, and the one I haven’t gotten working yet is on the FOG server. And I do have it in the exports file, but come to think of it I should take another look at the settings it has.


  • Developer

    Is the NFS share on a Windows server or your fog server?


  • Senior Developer

    is /trk (or the location referring to it) on the exports file? Just a thought.


  • Moderator

    Just touching base on this one. I continued to have difficulties with the NFS share, so I just cheated and used the Windows Server NFS share I used way back when I was using a hijacked WDS server for my PXE server. Its working like that, but I would like to be able to stop relying on that server before it goes end-of-life. So any suggestions on what permissions and such I should have on the NFS share for the TRK boot folder would be appreciated.


  • Senior Developer

    [S]Are you sure it’s not just a ramdisk size limitation? Right now it’s set to 127MB, maybe up the value if you have spare ram and all have the same amount?[/S]

    Nevermind, I’m an idiot…


  • Moderator

    I needed to do:

    [CODE]chmod -R 755 /var/www/fog/service/ipxe/trk[/CODE]

    I’m getting an access issue now within the TRK kernel. That is probable an issue with my NFS share… either I didn’t mount it right or there are some other places that permissions reside for NFS shares. Doing some digging of my own, but I always appreciate freebies.


  • Developer

    i mention this, because that would have shown you why it was failing to the previous menu
    one of your lines was failing, and crashing to previous menu, due to a failure to execute a line, because of a permissions problem


  • Developer

    a troubleshooting techniquie that i’ve used for ipxe menus is going line-by-line in this format
    [CODE]:SEATOOLS
    initrd ${boot-url}/service/ipxe/seatoolsdos223all.iso || prompt
    chain ${boot-url}/service/ipxe/memdisk iso raw || prompt
    boot || prompt
    other command that might fail || prompt
    goto MENU[/CODE]

    this will prompt you to hit a key on any line that it fails


  • Senior Developer

    Probably try:
    [code]chown -R www-data:www-data /var/www/fog/service/ipxe[/code]


  • Moderator

    By previous menu, I meant the default FOG menu. It would step me back out of the Advanced Menu and back to the Default FOG Menu. I think that part is fixed now, and it looks like my problems are all permissions now. I’m still a bit linux-tarded, so that might take me a bit to get right.


  • Developer

    [quote=“need2, post: 29941, member: 21891”]Sadly still the same result. I have tried putting some options in for it to fail out to a shell, but iPXE never goes to the shell. If for some reason iPXE could not see the kernel or initrd, would it just crash out to the previous menu?[/quote]

    that depends on what you mean by "previous menu"
    the
    [CODE]<attempt a boot command> ||
    goto MENU[/CODE]
    is there specifically to make it go back to the top of the advanced menu


  • Moderator

    Alright, progress. I got it to go to shell and give me the following error when trying to access the kernel:

    [url]http://ipxe.org/err/410c61[/url]

    Which means its a 403, or forbidden. Apparently I didn’t get the permissions correct. I will have to give it another run. What permissions would you suggest for this?


  • Developer

    the prompt placement doesn’t look wrong to me
    the prompt command just waits to proceed to the next line until a key has been pressed.


  • Senior Developer

    I’d think:
    [code]:return
    chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} || prompt && goto MENU
    [/code]


  • Moderator

    FOG 1.1.0 SVN 1800
    Debian 7.5

    And as per the prompt, I can believe I did something wrong, but what is the correct placement?


  • Senior Developer

    I think it’s the placement of your prompt in the :return stanzas. Also, which version of FOG are you running, SVN, 1.0.1, 1.1.0?


  • Moderator

    menu
    item --gap – ---------------- iPXE boot menu ----------------
    item SEATOOLS Seatools for DOS
    item TRK Trinity Rescue Kit
    item hostinfo Computer Details
    item shell ipxe shell
    item return return to previous menu
    choose --default return --timeout 5000 target && goto ${target}

    :SEATOOLS
    initrd ${boot-url}/service/ipxe/seatoolsdos223all.iso
    chain ${boot-url}/service/ipxe/memdisk iso raw ||
    goto MENU

    :TRK
    kernel ${boot-url}/service/ipxe/trk/kernel.trk ramdisk_size=99700 root=/dev/ram0 vga=788 trknfs=192.168.10.86:/trk ip=::::::dhcp splash=verbose pci=conf1 trkmenu
    initrd ${boot-url}/service/ipxe/trk/initrd.trk
    boot ||
    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

    :shell
    shell ||
    goto MENU

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

    autoboot[/CODE]


  • Senior Developer

    can you provide your full advanced config?


  • Moderator

    Sadly still the same result. I have tried putting some options in for it to fail out to a shell, but iPXE never goes to the shell. If for some reason iPXE could not see the kernel or initrd, would it just crash out to the previous menu?


Log in to reply
 

362
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.