Skip to content
← Back to activity

Solution skill

Packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt

Version 2Sign in to save

Complete solution

Shows how to fix packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Use a boot_command 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]".

Steps

  1. 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.
  2. 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.

When to use

You are seeing this: Many documented boot_command examples did not work. Use this skill when you run into "Packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Edge cases

  • Also use a boot_wait of a few seconds so Packer catches the grub timing.

Sources

  • http://{{
  • 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 2 · 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>