IPXE Menus for Booting Live OS
-
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] -
just a random stab at this, but try this:
[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
boot ||
goto MENU[/CODE] -
Sadly no change. Let’s widen the scope then. I created the folder ‘trk’ and stuck the entire contents of the disk in there, just like I had done before. I then made sure the owner and permissions matched the rest of the folders and files that were already present in ‘ipxe’. I also then started an NFS mount for ‘/trk’. Did I miss anything there?
-
Remove imgargs and put the imgargs info on the same line as your kernel so it will look like:
[code]:TRK
kernel ${boot-url}/service/ipxe/trk/kernel.trkramdisk_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
[/code] -
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?
-
can you provide your full advanced config?
-
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 MENUautoboot[/CODE]
-
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?
-
FOG 1.1.0 SVN 1800
Debian 7.5And as per the prompt, I can believe I did something wrong, but what is the correct placement?
-
I’d think:
[code]:return
chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} || prompt && goto MENU
[/code] -
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. -
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?
-
[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 -
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.
-
Probably try:
[code]chown -R www-data:www-data /var/www/fog/service/ipxe[/code] -
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
-
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 -
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.
-
[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…
-
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.