Jason Lindquist (jlindquist) wrote,
Jason Lindquist

busybox and initrd subtlety

The lesson I learned at the end of last week was this: If you're using an initrd (initial RAM disk) to boot a system, with busybox as your jack-of-all-trades shell and binaries combination, and you want to run a script which will do things like mount network shares and load modules and configure interfaces, and you want that script to exec /sbin/init on one of those shares you've mounted as your root partition, your script needs to be run as init, not by init.

Basically, when you set up busybox on your initrd image, do NOT create a link to busybox called "init". If you do, the kernel will see it and execute busybox as init. If it calls your script as an rc file, your script will not be able to exec another init. You want to save your script as "linuxrc" in the root directory of your initrd. This way, the script will be run as init, and will retain the ability to chain into another init.

Once I work all the rough edges off my NFS slackware environment, I'll post details...

  • Aurora reference

    For reference, the only two links I could find on Aurora shooter (and Westview '06 grad) James Holmes, prior to his attendance at Westview being…

  • Your friend, FunnyJunk.com

    If you've never heard of funnyjunk.com, it's run by a content thief. It's a haven for incompetence, stupidity, and douchebaggery. Site owner…

  • X-header crap

    It is ridiculous how big this section of my .muttrc has gotten. Every goddamned special snowflake mailer has to have its own collection of…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.