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-14, 09:13
Post: #7
RE: How to pass options to the booted system via PXECONFIG script
/etc/rc.local is too late to execute whatever script you want to interact with this abc.txt file, because it is already gone.

When the kernel mounts your NFS-based root filesystem, the /tmp/test.txt file (as I explained earlier) that was injected into your initrd will no longer be available. Once the root filesystem is mounted the initrd in memory is destroyed to reclaim memory. At least that is how I understand it. Because of that, you'll need to do the following BEFORE the root filesystem is mounted: Mount another filesystem (could be another ramdisk mounted at /ramdisk), copy the /tmp/test.txt somewhere onto that filesystem, and THEN let the initrd continue its process with mounting the real root filesystem and so on. Then /ramdisk/test.txt should be available once /etc/rc.local is executed.

All of this means you'll need to modify the initrd, unless casper (or the Ubuntu/Debian ramdisk) has a place you can inject your xyz.sh file so that it is executed before the real root fs is mounted. You'll need to read up on how the initrd is generated and what options are available for customization. Or you could just unpack it and study how it works. Remember /sbin/init is the process started by the kernel once it's done.
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-14 09:13



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