Blame SOURCES/0044-rescue-Print-chroot-suggestion-for-Linux-guests.patch
|
|
e76f14 |
From f1f0123903cb2cfa66832284ca25424e903883f2 Mon Sep 17 00:00:00 2001
|
|
|
e76f14 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
e76f14 |
Date: Thu, 24 Mar 2016 10:48:03 +0000
|
|
|
e76f14 |
Subject: [PATCH] rescue: Print chroot suggestion for Linux guests.
|
|
|
e76f14 |
|
|
|
e76f14 |
(cherry picked from commit a5507a16c68b6ee56258d44087b4e4529290934a)
|
|
|
e76f14 |
---
|
|
|
e76f14 |
rescue/rescue.c | 5 ++++-
|
|
|
e76f14 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
e76f14 |
|
|
|
e76f14 |
diff --git a/rescue/rescue.c b/rescue/rescue.c
|
|
|
e76f14 |
index 16028a7..982f3c4 100644
|
|
|
e76f14 |
--- a/rescue/rescue.c
|
|
|
e76f14 |
+++ b/rescue/rescue.c
|
|
|
e76f14 |
@@ -459,11 +459,14 @@ do_suggestion (struct drv *drvs)
|
|
|
e76f14 |
for (j = 0; mps[j] != NULL; j += 2)
|
|
|
e76f14 |
printf ("mount %s /sysroot%s\n", mps[j+1], mps[j]);
|
|
|
e76f14 |
|
|
|
e76f14 |
- /* If it's Linux, print the bind-mounts. */
|
|
|
e76f14 |
+ /* If it's Linux, print the bind-mounts and a chroot command. */
|
|
|
e76f14 |
if (type && STREQ (type, "linux")) {
|
|
|
e76f14 |
printf ("mount --rbind /dev /sysroot/dev\n");
|
|
|
e76f14 |
printf ("mount --rbind /proc /sysroot/proc\n");
|
|
|
e76f14 |
printf ("mount --rbind /sys /sysroot/sys\n");
|
|
|
e76f14 |
+ printf ("\n");
|
|
|
e76f14 |
+ printf ("cd /sysroot\n");
|
|
|
e76f14 |
+ printf ("chroot /sysroot\n");
|
|
|
e76f14 |
}
|
|
|
e76f14 |
|
|
|
e76f14 |
printf ("\n");
|
|
|
e76f14 |
--
|
|
|
e76f14 |
1.8.3.1
|
|
|
e76f14 |
|