[Bug 1925682] [NEW] “Test disk” option fails with kernel panic due to insufficient QEMU RAM allocation

Travisgevans 1925682 at bugs.launchpad.net
Thu Apr 22 20:20:21 UTC 2021


Public bug reported:

I used usb-creator-gtk to write “ubuntu-20.04.2.0-desktop-amd64.iso”
from releases.ubuntu.com to a 4 GB USB stick, upon which I was given the
option to test the disk. The ISO file is uncorrupted and matches the
SHA256sum given on the site. When I attempted the test, the virtualized
system failed to boot, apparently because the VM was given only 512 MB
of RAM which is insufficient to start Ubuntu. The main error was as
follows:

Initramfs unpacking failed: write error
Failed to execute /init (error -2)
Kernel panic - not syncing: No working init found. [...]

Full output can be seen in the QEMU screenshot I attach.

I found that usb-creator-gtk launched QEMU as follows:

qemu-system-x86_64 -enable-kvm -m 512 -hda /dev/sde

I could reproduce the failure by launching this command in the host
manually with the USB stick still connected. If I used the following
command instead, the VM booted the Ubuntu ISO successfully:

qemu-system-x86_64 -enable-kvm -m 2048 -hda /dev/sde

Thus the problem seems to be that usb-creator does not launch QEMU with
an appropriate -m option.


Steps to reproduce:
1. Download the Ubuntu ISO ubuntu-20.04.2.0-desktop-amd64.iso
2. Use usb-creator-gtk to write the file to the USB device
3. When prompted, click Test Disk

Result:
The guest kernel panic shown in the attached screenshot

Expected:
A successful boot

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: usb-creator-gtk 0.3.7
ProcVersionSignature: Ubuntu 5.8.0-50.56~20.04.1-generic 5.8.18
Uname: Linux 5.8.0-50-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Thu Apr 22 15:03:51 2021
ExecutablePath: /usr/bin/usb-creator-gtk
InstallationDate: Installed on 2021-03-18 (35 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
InterpreterPath: /usr/bin/python3.8
ProcEnviron:
 LC_TIME=root.UTF-8
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
SourcePackage: usb-creator
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: usb-creator (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal

** Attachment added: "Kernel panic in QEMU guest"
   https://bugs.launchpad.net/bugs/1925682/+attachment/5491109/+files/Screenshot%20from%202021-04-22%2014-53-50.png

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to usb-creator in Ubuntu.
https://bugs.launchpad.net/bugs/1925682

Title:
  “Test disk” option fails with kernel panic due to insufficient QEMU
  RAM allocation

Status in usb-creator package in Ubuntu:
  New

Bug description:
  I used usb-creator-gtk to write “ubuntu-20.04.2.0-desktop-amd64.iso”
  from releases.ubuntu.com to a 4 GB USB stick, upon which I was given
  the option to test the disk. The ISO file is uncorrupted and matches
  the SHA256sum given on the site. When I attempted the test, the
  virtualized system failed to boot, apparently because the VM was given
  only 512 MB of RAM which is insufficient to start Ubuntu. The main
  error was as follows:

  Initramfs unpacking failed: write error
  Failed to execute /init (error -2)
  Kernel panic - not syncing: No working init found. [...]

  Full output can be seen in the QEMU screenshot I attach.

  I found that usb-creator-gtk launched QEMU as follows:

  qemu-system-x86_64 -enable-kvm -m 512 -hda /dev/sde

  I could reproduce the failure by launching this command in the host
  manually with the USB stick still connected. If I used the following
  command instead, the VM booted the Ubuntu ISO successfully:

  qemu-system-x86_64 -enable-kvm -m 2048 -hda /dev/sde

  Thus the problem seems to be that usb-creator does not launch QEMU
  with an appropriate -m option.

  
  Steps to reproduce:
  1. Download the Ubuntu ISO ubuntu-20.04.2.0-desktop-amd64.iso
  2. Use usb-creator-gtk to write the file to the USB device
  3. When prompted, click Test Disk

  Result:
  The guest kernel panic shown in the attached screenshot

  Expected:
  A successful boot

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: usb-creator-gtk 0.3.7
  ProcVersionSignature: Ubuntu 5.8.0-50.56~20.04.1-generic 5.8.18
  Uname: Linux 5.8.0-50-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.11-0ubuntu27.16
  Architecture: amd64
  CasperMD5CheckResult: skip
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Apr 22 15:03:51 2021
  ExecutablePath: /usr/bin/usb-creator-gtk
  InstallationDate: Installed on 2021-03-18 (35 days ago)
  InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
  InterpreterPath: /usr/bin/python3.8
  ProcEnviron:
   LC_TIME=root.UTF-8
   PATH=(custom, user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/zsh
  Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
  PythonDetails: N/A
  SourcePackage: usb-creator
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/1925682/+subscriptions



More information about the foundations-bugs mailing list