netbootxyz / netboot.xyz

Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE.
https://netboot.xyz
Apache License 2.0
9.04k stars 674 forks source link

Update boot.cfg.j2 #1477

Open sparky3387 opened 3 months ago

sparky3387 commented 3 months ago

Allow users to set their own values for win_base_url and rhel_base_url from local-vars

This is to resolve the following bug (by allowing users to set their own win_base_url)

https://github.com/netbootxyz/netboot.xyz/issues/1344

tomlawrence commented 3 months ago

I was looking to achieve the same goal of using local-vars.ipxe to set win_base_url and realized it was being blanked by boot.cfg which is chained by menu.ipxe, defaulting the value to an empty string and removing any previous value set. I was going to commit something with an {% if win_base_url is defined %} statement but using isset seems cleaner!

deffcolony commented 1 month ago

@sparky3387 This would be nice, as I’ve been dealing with this issue for months now.

I’m new to Docker and would really appreciate some guidance on how to implement and run your fix using Docker Compose. Specifically, I’d like to understand the steps needed to:

  1. Pull your changes into my local setup.
  2. Configure win_base_url and rhel_base_url using local-vars.
  3. Run everything using Docker Compose.

I assume I’ll need to build the Docker image myself rather than simply pulling it from the docker-compose.yml file (which currently references image: lscr.io/linuxserver/netbootxyz:latest).

Could you provide a simple walkthrough or instructions on how to apply this fix and ensure it runs smoothly with Docker Compose? This would save me a lot of time by automating the URL setup instead of having to enter it manually each time.