diff options
author | Marc Zyngier <maz@kernel.org> | 2021-02-06 10:39:52 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-02-06 10:40:59 +0000 |
commit | 8f3ad9eaa0567b7f6a8e6ed3bd12abd094c4a9b6 (patch) | |
tree | d6fce8be829ffdf647d41b69595abbbc9937a164 | |
parent | 850ce992e2f0b56252b9f368bd5caef206d8640c (diff) | |
download | vminstall-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-- | README | 5 | ||||
-rwxr-xr-x | build-cd-image | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -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 } |