On Mon, Oct 25, 2004 at 01:23:28AM -0500, Russell Miller wrote: > I'm making a small project out of going through the linux boot code and trying > to figure out how it all works. In init/init.c, line 717, there is the > following rather odd bunch of code: > > */ > if (sys_access((const char __user *) "/init", 0) == 0) > execute_command = "/init"; > else > prepare_namespace(); > > It looks like if the file "/init" exists, it overrides any init= command line, > and skips trying to do the initial mounts. I imagine there must be a good > reason for this, but I can't quite figure out what it is. My first thought > is that it's for embedded systems. Anyone able to shed some light on that? Think of an initramfs holding the userspace tools to create the initial mount device (through a network connection, or whatever else you think of, etc.) > It also looks to be either a security help or a great way to shoot yourself in > the foot... It's allowing us to move a lot of very crappy kernel code into userspace, and out of the kernel. thanks, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/