From patchwork Wed Oct 29 10:41:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 39743 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 44FDB24073 for ; Wed, 29 Oct 2014 10:42:39 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id n3sf1756315wiv.9 for ; Wed, 29 Oct 2014 03:42:38 -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=m1cUbIHNEpKAruxr+a+/QZSAClvL/k5WE1oaJUfN6gU=; b=kqjyCBoLsUpKxf0GSKbclj876IRwSVFyzFqae+v9ByxqZ36IrOBTr/944tF2rNCbRz iWXRD3Iu2mKgoWQpxp3JDdjV6KR+tgvOOscp0VYBlrfrM2IbDRpiKgvYilfsYG+2corf 8sXuPvy6+NbmZg6feyzYM7uw6uERzWwQmKIahFC2BqcLMwEhI2Oskp6ShSuKs/z2B/im zw4IobW6eVB4aj2CseHK/lFc3WR6wQ+cKIQpk49vZG4Q+z0iixLFZWDSGs381BGsCRK5 7R2rKn+RwKPgfYKCQX2Edeg/Y0BzDySvhVNY1JhXG+BvlHuM8yRvhDlwIfZVuwfhAEs+ x+UQ== X-Gm-Message-State: ALoCoQmEjTbYyp579IiD8Ambwb12W+iEMk91Y5zozSxQiF4KcNymjBd9+M2+GxBP8qTrP2kwiRPH X-Received: by 10.112.55.10 with SMTP id n10mr241320lbp.14.1414579356978; Wed, 29 Oct 2014 03:42:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.229 with SMTP id h5ls198878lam.4.gmail; Wed, 29 Oct 2014 03:42:36 -0700 (PDT) X-Received: by 10.112.199.40 with SMTP id jh8mr4296210lbc.5.1414579356806; Wed, 29 Oct 2014 03:42:36 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id v9si6608214lag.69.2014.10.29.03.42.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 03:42:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id ge10so2225488lab.22 for ; Wed, 29 Oct 2014 03:42:36 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr10236189lbb.74.1414579356441; Wed, 29 Oct 2014 03:42:36 -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 c5csp633435lbz; Wed, 29 Oct 2014 03:42:35 -0700 (PDT) X-Received: by 10.224.132.70 with SMTP id a6mr14139958qat.16.1414579355068; Wed, 29 Oct 2014 03:42:35 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id u1si6803984qai.25.2014.10.29.03.42.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 29 Oct 2014 03:42:35 -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 1XjQhO-0002Js-DV; Wed, 29 Oct 2014 10:41:54 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XjQhM-0002IA-SE for xen-devel@lists.xen.org; Wed, 29 Oct 2014 10:41:52 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id 04/47-03135-074C0545; Wed, 29 Oct 2014 10:41:52 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-2.tower-31.messagelabs.com!1414579310!12272214!1 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 11989 invoked from network); 29 Oct 2014 10:41:51 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 29 Oct 2014 10:41:51 -0000 X-IronPort-AV: E=Sophos;i="5.04,809,1406592000"; d="scan'208";a="187318367" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Wed, 29 Oct 2014 06:41:50 -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 1XjQhJ-00014V-En; Wed, 29 Oct 2014 10:41:50 +0000 Received: by zakaz.uk.xensource.com (sSMTP sendmail emulation); Wed, 29 Oct 2014 10:41:49 +0000 From: Ian Campbell To: Date: Wed, 29 Oct 2014 10:41:29 +0000 Message-ID: <1414579302-6692-7-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1414579268.29975.13.camel@citrix.com> References: <1414579268.29975.13.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST v2 07/20] 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.215.49 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 c611ed1..2f72b5f 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;