[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is it possible to have squashfs inside initrd?





2014-09-20 14:05 GMT+02:00 Stefan Baur <newsgroups.mail2@stefanbaur.de>:
Am 20.09.2014 um 13:55 schrieb Daniel Lindgren:

>     So use a short DNS name for the http server, and have your DNS resolve
>     it to the proper IP depending on the subnet you're in.
>
>
> Don't think that's possible, we use the same central (Windows) DNS
> server for all scopes.

Gah, yuck.


> Also, when I've been fiddling around with this, fetch only worked if I
> used the IP in the URL, not the name of the server.

Indeed, that bug/limitation still seems to be there.
However, you can provide different pxelinux configuration files for
different networks.

See
http://www.syslinux.org/wiki/index.php/PXELINUX#How_do_I_Configure_PXELINUX.3F
for that.

So, to define a file for 192.168.0.x, you'd use C0A800 as file name,
likewise, for 192.168.1.x, you'd use C0A801 as file name, ... and for
192.168.255.x you'd use C0A8FF.

And in each file you'd hard-code the proper http server IP for that network.

If you need help converting IPs to hex, use
http://www.miniwebtool.com/ip-address-to-hex-converter

That is one way to go, but that would also mean managing 60+ different configuration files instead of one, or at least creating and maintaining a script to generate new config files with every "master" update. Easy to forget to run the script after update, there are several people involved in PXELINUX changes and I would like a more "foolproof" solution, if possible. I would be the only one updating squashfs/initrd, that would eliminate some of the fools ... ;)


Also, you might be able to use some pxelinux tricks to your advantage:

http://www.syslinux.org/wiki/index.php/PXELINUX#Can_I_send_information_to_PXELINUX_via_special_options_in_the_DHCP_response.3F

http://www.syslinux.org/wiki/index.php/PXELINUX#Fetching_images_via_HTTP.2FFTP


Yep, since we use a Windows DHCP server (not very friendly to custom options) the best workaround I've found is to use iPXE scripts to set DHCP option 210 to use HTTP and dynamically change the IP to the local LAN server.

Support for HTTP in PXELINUX is somewhat new and the URL:s are static AFAIK. We've been using gPXE/iPXE for years to get HTTP support, with the added bonus of scripting support for dynamic changes at boot time.

Cheers,
Daniel
 

Reply to: