]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: Clear Linux: init: do_mounts: recreate /dev/root
authorMiguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Fri, 20 Nov 2015 20:01:26 +0000 (14:01 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
Rootfs shows as is mounted in /dev/root, but this devices is not present in
/dev directory.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
init/do_mounts.c

index c2de5104aad2d64c51dfc480c7f5fa3e84daa1b4..c6db994a72131e138c0e8d4fc1a4dd104850d5ce 100644 (file)
@@ -549,6 +549,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",
@@ -602,6 +603,13 @@ out:
        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;