["Followup-To:" header set to gmane.linux.kernel.initramfs.]
On Fri, 02 Mar 2012 at 10:53 GMT, Sonic Zhang <[email protected]> wrote:
> Hi,

Hi,

>
> Where should folders "/dev" and "/root" be created? Any hint?
>

They are firstly created by dracut inside the initramfs:

dracut.sh:

    for d in dev proc sys sysroot root run run/lock run/initramfs; do
        if [ -L "/$d" ]; then
                inst_symlink "/$d"
        else
                mkdir -m 0755 -p "$initdir/$d"
        fi
    done

and then re-created by kernel:

init/initramfs.c:

static int __init do_name(void)
{
        ...
        clean_path(collected, mode);
        ...
        } else if (S_ISDIR(mode)) {
                sys_mkdir(collected, mode);
                sys_chown(collected,uid, gid);
                sys_chmod(collected, mode);
                dir_add(collected, mtime);
        }...
...
}

Cheers!

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to