Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass options to the booted system via PXECONFIG script
2013-11-03, 22:40
Post: #3
RE: How to pass options to the booted system via PXECONFIG script
Not sure why you'd need an external file for that. Just add them to the imgargs line like this my_ip=${ip}. Then you can just read the value out of /proc/cmdline once Linux has booted. Since you already control /etc/rc.local it shouldn't be too hard. Remember you can also add a custom file to the initrd by doing something like this:

Code:
kernel nfs://192.168.13.5/var/www/nfsshare/casper/vmlinuz
initrd nfs://192.168.13.5/var/www/nfsshare/casper/initrd.gz
initrd nfs://192.168.13.5/var/www/some/file/here/${chip} /tmp/chip.txt
echo now booting...
imgargs vmlinuz root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.13.5:/var/www/nfsshare/
boot

The specific "chip" file for your network card would then be available inside Linux as /tmp/chip.txt after the system is booted. If you point it at a web server instead of nfs you could even dynamically generate it with a simple CGI script. Lots of options available.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to pass options to the booted system via PXECONFIG script - robinsmidsrod - 2013-11-03 22:40



User(s) browsing this thread: 4 Guest(s)