[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:43 GMT+02:00 Stefan Baur <newsgroups.mail2@stefanbaur.de>:
Am 20.09.2014 um 14:21 schrieb Daniel Lindgren:
> 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 ... ;)

I'm not sure how far your http-instead-of-tftp-trickery goes, but if the
search mechanism employed by pxelinux is also tricked into using http,
then you could use symlinks pointing to the same file, and have your
webserver *execute* said file (which in turn generates the required
output) instead of delivering its content.

That way, you could have one static template and the script would insert
the required IP when it is called.  (The script will detect under which
name it was called and behave accordingly.)


If I understand what you mean, instead of just delivering a text file the web server would execute a script that generates the text file on the fly? We have a system of menus and submenus for PXELINUX, they would all have to be generated by some CGI script(s). Might be doable, but it would certainly be less work to just insert filesystem.squashfs into the initrd.

 
If that doesn't work, use a template and a special editing script that
calls $EDITOR /foo/bar/template and does the right things after the
editor process terminates. Make that script place a "# AUTOGENERATE FILE
- DO NOT EDIT BY HAND - USE $COMMAND INSTEAD" warning at the top of each
generated file.  Not the most elegant solution, but hey, life aint no
pony farm.


We pretty much just use Notepad (Windows again) to edit the menu files. My experience with "DO NOT EDIT ..." and similar instructions is that they aren't foolprof enough. Douglas Adams wrote "a common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools"  ... but we still have to try. :/

Cheers,
Daniel
 

Reply to: