Blob Blame History Raw
From 5c9715d182c95601c63282050ddc9ae1d45a22ac Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 24 Mar 2016 10:46:31 +0000
Subject: [PATCH] rescue: Suggest using recursive bind mounts.

Since /dev and other directories contain sub-mounts, suggest using
--rbind instead of --bind.  This also allows us to remove the /dev/pts
line.

(cherry picked from commit 72fd0531ab8446dc00d565cf2f526f5c9bcee968)
---
 rescue/rescue.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/rescue/rescue.c b/rescue/rescue.c
index 08c8062..16028a7 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -461,10 +461,9 @@ do_suggestion (struct drv *drvs)
 
     /* If it's Linux, print the bind-mounts. */
     if (type && STREQ (type, "linux")) {
-      printf ("mount --bind /dev /sysroot/dev\n");
-      printf ("mount --bind /dev/pts /sysroot/dev/pts\n");
-      printf ("mount --bind /proc /sysroot/proc\n");
-      printf ("mount --bind /sys /sysroot/sys\n");
+      printf ("mount --rbind /dev /sysroot/dev\n");
+      printf ("mount --rbind /proc /sysroot/proc\n");
+      printf ("mount --rbind /sys /sysroot/sys\n");
     }
 
     printf ("\n");
-- 
2.7.4