From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, wei.liu2@citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH OSSTEST 2/3] ts-debian-hvm-install: di_installcmdline_core
Date: Mon, 20 Jul 2015 16:13:57 +0100 [thread overview]
Message-ID: <1437405238-22781-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1437405207.17368.43.camel@citrix.com>
This is primarily to get DEBIAN_FRONTEND=test, for easier to read
logging.
Previously the command line consisted of the console and
preseed/file=/preseed.cfg. After this it is more complex.
The preseed file uses file= which is an alias for preseed/file. Extra
options are given including DEBIAN_FRONTEND and DEBCONF_DEBUG and the
following are preseeded via the command line:
Previous implied were "auto=true preseed" which are now explicit.
In addition the following harmless (in this context) options are
added:
hw-detect/load_firmware=
hostname=
netcfg/dhcp_timeout=
netcfg/choose_interface=
The caller could also cause debconf/priority to be set, but doesn't
here.
ts-debian-di-install in the distro test series also uses
di_installcmdline_core for guest uses.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
Osstest/Debian.pm | 4 +++-
ts-debian-hvm-install | 27 +++++++++++++++++++++++++--
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 718a7e2..8282918 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -627,6 +627,8 @@ our %preseed_cmds;
sub di_installcmdline_core ($$;@) {
my ($tho, $ps_url, %xopts) = @_;
+ $xopts{PreseedScheme} //= 'url';
+
$ps_url =~ s,^http://,,;
my $netcfg_interface= get_host_property($tho,'interface force','auto');
@@ -640,7 +642,7 @@ sub di_installcmdline_core ($$;@) {
push @cl, (
"DEBIAN_FRONTEND=$difront",
"hostname=$tho->{Name}",
- "url=$ps_url",
+ "$xopts{PreseedScheme}=$ps_url",
"netcfg/dhcp_timeout=150",
"netcfg/choose_interface=$netcfg_interface"
);
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 0c94c7e..69f1217 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -98,22 +98,45 @@ END
}
sub grub_cfg () {
+ my @dicmdline = ();
+ my $gconsole = "console=ttyS0,115200n8";
+
+ push @dicmdline, $gconsole;
+ push @dicmdline, di_installcmdline_core($gho, '/preseed.cfg',
+ PreseedScheme => 'file');
+ push @dicmdline, "--";
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762007 for
# why console= is repeated.
+ push @dicmdline, $gconsole;
+
+ my $cmdline = join(" ", @dicmdline);
+
return <<"END";
set default="0"
set timeout=5
menuentry 'debian guest auto Install' {
- linux /install.amd/vmlinuz preseed/file=/preseed.cfg console=ttyS0,115200n8 -- console=ttyS0,115200n8
+ linux /install.amd/vmlinuz $cmdline
initrd /install.amd/initrd.gz
}
END
}
sub isolinux_cfg () {
+ my @dicmdline = ();
+ my $gconsole = "console=ttyS0,115200n8";
+
+ push @dicmdline, $gconsole;
+ push @dicmdline, di_installcmdline_core($gho, '/preseed.cfg',
+ PreseedScheme => 'file');
+ push @dicmdline, "initrd=/install.amd/initrd.gz";
+ push @dicmdline, "--";
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762007 for
# why console= is repeated.
+ push @dicmdline, $gconsole;
+
+ my $cmdline = join(" ", @dicmdline);
+
return <<"END";
default autoinstall
prompt 0
@@ -121,7 +144,7 @@ sub isolinux_cfg () {
label autoinstall
kernel /install.amd/vmlinuz
- append preseed/file=/preseed.cfg initrd=/install.amd/initrd.gz console=ttyS0,115200n8 -- console=ttyS0,115200n8
+ append $cmdline
END
}
--
2.1.4
next prev parent reply other threads:[~2015-07-20 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 15:13 [PATCH OSSTEST 0/3] fixes to ts-debian-hvm-install Ian Campbell
2015-07-20 15:13 ` [PATCH OSSTEST 1/3] ts-debian-hvm-install: Remove VGA console runes Ian Campbell
2015-07-24 17:09 ` Ian Jackson
2015-07-20 15:13 ` Ian Campbell [this message]
2015-07-20 15:39 ` [PATCH OSSTEST 2/3] ts-debian-hvm-install: di_installcmdline_core Wei Liu
2015-07-20 15:47 ` Ian Campbell
2015-07-24 17:11 ` Ian Jackson
2015-07-20 15:13 ` [PATCH OSSTEST 3/3] ts-debian-hvm-install: Use xargs -0 to avoid massive filelist in logs Ian Campbell
2015-07-24 17:12 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437405238-22781-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).