What is purpose of /init
Hi, I just saw contents of /init on my system. #!/bin/sh # devtmpfs does not get automounted for initramfs /bin/mount -t devtmpfs devtmpfs /dev exec 0</dev/console exec 1>/dev/console exec 2>/dev/console exec /sbin/init $* Can someone explain what is meant for ? Regards, Rahul B.
On Wed, Aug 1, 2012 at 4:03 PM, Rahul Bedarkar <rpal143@gmail.com> wrote:
Hi,
I just saw contents of /init on my system.
#!/bin/sh # devtmpfs does not get automounted for initramfs /bin/mount -t devtmpfs devtmpfs /dev exec 0</dev/console exec 1>/dev/console exec 2>/dev/console exec /sbin/init $*
Can someone explain what is meant for ?
It's a hack to get devtmpfs mounted before init starts... Looks like your distro does not know CONFIG_DEVTMPFS_MOUNT. :-) -- Thanks, //richard
Thanks Richard ! And what is exec 0</dev/console exec 1>/dev/console On Thu, Aug 2, 2012 at 5:24 AM, richard -rw- weinberger <richard.weinberger@gmail.com> wrote:
On Wed, Aug 1, 2012 at 4:03 PM, Rahul Bedarkar <rpal143@gmail.com> wrote:
Hi,
I just saw contents of /init on my system.
#!/bin/sh # devtmpfs does not get automounted for initramfs /bin/mount -t devtmpfs devtmpfs /dev exec 0</dev/console exec 1>/dev/console exec 2>/dev/console exec /sbin/init $*
Can someone explain what is meant for ?
It's a hack to get devtmpfs mounted before init starts... Looks like your distro does not know CONFIG_DEVTMPFS_MOUNT. :-)
-- Thanks, //richard
Sorry! and what is meant by exec 0</dev/console exec 1>/dev/console On Thu, Aug 2, 2012 at 12:04 PM, Rahul Bedarkar <rpal143@gmail.com> wrote:
Thanks Richard !
And what is exec 0</dev/console exec 1>/dev/console
On Thu, Aug 2, 2012 at 5:24 AM, richard -rw- weinberger <richard.weinberger@gmail.com> wrote:
On Wed, Aug 1, 2012 at 4:03 PM, Rahul Bedarkar <rpal143@gmail.com> wrote:
Hi,
I just saw contents of /init on my system.
#!/bin/sh # devtmpfs does not get automounted for initramfs /bin/mount -t devtmpfs devtmpfs /dev exec 0</dev/console exec 1>/dev/console exec 2>/dev/console exec /sbin/init $*
Can someone explain what is meant for ?
It's a hack to get devtmpfs mounted before init starts... Looks like your distro does not know CONFIG_DEVTMPFS_MOUNT. :-)
-- Thanks, //richard
On Thu, Aug 2, 2012 at 8:35 AM, Rahul Bedarkar <rpal143@gmail.com> wrote:
Sorry!
and what is meant by exec 0</dev/console exec 1>/dev/console
See bash basics: http://tldp.org/LDP/abs/html/x17837.html -- Thanks, //richard
-----Original Message----- From: kernelnewbies-bounces@kernelnewbies.org [mailto:kernelnewbies-bounces@kernelnewbies.org] On Behalf Of Rahul Bedarkar Sent: Thursday, August 02, 2012 2:35 PM To: richard -rw- weinberger Cc: kernelnewbies@kernelnewbies.org Subject: Re: What is purpose of /init Thanks Richard ! And what is exec 0</dev/console exec 1>/dev/console That means redirect 0 and 1 to /dev/console. On Thu, Aug 2, 2012 at 5:24 AM, richard -rw- weinberger <richard.weinberger@gmail.com> wrote:
On Wed, Aug 1, 2012 at 4:03 PM, Rahul Bedarkar <rpal143@gmail.com> wrote:
Hi,
I just saw contents of /init on my system.
#!/bin/sh # devtmpfs does not get automounted for initramfs /bin/mount -t devtmpfs devtmpfs /dev exec 0</dev/console exec 1>/dev/console exec 2>/dev/console exec /sbin/init $*
Can someone explain what is meant for ?
It's a hack to get devtmpfs mounted before init starts... Looks like your distro does not know CONFIG_DEVTMPFS_MOUNT. :-)
I think that's not true, AFAIK, if kernel found /init, it will not populate devtmpfs automatically even though CONFIG_DEVTMPFS_MOUNT=y. -- Thanks, Chengwei
-- Thanks, //richard
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (3)
-
Rahul Bedarkar -
richard -rw- weinberger -
Yang, Chengwei