Passing arguments to initrd's 'init' script.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

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:

{{{
for t in $(cat /proc/cmdline); do
    case $t in
        -s|single|S|s) runlevel="S" ;;
        [1-9])       runlevel="$t" ;;
    esac
done
}}}

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?

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?

-Ryan



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux