aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2021-02-06 10:39:52 +0000
committerMarc Zyngier <maz@kernel.org>2021-02-06 10:40:59 +0000
commit8f3ad9eaa0567b7f6a8e6ed3bd12abd094c4a9b6 (patch)
treed6fce8be829ffdf647d41b69595abbbc9937a164
parent850ce992e2f0b56252b9f368bd5caef206d8640c (diff)
downloadvminstall-8f3ad9eaa0567b7f6a8e6ed3bd12abd094c4a9b6.tar.gz
build-cd-image: Add PRESEED_PATH option for alternative pressed file
Signed-off-by: Marc Zyngier <maz@kernel.org>
-rw-r--r--README5
-rwxr-xr-xbuild-cd-image4
2 files changed, 7 insertions, 2 deletions
diff --git a/README b/README
index 3e55846..0da16bf 100644
--- a/README
+++ b/README
@@ -90,7 +90,10 @@ at some point. Maybe.
grub entry for unattended installation, repack the whole thing as
target.iso. The only VM user is root, password is root. Don't try
this on a publicly visible box... Depends on the xorriso package
- being installed.
+ being installed. If the PRESEED_PATH environment variable is
+ defined, feed this to the installer as part of the kernel command
+ line. This is useful to point the installer to a remote preseed
+ file (PRESEED_PATH="url=http://my.remote.box/preseed.cfg").
Example:
diff --git a/build-cd-image b/build-cd-image
index f7c8f3d..a061aa9 100755
--- a/build-cd-image
+++ b/build-cd-image
@@ -5,6 +5,8 @@
out=tmp/cd
grubcfg=$out/boot/grub/grub.cfg
+preseed_path=${PRESEED_PATH-file=/cdrom/preseed.cfg}
+
mkdir $out
vmlinuzpath=$(xorriso -dev $1 -sh_style_result on -find / -type f -name vmlinuz 2>/dev/null | cut -f2- -d '/' | tail -1)
@@ -37,7 +39,7 @@ chmod u+w $grubcfg
cat <<EOF >>$grubcfg
menuentry 'Install preseeded' --id preseed {
set background_color=black
- linux $kpath/$kname auto=true priority=critical file=/cdrom/preseed.cfg --- quiet
+ linux $kpath/$kname auto=true priority=critical $preseed_path --- quiet
initrd $kpath/initrd.gz
}