Fix Autoinstall: Subiquity-Weg statt nur cloud-init NoCloud
- autoinstall.yaml im ISO-Root (direkter Subiquity-Weg, Ubuntu 24.04+) - Kernel-Parameter subiquity.autoinstallpath als Backup - NoCloud ds=nocloud + cloud-config-url=/dev/null als Fallback Ubuntu 24.04 Subiquity sucht in dieser Reihenfolge: 1. subiquity.autoinstallpath= (Kernel-Parameter) 2. Root des Installationssystems 3. cloud-config (cloud-init) 4. Root des Installationsmediums (autoinstall.yaml)
This commit is contained in:
parent
0b908ba3bf
commit
35ed5e2bd2
1 changed files with 10 additions and 2 deletions
12
build-iso.sh
12
build-iso.sh
|
|
@ -60,10 +60,17 @@ fi
|
||||||
# ── Autoinstall-Dateien vorbereiten ──────────────────────────────────────
|
# ── Autoinstall-Dateien vorbereiten ──────────────────────────────────────
|
||||||
echo -e "\n=== Autoinstall-Dateien vorbereiten ==="
|
echo -e "\n=== Autoinstall-Dateien vorbereiten ==="
|
||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
|
|
||||||
|
# NoCloud-Verzeichnis (Fallback für cloud-init)
|
||||||
mkdir -p "$TMPDIR/autoinstall"
|
mkdir -p "$TMPDIR/autoinstall"
|
||||||
cp "$SCRIPT_DIR/user-data" "$TMPDIR/autoinstall/"
|
cp "$SCRIPT_DIR/user-data" "$TMPDIR/autoinstall/"
|
||||||
cp "$SCRIPT_DIR/meta-data" "$TMPDIR/autoinstall/"
|
cp "$SCRIPT_DIR/meta-data" "$TMPDIR/autoinstall/"
|
||||||
ok "user-data und meta-data bereit"
|
|
||||||
|
# autoinstall.yaml im ISO-Root (direkter Subiquity-Weg, Ubuntu 24.04+)
|
||||||
|
# Subiquity sucht im Root des Installationsmediums nach autoinstall.yaml
|
||||||
|
grep -v '^#cloud-config' "$SCRIPT_DIR/user-data" | \
|
||||||
|
sed 's/^autoinstall://' | sed 's/^ //' > "$TMPDIR/autoinstall.yaml"
|
||||||
|
ok "user-data und autoinstall.yaml bereit"
|
||||||
|
|
||||||
# ── WireGuard-Config einbetten ────────────────────────────────────────────
|
# ── WireGuard-Config einbetten ────────────────────────────────────────────
|
||||||
echo -e "\n=== WireGuard-Config ==="
|
echo -e "\n=== WireGuard-Config ==="
|
||||||
|
|
@ -100,7 +107,7 @@ set timeout=10
|
||||||
|
|
||||||
menuentry "Ubuntu MacBook AutoInstall" {
|
menuentry "Ubuntu MacBook AutoInstall" {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /casper/vmlinuz quiet autoinstall cloud-config-url=/dev/null ds=nocloud\;s=/cdrom/autoinstall/ ---
|
linux /casper/vmlinuz quiet autoinstall subiquity.autoinstallpath=/cdrom/autoinstall.yaml cloud-config-url=/dev/null ds=nocloud\;s=/cdrom/autoinstall/ ---
|
||||||
initrd /casper/initrd
|
initrd /casper/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,6 +123,7 @@ cp "$UBUNTU_ISO" "$OUTPUT_ISO"
|
||||||
xorriso -indev "$OUTPUT_ISO" \
|
xorriso -indev "$OUTPUT_ISO" \
|
||||||
-outdev "$OUTPUT_ISO" \
|
-outdev "$OUTPUT_ISO" \
|
||||||
-map "$TMPDIR/autoinstall" /autoinstall \
|
-map "$TMPDIR/autoinstall" /autoinstall \
|
||||||
|
-map "$TMPDIR/autoinstall.yaml" /autoinstall.yaml \
|
||||||
-map "$TMPDIR/grub-new.cfg" /boot/grub/grub.cfg \
|
-map "$TMPDIR/grub-new.cfg" /boot/grub/grub.cfg \
|
||||||
-boot_image any replay \
|
-boot_image any replay \
|
||||||
-commit
|
-commit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue