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

Bug #1925682 reported by Travisgevans
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usb-creator (Ubuntu)
Fix Released
Low
Unassigned

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)

Revision history for this message
Travisgevans (travisgevans) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Indeed

usb-creator-helper: cmd = ('kvm', '-m', '512', '-hda', str(dev_file))

should be updated to an higher value, could be an easy contributor task if someone wanted to tweak the value and confirms it resolves the issue

Changed in usb-creator (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usb-creator - 0.3.11

---------------
usb-creator (0.3.11) impish; urgency=medium

  * bin/usb-creator-helper: raise KVM memory limit in tests to handle
    requirements for newer Ubuntu images, thanks Philipp Kern
    <email address hidden>. Closes: LP: #1925682.

 -- Steve Langasek <email address hidden> Tue, 07 Sep 2021 17:51:18 -0700

Changed in usb-creator (Ubuntu):
status: Confirmed → Fix Released
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.