2

I'm running Debian Jessie amd64 with qemu version 1:2.1+dfsg-11 and want to install Ubuntu 14.04 for amd64 in a qemu virtual machine. But the installation process doesn't start because of a kernel panic when trying to run init. Steps to reproduce:

$ wget http://ftp.tu-clausthal.de/ftp/mirror/ubuntu/releases/14.04.2/ubuntu-14.04.2-desktop-amd64.iso
$ qemu-img create -f qcow2 ubuntu-trusty.qcow 4G
$ qemu-system-x86_64 -hda ubuntu-trusty.qcow -cdrom ubuntu-14.04.2-desktop-amd64.iso

Then just wait for the live system to boot. This will not succeed as one will get a kernel panic.

I started qemu with the -serial stdio to get the full error message. The kernel says the following when crashing:

[    0.028000] Failed to access perfctr msr (MSR c1 is 0)
/init: line 226: maybe_break: not found
/init: line 233: run_scripts: not found
/init: line 235: maybe_break: not found
/init: line 237: load_modules: not found
/init: line 242: maybe_break: not found
/init: line 244: run_scripts: not found
/init: line 247: maybe_break: not found
/init: line 248: log_begin_msg: not found
/init: line 250: parse_numeric: not found
/init: line 251: maybe_break: not found
/init: line 252: mountroot: not found
/init: line 253: log_end_msg: not found
/init: line 255: maybe_break: not found
/init: line 257: run_scripts: not found
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
/init: line 325: panic: not found
/init: line 327: maybe_break: not found
/init: line 352: can't open /root/dev/console: no such file
[    3.486122] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[    3.486122] 
[    3.488058] CPU: 0 PID: 1 Comm: init Not tainted 3.16.0-30-generic #40~14.04.1-Ubuntu
[    3.488058] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
[    3.488058]  ffff88000500e380 ffff880005d9be48 ffffffff81762590 ffffffff81a76088
[    3.488058]  ffff880005d9bec0 ffffffff8175aa62 ffff880000000010 ffff880005d9bed0
[    3.488058]  ffff880005d9be70 ffffffff00000000 0000000000000200 ffff880005d904a8
[    3.488058] Call Trace:
[    3.488058]  [<ffffffff81762590>] dump_stack+0x45/0x56
[    3.488058]  [<ffffffff8175aa62>] panic+0xc8/0x1fc
[    3.488058]  [<ffffffff810709f7>] do_exit+0xa57/0xa60
[    3.488058]  [<ffffffff81070a7f>] do_group_exit+0x3f/0xa0
[    3.488058]  [<ffffffff81070af4>] SyS_exit_group+0x14/0x20
[    3.488058]  [<ffffffff8176aced>] system_call_fastpath+0x1a/0x1f
[    3.488058] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    3.488058] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[    3.488058] 

So my question is: how do I install Ubuntu 14.04 in a qemu virtual machine?

3
  • Is this a 32-bit or 64-bit host?
    – Elder Geek
    Apr 3, 2015 at 16:09
  • Related: askubuntu.com/questions/40046/…
    – Elder Geek
    Apr 3, 2015 at 16:22
  • Apologies for the confusion, but the question is related to running 64-bit on 64-bit. I thought that was clear from the title of the question as well as the content.
    – Elder Geek
    Apr 3, 2015 at 16:29

1 Answer 1

2

The error above turns out to mean: "not sufficient system memory to load ramdisk".

So if I start qemu with -m 512 then everything works as expected.

On the other hand I'm a bit puzzled which resources tells me the minimum system requirements for Ubuntu 14.04. For example this page says it's 512 MiB RAM and 5 GB of hard-drive space while this page tells me it's 1.5 GB RAM and 7 GB of hard-drive space.

The latter seems more authoratative but a minimum of 7 GB of hard disk space is not the same value that is given during the installation process where it says that at least 6.5 GB of space are needed.

In fact, the 6.5 GB are not really true either. It turns out that the following two commands create a qcow2 and bare disk image of minimal size, respectively:

qemu-img create -f qcow2 ubuntu-trusty.qcow 6527123968
fallocate -l 6527123457 ubuntu-trusty.img

The values are curious because

  1. they are different (but this might be due to the qcow format)
  2. because 6527123968=12748289*512
  3. because 6527123457-1=12748288*512
  4. because neither one or the other are close to either 6.5 GB or 6.5 GiB. They are about 6.53 GB or 6.08 GiB
  5. the installer forces me to create a 6.08 GiB disk image but ends up only using 3.4 GiB of the primary partition

But this is now way off topic ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .