Ubuntu

guestmount does not work, libguestfs-test-tool test is not ok

Reported by Fred van Zwieten on 2012-02-11
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
libguestfs (Ubuntu)
Medium
Unassigned
Precise
Undecided
Unassigned
Quantal
Medium
Unassigned
seabios (Ubuntu)
Medium
Serge Hallyn
Precise
Undecided
Unassigned
Quantal
Medium
Serge Hallyn

Bug Description

====================================
SRU Justification (for seabios):
1. Impact: guestmount does not work
2. Development fix: apply a patch from upstream to handle zero allocations
3. stable fix: same as development fix
4. Test case: run guestmount (see below)
5. Regression potential: this patch was cleanly cherrypicked from upstream, so
no regressions are expected.
====================================

guestmount does not work. libguestfs-test-tool also does not finish successfully. Here is the output from libguestfs-test-tool:

fred@pegasus:~$ libguestfs-test-tool
===== Test starts here =====
LIBGUESTFS_DEBUG=1
TMPDIR=(not set)
libguestfs: new guestfs handle 0xc14f60
library version: 1.14.8
guestfs_get_append: (null)
guestfs_get_attach_method: appliance
guestfs_get_autosync: 1
guestfs_get_direct: 0
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib/guestfs
guestfs_get_pgroup: 0
guestfs_get_qemu: /usr/bin/kvm
guestfs_get_recovery_proc: 1
guestfs_get_selinux: 0
guestfs_get_smp: 1
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: [00000ms] febootstrap-supermin-helper --verbose -f checksum '/usr/lib/guestfs/supermin.d' x86_64
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null)
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
checking modpath /lib/modules/3.2.0-15-generic is a directory
picked vmlinuz-3.2.0-15-generic because modpath /lib/modules/3.2.0-15-generic exists
checking modpath /lib/modules/3.2.0-14-generic is a directory
picked vmlinuz-3.2.0-14-generic because modpath /lib/modules/3.2.0-14-generic exists
supermin helper [00000ms] finished creating kernel
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/init.img
supermin helper [00000ms] adding kernel modules
supermin helper [00080ms] finished creating appliance
libguestfs: [00083ms] begin building supermin appliance
libguestfs: [00083ms] run febootstrap-supermin-helper
libguestfs: [00083ms] febootstrap-supermin-helper --verbose -f ext2 /usr/lib/guestfs/supermin.d x86_64 /var/tmp/guestfs.dMVDN4/kernel /var/tmp/guestfs.dMVDN4/initrd /var/tmp/guestfs.dMVDN4/root
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = /var/tmp/guestfs.dMVDN4/kernel, initrd = /var/tmp/guestfs.dMVDN4/initrd, appliance = /var/tmp/guestfs.dMVDN4/root
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
checking modpath /lib/modules/3.2.0-15-generic is a directory
picked vmlinuz-3.2.0-15-generic because modpath /lib/modules/3.2.0-15-generic exists
checking modpath /lib/modules/3.2.0-14-generic is a directory
picked vmlinuz-3.2.0-14-generic because modpath /lib/modules/3.2.0-14-generic exists
supermin helper [00000ms] finished creating kernel
supermin helper [01793ms] finished mke2fs
supermin helper [01793ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [01793ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [01798ms] visiting /usr/lib/guestfs/supermin.d/init.img
febootstrap-supermin-helper: ext2: parent directory not found: /lib: File not found by ext2_lookup
libguestfs: error: external command failed, see earlier error messages
libguestfs-test-tool: failed to launch appliance
libguestfs: closing guestfs handle 0xc14f60 (state 0)

I have also a up-to-date fedora16 partition running where is al works great.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libguestfs0 1:1.14.8-1
ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
Uname: Linux 3.2.0-15-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Sat Feb 11 14:26:13 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120210)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: libguestfs
UpgradeStatus: No upgrade log present (probably fresh install)

Fred van Zwieten (fvzwieten) wrote :
Fred van Zwieten (fvzwieten) wrote :

OK, I have been working with hillu, who does upstream febootstrap for Debian. We have found out why this happens. Somehow packages get selected twice during procssing and building the hostfiles file. febootstrap has been patched for this and will make the list of packages unique. This does not solve the root cuase, because we don' t know why apt returns dups.

hillu has pushed a working febootstrap 3.12-2 to Debian/unstable last night. Would be great if that would be pushed into precise.

Fred van Zwieten (fvzwieten) wrote :

This does not solve the bug completely. See here for a second (kernel) bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/931371

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libguestfs (Ubuntu):
status: New → Confirmed

Note on febootstrap (may not be directly related to this bug):

febootstrap 3.12 reveals a bug in Ubuntu 12.04's APT.

You need 3.14 to work around that. I would recommend using at least 3.14.

https://github.com/libguestfs/febootstrap/commit/6987ad1529dd67e7e1c990fe5b011c51e8625837

Furthermore, febootstrap <= 3.14 reveals a bug in e2fsprogs, which needs to be worked around with another patch:

https://github.com/libguestfs/febootstrap/commit/386b5985098fedf7bcd111553b8b6b73599df6c9
http://www.spinics.net/lists/linux-ext4/index.html#31432

Stephane Neveu (stefneveu) wrote :

@Richard WM Jones

Running febootstrap 3.14 on ubuntu-server 12.04, I have the following message running libguestfs-test-tool :
vda: unknown partition table
The test is nok.
Is this patch going to fix it ?

Many thanks

All of my thoughts on 12.04 are now collected in this thread. Make sure you read through the whole thread:

https://www.redhat.com/archives/libguestfs/2012-April/thread.html#00028

In particular, there is a bug in the seabios shipped in Ubuntu 12.04 which looks like the one you are seeing. Note: (a) I cannot fix this, it's an Ubuntu bug and (b) my email to the maintainer hasn't been answered.

Stephane Neveu (stefneveu) wrote :

Ok thank you Richard, is it Dustin Kirkland ? I'll try to contact my Canonical support...

Stephane Neveu (stefneveu) wrote :

Ok if it may help other people reading this ...
The patch provided by Richard Jones is working fine for me !
(febootstrap 3.14 on ubuntu-server 12.04 and seabios 0.6.2-0ubuntu2)

Just follow these steps to patch seabios :
https://www.redhat.com/archives/libguestfs/2012-April/msg00081.html

Changed in seabios (Ubuntu):
status: New → Confirmed
Changed in libguestfs (Ubuntu):
importance: Undecided → Medium
Changed in seabios (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Serge Hallyn (serge-hallyn)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package seabios - 0.6.2-0ubuntu3

---------------
seabios (0.6.2-0ubuntu3) quantal; urgency=low

  * Update maintainer
  * Cherrypicked debian/patches/fix-alignment-bug-in-pci_bios_init_root_regions
    from upstream (LP: #930634)
 -- Serge Hallyn <email address hidden> Fri, 04 May 2012 11:04:27 -0500

Changed in seabios (Ubuntu Quantal):
status: Confirmed → Fix Released
Serge Hallyn (serge-hallyn) wrote :

Thanks, Richard. I'm sorry, it seems I wasn't getting these bug mails.

Can you confirm that I should set the libguestfs status of this bug to invalid?

description: updated

Not a libguestfs bug (it's in seabios), so setting libguestfs -> invalid.

Changed in libguestfs (Ubuntu Quantal):
status: Confirmed → Invalid
Changed in libguestfs (Ubuntu Precise):
status: New → Invalid
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in seabios (Ubuntu Precise):
status: New → Confirmed

Hello Fred, or anyone else affected,

Accepted seabios into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in seabios (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed
Fred van Zwieten (fvzwieten) wrote :

Martin, updated to de seabios package in precise-proposed. I can verify that this fix solves the problem. Thank you all for this.

Stephane Neveu (stefneveu) wrote :

Ok same here, it works for me, thank you guys.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package seabios - 0.6.2-0ubuntu2.1

---------------
seabios (0.6.2-0ubuntu2.1) precise-proposed; urgency=low

  * Update maintainer
  * Cherrypicked debian/patches/fix-alignment-bug-in-pci_bios_init_root_regions
    from upstream (LP: #930634)
 -- Serge Hallyn <email address hidden> Fri, 04 May 2012 11:04:27 -0500

Changed in seabios (Ubuntu Precise):
status: Fix Committed → Fix Released
rooijan (rrossouw) wrote :

FYI I am pretty sure Seabios 0.6.2-0ubuntu2.1 did not resolve this for me.

root@usdrkvm201:~# guestfish --ro -d usdrcfg201 -i
febootstrap-supermin-helper: ext2: parent directory not found: /lib: File not found by ext2_lookup
libguestfs: error: external command failed, see earlier error messages

root@usdrkvm201:~# aptitude show seabios | grep Ver
Version: 0.6.2-0ubuntu2.1

Same error message when running libguestfs-test-tool.

Update to febootstrap 3.14-2.

Run 'sudo update-guestfs-appliance'.

rooijan (rrossouw) wrote :

Thanks Richard I can confirm that now Ubuntu 12.04 64bit now works for me.

I am getting this same error with seabios 0.6.2-0ubuntu2.1 and febootstrap 3.14-2 on Precise 32-bit. Reported as bug #1186228 because presumably it's a different underlying bug. Or perhaps the fix here doesn't work on 32-bit kernels.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions