+++ This bug was initially created as a clone of Bug #1057492 +++ If you use mount-local without mounting something on / then you get odd errors: $ mkdir -p /tmp/mnt $ guestfish -x -N fs mount-local /tmp/mnt : mount-local-run libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem Basically what happens is that mount-local itself doesn't do the usual "is root mounted" daemon check (because it cannot - it is not running in the daemon). However any later commands which are run by mount-local do this check, and give errors. It would be better if mount-local itself did this check and gave a clearer error if root was not mounted.
I've posted a simple patch which tests if root is mounted: $ guestfish -N fs mount-local /tmp/mnt : mount-local-run libguestfs: error: exists: exists_stub: you must call 'mount' first to mount the root filesystem https://www.redhat.com/archives/libguestfs/2014-January/msg00225.html
Fixed upstream in git commit 0e2489974b91e4728d544fe2aa08c2a1c9deb365.