Kernel parameter handling issue in EFI boot mode + work-around

Bug #1892365 reported by Thomas Dreibholz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub
New
Undecided
Unassigned
grub2 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

I am trying to create Packer autoinstall images with EFI boot using the new autoinstaller. With EFI boot mode, I noticed a kernel parameter handling issue.

Starting with a Ubuntu Server 20.04.1 ISO, I can boot the kernel of the ISO by providing the following command line parameter in *BIOS* boot mode:
      "boot_wait": "5s",
      "boot_command": [
        "<enter><enter><f6><esc><wait> ",
        "autoinstall ds=nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
        "<wait>"
       ]

However, the same approach fails in *EFI* boot mode:
      "boot_wait": "3s",
      "boot_command": [
          "<esc><wait>",
          "<esc><wait>",
          "linux /casper/vmlinuz --- autoinstall ds=nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/<enter><wait>",
          "initrd /casper/initrd<enter><wait>"
       ]

Checking /proc/cmdline, I noticed that in this case it is "... autoinstall ds=nocloud-net". The part after the semicolon is cut off.

Fix is to use quotes (") for ds="...". Then, the cmdline of the booted kernel will be correct:
      "boot_command": [
          "<esc><wait>",
          "<esc><wait>",
          "linux /casper/vmlinuz --- autoinstall ds=\"nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/\"<enter><wait>",
          "initrd /casper/initrd<enter><wait>"
       ]

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: grub-efi-amd64-bin 2.04-1ubuntu26.2
ProcVersionSignature: Ubuntu 5.4.0-42.46-generic 5.4.44
Uname: Linux 5.4.0-42-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.6
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Thu Aug 20 15:10:56 2020
InstallationDate: Installed on 2020-01-21 (212 days ago)
InstallationMedia: Kubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200117.1)
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas Dreibholz (dreibh) wrote :
Revision history for this message
Vasudevan (vasuper) wrote :

Hi Thomas,

Were you able to find a solution to this?
I am facing a similar issue on netint of ubuntu in EFI.

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

I think this problem must be "outside" Ubuntu, i.e. in whatever passes the command line to the VM/machine being started.

Changed in grub2 (Ubuntu):
status: New → Incomplete
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.