Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Also a little curious, what if init-in-the-initramfs is a set-uid-non-root file? A file without executable bit? Will it be run as root anyway? What if it's broken ELF or can't find ld-linux.so ELF or recursion-too-deep script or anything just can't be execve? Commented Oct 4, 2018 at 14:58
  • 3
    I'm pretty sure the kernel doesn't load the program specified in "init=" from the initramfs. It an initramfs is in use then it seems to run as normal before the user-specified init program is run (not sure if it's the kernel that does this or code in the initramfs). Commented Oct 4, 2018 at 15:31
  • @炸鱼薯条德里克 To specify an alternate program instead of /init when booting from a ramdisk, you can use the rdinit=/path/to boot parameter. Commented Jun 23, 2019 at 4:40