1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From 179b7f41d5509f93cd297cc81c5d8da4a3123d9d Mon Sep 17 00:00:00 2001
From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Date: Fri, 20 Nov 2015 14:01:26 -0600
Subject: [PATCH 113/114] init: do_mounts: recreate /dev/root
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>
---
init/do_mounts.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 40725f0f5fb3..78b5b1dba8ca 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -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",
@@ -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;
--
2.11.1
|