initramfs - why do we need "init" in root instead of /sbin/init?
Hello,
after a lot of struggle to make initramfs functional, I had 2 discoveries: 1. I *must* put init in the root "/init" before creating the cpio. 2. I need to add to bootargs root=/dev/ram As to (1) above, I did not find it documented anywhere and I also find it strange that I need to change the rootfs just for the creation of cpio for initramfs. Does it make sense to copy /sbin/init to /init or do I miss something in my understanding ? Thanks, Ran |
Did you follow the blfs initramfs
http://www.linuxfromscratch.org/blfs...initramfs.html |
Quote:
This isn't a rigid rule, however. You CAN put init in a subdirectory, but you'll have to use the 'rdinit=' parameter to indicate to the kernel where it is. For example, if your init is in the etc directory, you have to add the following option to the kernel command line: Code:
... rdinit=/etc/init ... To use tmpfs, forget about the root= parameter. Use the 'rootfstype=' parameter, and specify tmpfs. You can also specify the simpler ramfs file system type if you like. Here's an example for grub2: Code:
kernel /boot/kernel/vmlinux rootfstype=tmpfs rw quiet |
All times are GMT -5. The time now is 12:38 AM. |