From patchwork Fri Oct 10 12:02:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 38568 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A50C7202DB for ; Fri, 10 Oct 2014 12:03:35 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id c13sf2115477eek.5 for ; Fri, 10 Oct 2014 05:03:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=g0jHEb8+I6cdvL1ZqHhzLARIkN7aCnju2lyuuqnDu4w=; b=VV0dDJw14PGO/myjZwWDKGufD6OkIE0r7ZK4+e6zJ/yEf4PruTnesH5aQXo9B6R9uC 7iKtRPNm9C8QXLJ4XtwMhM1HoefmsUzAFCSAY/4H/MNac6NBSADa3hfwFUmV58+ahIWv gzUyzJPpqipRTZEnwpgM5wemCAUgOZs3kJv/JKWQl8UdfguUWXsyfjeSKF/kZrdbbb+r FnT27E7FwZvu9b625aZg7/Juc6+tI3CeYNDXKidI3oP6ZBgWUPVN46AQqmGRPflPYoyA Ew15/47fAX+hahBvA7/2ZtaMsV2g3Ec9U+sHM17FeVLypwA59vATap3YWX5LZE4dKoq3 veSA== X-Gm-Message-State: ALoCoQl2jngzLNQiSqClciuKX+CDzfcX90wl/V8ue0dc4zpTgWPNaVzUyUpSlAQNGUnTFYmFQfGw X-Received: by 10.152.29.130 with SMTP id k2mr903471lah.3.1412942614210; Fri, 10 Oct 2014 05:03:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.169 with SMTP id r9ls246297laj.57.gmail; Fri, 10 Oct 2014 05:03:34 -0700 (PDT) X-Received: by 10.112.146.103 with SMTP id tb7mr4334122lbb.26.1412942614035; Fri, 10 Oct 2014 05:03:34 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx.google.com with ESMTPS id v1si8852120laz.94.2014.10.10.05.03.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Oct 2014 05:03:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id b6so3000460lbj.3 for ; Fri, 10 Oct 2014 05:03:33 -0700 (PDT) X-Received: by 10.113.10.9 with SMTP id dw9mr4303087lbd.46.1412942613878; Fri, 10 Oct 2014 05:03:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp414306lbz; Fri, 10 Oct 2014 05:03:33 -0700 (PDT) X-Received: by 10.221.29.5 with SMTP id rw5mr499470vcb.49.1412942612617; Fri, 10 Oct 2014 05:03:32 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id fw5si1917998vdc.41.2014.10.10.05.03.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 10 Oct 2014 05:03:32 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XcYuE-0002LG-6p; Fri, 10 Oct 2014 12:02:46 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XcYuD-0002Kn-9m for xen-devel@lists.xen.org; Fri, 10 Oct 2014 12:02:45 +0000 Received: from [85.158.143.35:57557] by server-1.bemta-4.messagelabs.com id CD/0D-05872-4EAC7345; Fri, 10 Oct 2014 12:02:44 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-3.tower-21.messagelabs.com!1412942558!11748672!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.12.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9727 invoked from network); 10 Oct 2014 12:02:44 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 10 Oct 2014 12:02:44 -0000 X-IronPort-AV: E=Sophos;i="5.04,691,1406592000"; d="scan'208";a="181281207" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Fri, 10 Oct 2014 08:02:43 -0400 Received: from kazak.uk.xensource.com ([10.80.2.80] helo=zakaz.uk.xensource.com) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1XcYuA-0008Ti-71; Fri, 10 Oct 2014 13:02:43 +0100 Received: by zakaz.uk.xensource.com (sSMTP sendmail emulation); Fri, 10 Oct 2014 13:02:42 +0100 From: Ian Campbell To: Date: Fri, 10 Oct 2014 13:02:23 +0100 Message-ID: <1412942554-752-8-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412942404.27111.12.camel@citrix.com> References: <1412942404.27111.12.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH RFC OSSTEST 08/19] ts-host-install: Add option to boot debian-installer in rescue mode X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: This is useful when trying to bootstrap onto a new platform, since you can log in to an otherwise unbootable rootfs to figure out what is going wrong. The procedure is the same as installing except "rescue/enabled=true" is added to the command line, hence part of ts-host-install rather than separate. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- Osstest/Debian.pm | 1 + ts-host-install | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 29dec3b..8f80eb4 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -422,6 +422,7 @@ sub di_installcmdline_core ($$;@) { my $debconf_priority= $xopts{DebconfPriority}; push @cl, "debconf/priority=$debconf_priority" if defined $debconf_priority; + push @cl, "rescue/enable=true" if $xopts{RescueMode}; return @cl; } diff --git a/ts-host-install b/ts-host-install index cdbd774..7c8d693 100755 --- a/ts-host-install +++ b/ts-host-install @@ -30,9 +30,14 @@ my $debconf_priority; our %xopts; -if (@ARGV && $ARGV[0] =~ m/^--priority(?:=(.*))?$/) { +while (@ARGV and $ARGV[0] =~ m/^-/) { + $_= shift @ARGV; + last if m/^--$/; + if (m/^--priority(?:=(.*))?$/) { $xopts{DebconfPriority}= defined($1) ? $1 : 'low'; - shift @ARGV; + } elsif (m/^--rescue$/) { + $xopts{RescueMode}= 1; + } } our ($whhost) = @ARGV;