ds=nocloud and ds=nocloud-net for automated installs do not work on a machine booted via uefi+grub2

Bug #1878066 reported by msp3k
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
subiquity
Invalid
Undecided
Unassigned
cloud-init (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

cloud-init docs are not clear that ';' in kernel cmdline is potentially missmarsed by bootloaders, and thus the values passed to ds= should be ideally escaped like ds='all the settings' because \; to separate key-value pairs can be eaten easily. see the below confusing where most of the cmdline after and including ';' got discarded

--

Attempting to automate the installation of Ubuntu Server 20.04 on a variety of machines, some that use isolinux and others that require UEFI+grub2. Booting the installer works fine on all machines tested, but adding ds=nocloud;s=<path-to-file> and ds=nocloud-net;s=<url> do not work for machines that boot via UEFI+grub2. These parameters work fine from the same install media on machines that boot via isolinux. For ds=nocloud;s=<path-to-file>, custom ISO images were used. Both adding meta-data and user-data to the cdrom and to installer.squashfs failed under UEFI, and yet both work fine for isolinux. Also, ds=nocloud-net;s=<url> failed under UEFI for both the custom ISO images and for the standard images. Both the release version of 20.04 and the latest groovy daily build from 2020-05-11 were tested. For test machines that require UEFI+grub2 automated installation appears to be impossible while using ds=...;s=... options. Install logs attached. Tests were performed by inserting an early command: "echo EARLY COMMANDS" into user-data and then checking the log files for the string "EARLY COMMANDS". This proved to be sufficient for testing isolinux boots without the need for a complete installation. For s=<url>, log files were checked after networking was established.

Tags: bitesize
Revision history for this message
msp3k (peek-nimbios) wrote :
Revision history for this message
msp3k (peek-nimbios) wrote :
Revision history for this message
msp3k (peek-nimbios) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

dsidentify logs would be better, i think they are somewhere in /run/cloud* something directory.

Cause on boot ds-identify should run and determine the data sources.

Looking at your cmdline, it seems like ';' got interpreted as the end of string/command in uefi+grub2 boot

[ 0.000000] kernel: Command line: BOOT_IMAGE=/casper/vmlinuz quiet --- ds=nocloud-net

did you try to quote the ';' as in?

ds='nocloud-net;s=<url>' ? Is any shell scripts involved at all? maybe they are eating ';' too?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Hi, I'm not completely sure what is going on here but I see this in your logs:

May 11 15:38:44 ubuntu-server kernel: [ 0.000000] Command line: BOOT_IMAGE=/casper/vmlinuz quiet --- ds=nocloud-net

This looks to me as if there is an escaping issue and everything including and after the ';' character is being lost.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :
Revision history for this message
msp3k (peek-nimbios) wrote : Re: [Bug 1878066] Re: ds=nocloud and ds=nocloud-net for automated installs do not work on a machine booted via uefi+grub2

Yes!  ds='<stuff>' works!

Thanks,

Michael

On 5/11/20 4:04 PM, Dimitri John Ledkov wrote:
> dsidentify logs would be better, i think they are somewhere in
> /run/cloud* something directory.
>
> Cause on boot ds-identify should run and determine the data sources.
>
> Looking at your cmdline, it seems like ';' got interpreted as the end of
> string/command in uefi+grub2 boot
>
> [ 0.000000] kernel: Command line: BOOT_IMAGE=/casper/vmlinuz quiet
> --- ds=nocloud-net
>
> did you try to quote the ';' as in?
>
> ds='nocloud-net;s=<url>' ? Is any shell scripts involved at all? maybe
> they are eating ';' too?
>

description: updated
Dan Watkins (oddbloke)
Changed in cloud-init (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Dan Watkins (oddbloke) wrote :

Thanks for the triage Dimitri, I agree that the cloud-init docs could be improved here.

Changed in subiquity:
status: New → Invalid
Chad Smith (chad.smith)
tags: added: bitesize
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.