Is it possible to pass arguments from the kernel (boot) command line to the 'init' script located in my initrd?  If so, is there a best-practice method for doing this?<br><br>Looking at the non-initrd system init script '/etc/event.d/rcS', I see that it just reads '/proc/cmdline' and looks for relevent tokens:<br>
<br>{{{<br>for t in $(cat /proc/cmdline); do<br>    case $t in<br>        -s|single|S|s) runlevel="S" ;;<br>        [1-9])       runlevel="$t" ;;<br>    esac<br>done<br>}}}<br><br>I assume that the initrd's 'init' script has access to this same information, at least after it mounts '/proc'.  Is there some reason not to use this from the initrd, or is it acceptable?<br>
<br>This is related to a larger question I have about 'mkinitrd' and the 'init' script:  Why does 'mkinitrd' hard-code the name of the LVM root device, among other things, instead of reading it from the 'root=' parameter on the boot command line?  Wouldn't it make more sense to dynamically pick up the root device on each boot, using a method similar to the 'rcS' script, above?<br>
<br>-Ryan<br><br><br><br>