xen-blkfront module missing from initramfs, Ubuntu as DomU can't boot

Bug #839492 reported by halfgaar on 2011-09-02
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
xen-tools (Debian)
Fix Released
Unknown
xen-tools (Ubuntu)
Undecided
Axel Beckert

Bug Description

When you install a new Natty Xen DomU with xen-create-image or upgrade Maverick to Natty, the system cannot boot because the xen-blkfront module is missing from the initramfs. Therefore, the root disk device can't be found.

When that happens and the system gives a failsafe initramfs prompt when booting, do this:

modprobe xen-blkfront
exit

Then it boots.

To make it permanent:

root@ubuntu:~# echo "xen-blkfront" >> /etc/initramfs-tools/modules
root@ubuntu:~# update-initramfs -u

I tested it and it works.

I also have several 10.04 Ubuntu's as DomU which also don't have xen-blkfront in the initramfs, but it works fine (/dev/xvda can be found properly). I don't know what changed.

I also don't know which package this affects.

Sérgio Faria (sergio91pt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately this package was removed from Debian and Ubuntu because it was "obsolete, unsupported" and therefore I'm marking this as Invalid since I can't mark as Won't Fix.

xen-tools is only supported in Ubuntu 8.04.2 LTS for servers and (in the future) Ubuntu 11.10 release.

affects: ubuntu → xen-tools (Ubuntu)
Changed in xen-tools (Ubuntu):
status: New → Invalid
halfgaar (wiebe-halfgaar) wrote :

For my understanding, why is this a bug in xen-tools? None of the Ubuntu machines I run as DomU (guest OS) have xen-tools installed, or anything Xen related.

This is just about the kernel module being present in the initramfs (or it being included in the kernel) so that it recognizes /dev/xvda.

Axel Beckert (xtaran) wrote :

From an upstream point of view this may be a special case to take care of with Natty installs if Natty doesn't get fixed to include the module by default.

Sérgio Faria (sergio91pt) wrote :

I'm not familiar with this type of virtualisation tools, but from what I understood from your description the problem is caused on images created by xen-create-image, If I'm wrong please re-open it and assign it to xen-meta, as one of those packages should be responsible to update-initramfs on postint or something.

Kloana (kloana) wrote :

this problem also happens with Oneiric Beta 1. There is something wrong in the default initrd creation script.

When you create the inird-image manually for the domU the maschine is booting without any issues.

Kloana (kloana) wrote :

This problem also exists in Oneiric 11.10!

Changed in xen-tools (Ubuntu):
status: Invalid → New
Changed in xen-tools (Debian):
status: Unknown → Confirmed
Axel Beckert (xtaran) on 2011-09-14
Changed in xen-tools (Ubuntu):
status: New → Confirmed
Axel Beckert (xtaran) wrote :

I can reproduce this issue on Debian Squeeze with debootstrap from Debian Wheezy with both, Natty and Oneiric. It's definitely an issue I should tackle as xen-tools upstream.

Changed in xen-tools (Ubuntu):
status: Confirmed → In Progress
Axel Beckert (xtaran) wrote :

Unfortunately "modprobe xen-blkfront" doesn't make /dev/xvda2 appear for me, neither with Natty nor Oneiric. :-/

halfgaar (wiebe-halfgaar) wrote :

With some other problems I had, I found out that xen-tools is deprecated and no longer developed. Debian is removing/has removed the package from testing. You're supposed to use libvirt now (which I haven't tried).

I changed the package to xen-meta, because it's not necessary a bug in xen-create-image. But I think even that might not be the correct package. The Ubuntu install should run on Xen without the need to install anything xen related.

halfgaar (wiebe-halfgaar) wrote :

@comment8:

Do you get kernel messages when you do that? Do you do it from the recovery initramfs shell? Do you type exit afterwards?

Does your vmname.cfg on the dom0 have the xvda devices listed?

halfgaar wrote:
> With some other problems I had, I found out that xen-tools is deprecated
> and no longer developed.

Ehm, where did you read that? This information is outdated since at
least January 2010. I know it, I'm one of its current developers...

> Debian is removing/has removed the package from testing.

... and its Debian maintainer.

Please have a look at http://packages.qa.debian.org/x/xen-tools.html
before broadcasting such false claims.

> You're supposed to use libvirt now

