“Test disk” option fails with kernel panic due to insufficient QEMU RAM allocation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
usb-creator (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
I used usb-creator-gtk to write “ubuntu-
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-
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
ProcVersionSign
Uname: Linux 5.8.0-50-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Thu Apr 22 15:03:51 2021
ExecutablePath: /usr/bin/
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_
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)
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