usvi / easy_multi_pxe

5 stars 0 forks source link

Create dynamic startnet.php #8

Closed usvi closed 1 month ago

usvi commented 11 months ago

We should create dynamic startnet.php. It would automatically splitstream also drivers from driver directory.

usvi commented 2 months ago

I forgot why this was supposedly hard. What I am missing? What happens if fragments contain syntaxes to startnet.php ? And what happens if/when startnet.php is exposed? It will expose local share password. But is it so bad? It is RO anyways. Maybe I have been overthinking complexity.

usvi commented 1 month ago

Now I remembered why it was hard. At least for windows, we need to do a dynamic IPXE ENTRY because if there is a new driver added, we would need to add it to repo and then regenerate EVERY iso provisioning we have. Not gonna happen.

The next question is, how do we justify NOT doing something similiar with Linuxes? Linuxes do not have inherent support of add-in drivers. Windows does.

usvi commented 1 month ago

startnet.php has been created but it does nothing.

usvi commented 1 month ago

This is extremely important notion:

https://github.com/usvi/easy_multi_pxe/issues/4#issuecomment-1773736337

The noreboot -thingy. Then the drivers are installed to the image after the actual installation completes. I say again: Genius!

usvi commented 1 month ago

Cool, I could splitstream even kernel modules: https://ipxe.org/cmd/imgfetch

  #!ipxe
  kernel vmlinuz
  initrd initrd.img
  initrd modules/6.0.16/e1000.ko /lib/modules/e1000.ko
  boot
usvi commented 1 month ago

Old ipxe:

kernel wimboot
set http_base http://172.16.8.254/netbootassets/windows/10/x64/Win10_21H2_English_x64-2022-02-02
initrd ${http_base}/BCD BCD
initrd ${http_base}/boot.sdi boot.sdi
initrd ${http_base}/boot.wim boot.wim
boot
sleep 5
goto end
usvi commented 1 month ago

Ok ok, so where would startnet.cmd go?

usvi commented 1 month ago

Actually, I'm again confused. What were we going to use the template with?

usvi commented 1 month ago

Ok now I dug it out. We need to get some files from the template. boot.wim. I read a comment BCD and boot.sdi are not needed.

usvi commented 1 month ago

No, I actually now think the template is actually ready for booting.

usvi commented 1 month ago

Booting only with the template:

image

usvi commented 1 month ago

Maybe this is the problem:

https://forum.ipxe.org/showthread.php?tid=18156&pid=34884#pid34884

usvi commented 1 month ago

Yes. This works minimally:

kernel wimboot
initrd --name boot.wim http://172.16.8.254/netbootassets/windows/template/x64/boot-gen2.wim boot.wim
usvi commented 1 month ago

So obviously, we need for fragment.php template_base (we already have preseed_url and http_base)

usvi commented 1 month ago

Commit c6c1f67656aba9477d9354b4974d2c5f72eed014 makes skeleton startnet.cmd to work. Easier than I thought.

usvi commented 1 month ago

I realized there will be a problem. We need drivers to be visible on the net.

usvi commented 1 month ago

Commit 669c01d7071ba7873af913fbe04e65c908d6c432 and predecessors make drivers exposed via network.

usvi commented 1 month ago

Commit 9b5bee02c6a70b688d92dc2f69d398ed56f5f2b5 implements this finally. YEAY!