]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 29 Jan 2018 13:44:53 +0000 (07:44 -0600)
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 7cf4f6dafd5f32031db0a1d28072fc93c0474f5a..148721386084a509f64826a822b6015a1c71a73e 100644 (file)
@@ -548,6 +548,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",
@@ -601,6 +602,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;