usvi / easy_multi_pxe

5 stars 0 forks source link

Make menu system precalculated and final fragment dynamic #9

Closed usvi closed 17 hours ago

usvi commented 2 weeks ago

Menu system should be made partially precalculated and partially dynamic. The travellable menu could be precalculated and the final entry would be a chain to a fragment.php with proper parameters.

usvi commented 5 days ago

How we have it like this

# Os family and major submenu
:x64-bios-systemrescuecd-8
menu Systemrescuecd 8 variants (iPXE 64bit BIOS)
item x64-bios-systemrescuecd-8-systemrescue-8.05-amd64 Systemrescue 8.05 amd64
item x64-bios-systemrescuecd Back

choose selected
set menu-timeout 0
goto ${selected}

:x64-bios-systemrescuecd-8-systemrescue-8.05-amd64
set http_base http://172.16.8.254/netbootassets/systemrescuecd/8/x64/systemrescue-8.05-amd64/unpacked
kernel ${http_base}/sysresccd/boot/x86_64/vmlinuz nvidia.modeset=0 i915.modeset=0 nouveau.modeset=0 nofirewall archisobasedir=sysresccd initrd=sysresccd.img ip=dhcp checksum archiso_http_srv=${http_base}/
initrd ${http_base}/sysresccd/boot/intel_ucode.img
initrd ${http_base}/sysresccd/boot/amd_ucode.img
initrd ${http_base}/sysresccd/boot/x86_64/sysresccd.img
boot
sleep 5
goto end

We should have it like this

# Os family and major submenu
:x64-bios-systemrescuecd-8
menu Systemrescuecd 8 variants (iPXE 64bit BIOS)
item x64-bios-systemrescuecd-8-systemrescue-8.05-amd64 Systemrescue 8.05 amd64
item x64-bios-systemrescuecd Back

choose selected
set menu-timeout 0
goto ${selected}

:x64-bios-systemrescuecd-8-systemrescue-8.05-amd64
chain --replace http://172.16.8.254/netbootassets/fragment.php?method=bios&family=systemrescuecd&version=8&arch=x64&id=systemrescue-8.05-amd64
usvi commented 5 days ago

BTW, set http_base http://172.16.8.254/netbootassets/systemrescuecd/8/x64/systemrescue-8.05-amd64/unpacked is wrong. Should be without unpacked. Well anyways, the script would

  1. Set http_base dynamically from php always
  2. Set preseed_url from php if family==debian (set it to the preseed.php?family=debian&version=12&arch=x64&id=debian-12.5.0-amd64-DVD-1 )
  3. IF windows, splitstream drivers in, add call to parametrized startnet.php.
  4. Figure out more
usvi commented 2 days ago

Commit f4330f543c365f349ec91d687b07d2572fb2d306 makes root.ipxe precalculated

usvi commented 2 days ago

Commit 39efc6b1ed27055c1d8c78ee1efa93bfe3cb142f makes all calls to final labels to be fragment.php -based.

usvi commented 17 hours ago

One of the latest commits completed this implementation.