Who claims that? You're supposed to use what you prefer. Nobody in the
OSS community can tell you what you _have_ to use.

  Regards, Axel
--
 ,''`. | Axel Beckert <email address hidden>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
  `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5

Axel Beckert (xtaran) wrote :
Download full text (6.8 KiB)

halfgaar wrote:
> Do you get kernel messages when you do that?

Only the first time after boot, yes:

[...]
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/xvda2 does not exist. Dropping to a shell!

BusyBox v1.17.1 (Ubuntu 1:1.17.1-10ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) modprobe xen-blkfront
[ 44.986269] blkfront device/vbd/51714 num-ring-pages 1 nr_ents 32.
[ 44.989583] blkfront device/vbd/51713 num-ring-pages 1 nr_ents 32.
[ 44.995041] Initialising Xen virtual ethernet driver.
(initramfs) exit
Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/xvda2 does not exist. Dropping to a shell!

BusyBox v1.17.1 (Ubuntu 1:1.17.1-10ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) modprobe xen-blkfront
(initramfs) exit
Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/xvda2 does not exist. Dropping to a shell!

BusyBox v1.17.1 (Ubuntu 1:1.17.1-10ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.
[...]

ls /dev/ doesn't show anything starting with x at all, even after the
modprobe:

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/xvda2 does not exist. Dropping to a shell!

BusyBox v1.18.4 (Ubuntu 1:1.18.4-2ubuntu2) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) modprobe xen-blkfront
[ 34.544021] blkfront device/vbd/51714 num-ring-pages 1 nr_ents 32.
[ 34.547113] blkfront device/vbd/51713 num-ring-pages 1 nr_ents 32.
[ 34.550799] Initialising Xen virtual ethernet driver.
(initramfs) ls /dev
vga_arbiter tty28 hvc5 ram9
rfkill tty29 hvc6 ram10
mem tty30 hvc7 ram11
null tty31 ttyS0 ram12
port tty32 ttyS1 ram13
zero tty33 ttyS2 ram14
full tty34 ttyS3 ram15
random tty35 ttyS4 loop0
urandom tty36 ttyS5 loop1
kmsg ...

Read more...

halfgaar (wiebe-halfgaar) wrote :

@Axel,
I found that here:

http://lists.debian.org/debian-backports/2010/01/msg00028.html

But you're right, that's from january 2010. I'm very glad I'm wrong, because I like using xen-tools.

Anyway, about your boot problem. What if you specify root=/dev/sda2 in your grub conf? Are you using a xen kernel in the domU perhaps? Since 2.6.32 you don't have to. I can vaguely remember that the xen kernels didn't name their disks xvda, but just sda. I have several DomU's running that still use /dev/sda as disk device.

Axel Beckert (xtaran) wrote :

Hi,

halfgaar wrote:
> @Axel,
> I found that here:
>
> http://lists.debian.org/debian-backports/2010/01/msg00028.html
>
> But you're right, that's from january 2010. I'm very glad I'm wrong,
> because I like using xen-tools.

*phew* and thanks! Yeah, that's the thread where I noticed that it has
been removed. Shortly after I decided to take over and continue its
developement for the very same reason: I like it. :-)

> Anyway, about your boot problem. What if you specify root=/dev/sda2
> in your grub conf?

Will check later, possibly not before next week...

> Are you using a xen kernel in the domU perhaps?

I'm using Ubuntu's default kernel and boot it via pygrub. Another
strange effect is btw. that the moment (py)grub ends it countdown, the
DomU gets paused and I have to unpause it before continuing. I planned
to report this after I got a working oneiric DomU.

> Since 2.6.32 you don't have to. I can vaguely remember that the xen
> kernels didn't name their disks xvda, but just sda.

Yeah, I though planned the vice versa thing: Looking if there are
specific xen kernels available and try to use those instead. Will also
check later...

  Regards, Axel
--
 ,''`. | Axel Beckert <email address hidden>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
  `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5

Axel Beckert (xtaran) on 2012-05-09
tags: added: natty
Axel Beckert (xtaran) on 2013-01-22
Changed in xen-tools (Ubuntu):
assignee: nobody → Axel Beckert (xtaran)
status: In Progress → Fix Committed
Changed in xen-tools (Debian):
status: Confirmed → Fix Committed
Changed in xen-tools (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.