Bug 1165785

Summary: mount-loop command fails: mount failed: Unknown error -1
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-20 14:14:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1242853    

Description Richard W.M. Jones 2014-11-19 17:09:49 UTC
Description of problem:

The mount-loop command fails in guestfish.

Version-Release number of selected component (if applicable):

libguestfs-tools-c-1.29.8-1.fc22.x86_64
(On Fedora 21)

How reproducible:

100%

Steps to Reproduce:

Download the disk image here:
http://oirase.annexia.org/virt-p2v/livecd-p2v-201411180515.iso

guestfish -a livecd-p2v-201411180515.iso
><fs> run
><fs> mkmountpoint /1
><fs> mount /dev/sda /1
><fs> mkmountpoint /2
><fs> mount-loop /1/LiveOS/squashfs.img /2

Actual results:

mount-loop command fails with an error like:

libguestfs: error: mount_loop: /1/LiveOS/squashfs.img on /2: mount: /sysroot/2: mount failed: Unknown error -1

Note that I can download the squashfs and then open
it with guestfish, so it doesn't seem to be a problem
with the file.

Comment 1 Richard W.M. Jones 2014-11-19 17:22:48 UTC
Seems to be a variation of bug 1159430.

Comment 2 Richard W.M. Jones 2014-11-20 13:10:14 UTC
We needed to pass the --boot parameter.  Patch posted:

https://www.redhat.com/archives/libguestfs/2014-November/msg00136.html

Comment 3 Richard W.M. Jones 2014-11-20 14:14:47 UTC
I have pushed this patch.

Comment 4 Pino Toscano 2015-10-19 12:37:13 UTC
The two patches in the series have been committed as
https://github.com/libguestfs/libguestfs/commit/8e78a830671897376c3d7585f23ce3fba684f7f1
https://github.com/libguestfs/libguestfs/commit/3dabc7a7bae709e884b56e297e7ece222e653d0c
which are both in libguestfs >= 1.29.9 (and libguestfs >= 1.28.4).