We build boxes using kickstart. Some boxes have a config already generated for them at build time, which can be obtained from a local server, all the build process needs to get that config is the box id. So I have enhanced the init on the boot images to pass through some environment variables to processes started off by init - basically all uppercase environment variables are passed down the food chain. This allows us to have a setup where you boot the machine off CD, get to the syslinux prompt, and type dl380 ID=my-server where dl380 is a syslinux.cfg entry which pulls in our kickstart stuff. When the %postinstall runs, the environment variable entry ID=my-server is there in the environment for scripts to make use of. The linux kernel passes unrecognised command line stuff to init so this passes through that way. The attached patch modifies the anaconda init to copy through these extra environment variables. I'm sure others can find similar uses for this... and its just a few lines :-)
Created attachment 46040 [details] patch to pass through environment for RH7.2/anaconda 7.2-7
Why do this via additional code in the loader? You can just poke directly into /proc/cmdline easily enough
When I first tried this - couple of versions back - /proc/cmdline wasn't there (/proc wasn't mounted into the installed image). If /proc/cmdline is there now then this fudge is redundant. Will check tomorrow - hopefully when I can think straight without nasty illnesses :-)
/proc/cmdline will be there. Please reopen this issue if it is not.