fix: properly escape semicolon in GRUB autoinstall params
This commit is contained in:
parent
1334a97dbc
commit
19a375e38f
@ -68,7 +68,7 @@ sed -i "s/set timeout_style=.*/set timeout_style=countdown/" "$GRUB_CFG"
|
|||||||
# Anything after '---' in a GRUB linux line goes to init, not the kernel.
|
# Anything after '---' in a GRUB linux line goes to init, not the kernel.
|
||||||
# So 'autoinstall' and 'ds=' must be inserted BEFORE '---'.
|
# So 'autoinstall' and 'ds=' must be inserted BEFORE '---'.
|
||||||
# Semicolon is backslash-escaped so GRUB doesn't treat it as a command separator.
|
# Semicolon is backslash-escaped so GRUB doesn't treat it as a command separator.
|
||||||
sed -i "/^\s*linux.*vmlinuz/s/---/autoinstall ds=nocloud\\;s=\/cdrom\/nocloud\/ ---/" "$GRUB_CFG"
|
sed -i '/^\s*linux.*vmlinuz/s|---|autoinstall ds=nocloud\\;s=/cdrom/nocloud/ ---|' "$GRUB_CFG"
|
||||||
echo "✓ GRUB patched"
|
echo "✓ GRUB patched"
|
||||||
|
|
||||||
# ── Extract MBR and EFI partition from original ISO ────
|
# ── Extract MBR and EFI partition from original ISO ────
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user