Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
init: do_mounts: recreate /dev/root
Browse files Browse the repository at this point in the history
Rootfs shows as is mounted in /dev/root, but this devices is not present in
/dev directory.

Signed-off-by: Miguel Bernal Marin <[email protected]>
  • Loading branch information
miguelinux authored and jcvenegas committed Jan 3, 2018
1 parent d3caea5 commit 48db9f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ void __init mount_root(void)
void __init prepare_namespace(void)
{
int is_floppy;
int err;

if (root_delay) {
printk(KERN_INFO "Waiting %d sec before mounting root device...\n",
Expand Down Expand Up @@ -604,6 +605,13 @@ void __init prepare_namespace(void)
devtmpfs_mount("dev");
sys_mount(".", "/", NULL, MS_MOVE, NULL);
sys_chroot(".");
#ifdef CONFIG_BLOCK
/* recreate the /dev/root */
err = create_dev("/dev/root", ROOT_DEV);

if (err < 0)
pr_emerg("Failed to create /dev/root: %d\n", err);
#endif
}

static bool is_tmpfs;
Expand Down

0 comments on commit 48db9f0

Please sign in to comment.