From f6018d198782c1e9ed062ba60dbd0a590c3b7d7b Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 11 Jun 2009 17:27:18 +0100 Subject: [PATCH] Add guestfs_rescue=1 appliance option to start a rescue shell. --- TODO | 7 ------- appliance/make-initramfs.sh.in | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index 3c123d4..1e265c2 100644 --- a/TODO +++ b/TODO @@ -110,13 +110,6 @@ code directly into libguestfs? ---------------------------------------------------------------------- -guestfs rescue shell - -Have a kernel command line option to enable a rescue shell -from guestfsd. - ----------------------------------------------------------------------- - PPC problems: ppc (32 bit) works with qemu from git, however there is no serial console diff --git a/appliance/make-initramfs.sh.in b/appliance/make-initramfs.sh.in index b1d3c39..b39b13d 100755 --- a/appliance/make-initramfs.sh.in +++ b/appliance/make-initramfs.sh.in @@ -156,6 +156,9 @@ modprobe dm_mod ||: /sbin/route add default gw 10.0.2.2 lvm vgscan --ignorelockingfailure lvm vgchange -ay --ignorelockingfailure +if grep -sq guestfs_rescue=1 /proc/cmdline; then + bash -i +fi exec guestfsd -f __EOF__ -- 1.8.3.1