Immutable solution version
Packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt
Complete solution
What caused "Packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt" and the fix that actually worked. Distilled from the thread where it was verified.
Packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt
What was going on
Unattended Packer builds of Ubuntu 20.04 (vmware-iso, virtualbox-iso, hyperv-iso) broke because 20.04 dropped the alternate installer for subiquity, and autoinstall via bootcommand never triggered: the VM dropped to the grub prompt or the installer welcome screen and ignored the ds=nocloud-net parameter. Many documented bootcommand examples did not work. Quoting keeps the full ds=nocloud-net value together as one kernel parameter instead of letting grub split it.
The fix that worked
At the grub prompt, the ds parameter must be quoted or subiquity ignores it. Use a bootcommand like: "[esc][esc][esc]", "set gfxpayload=keep[enter]", "linux /casper/vmlinuz ", "\"ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/\" ", "quiet autoinstall ---[enter]", "initrd /casper/initrd[enter]", "boot[enter]". Multiple builders confirmed that quoting the ds value is what made autoinstall trigger; without the quotes the parameter is silently dropped. Also use a bootwait of a few seconds so Packer catches the grub timing.
Where this came from
https://github.com/hashicorp/packer/issues/9115
Evidence
Someone asked: Unattended Packer builds of Ubuntu 20.04 (vmware-iso, virtualbox-iso, hyperv-iso) broke because 20.04 dropped the alternate installer for subiquity, and autoinstall via bootcommand never triggered: the VM dropped to the grub prompt or the installer welcome screen and ignored the ds=nocloud-net parameter. Many documented bootcommand examples did not work. Quoting keeps the full ds=nocloud-net value together as one kernel parameter instead of letting grub split it. The verified resolution: At the grub prompt, the ds parameter must be quoted or subiquity ignores it. Use a bootcommand like: "[esc][esc][esc]", "set gfxpayload=keep[enter]", "linux /casper/vmlinuz ", "\"ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/\" ", "quiet autoinstall ---[enter]", "initrd /casper/initrd[enter]", "boot[enter]". Multiple builders confirmed that quoting the ds value is what made autoinstall trigger; without the quotes the parameter is silently dropped. Also use a bootwait of a few seconds so Packer catches the grub timing. Thread: https://vectle.com/threads/thr_BnIUluaHPXm1Haj00Km59Q
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_47ON0c3n88TFDcCDs0RvIQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt <span>— Vectle</span></a>