[Qa-jenkins-scm] [jenkins.debian.net] 02/03: Initial support for testing netboot PXE installers
Holger Levsen
holger at moszumanska.debian.org
Sun May 24 11:48:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to annotated tag for-master
in repository jenkins.debian.net.
commit 6a2f5d0a8905c4964cded0fc029fc41562fee94e
Author: Steven Chamberlain <steven at pyro.eu.org>
Date: Tue Nov 11 21:02:20 2014 +0000
Initial support for testing netboot PXE installers
---
bin/g-i-installation.sh | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 83565fb..e975a4d 100644
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -30,7 +30,10 @@ DISKSIZE_IN_GB=$1
URL=$2
# $3 and $4 are used below for language setting
RAMSIZE=1024
-if [ "$(basename $URL)" != "amd64" ] ; then
+if [ "$(basename $URL)" = "netboot.tar.gz" ] ; then
+ # URL is for a PXE netboot installer, rather than a CD .iso
+ NETBOOT=$(pwd)/$(basename $URL)
+elif [ "$(basename $URL)" != "amd64" ] ; then
IMAGE=$(pwd)/$(basename $URL)
IMAGE_MNT="/media/cd-$NAME.iso"
else
@@ -195,7 +198,13 @@ bootstrap_system() {
PRESEEDCFG="preseed.cfg"
PRESEED_PATH=d-i-preseed-cfgs
PRESEED_URL="url=$QEMU_WEBSERVER/$PRESEED_PATH/${NAME}_$PRESEEDCFG"
- if [ -n "$IMAGE" ] ; then
+ #
+ # boot configuration
+ #
+ if [ -n "$NETBOOT" ] ; then
+ GRUB_CFG="debian-installer/$ARCH/grub.cfg"
+ QEMU_NET_OPTS="$QEMU_NET_OPTS,bootfile=grub2pxe,tftp=."
+ elif [ -n "$IMAGE" ] ; then
QEMU_OPTS="$QEMU_OPTS -cdrom $IMAGE -boot d"
case $NAME in
*_kfreebsd) ;;
@@ -1156,9 +1165,20 @@ save_logs() {
trap cleanup_all INT TERM EXIT
#
-# if there is a CD image...
+# install image preparation
#
-if [ ! -z "$IMAGE" ] ; then
+if [ ! -z "$NETBOOT" ] ; then
+ #
+ # if there is a netboot installer tarball...
+ #
+ fetch_if_newer "$NETBOOT" "$URL"
+ # try to extract, otherwise abort
+ sha256sum "$NETBOOT"
+ tar -zxvf "$NETBOOT" || exit
+elif [ ! -z "$IMAGE" ] ; then
+ #
+ # if there is a CD image...
+ #
fetch_if_newer "$IMAGE" "$URL"
# is this really an .iso?
if [ $(file "$IMAGE" | grep -cE '(ISO 9660|DOS/MBR boot sector)') -eq 1 ] ; then
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list