On Tue, Sep 06, 2011 at 01:16:42PM -0400, Ben Clay wrote:
Rich-
Sorry for the delay, my box went down over the weekend.
I have zerofree installed to /usr/sbin, but it's from the EPEL 5 repo when
I'm using CentOS 6 x86_64. I was unable to find a zerofree rpm for
CentOS/RHEL 6 x86_64. I manually installed the zerofree 1.0.1 rpm since yum
wouldn't pick it up, and /usr/sbin/zerofree appears to run.
However, in guestfish, it's missing:
><fs> available "zerofree"
libguestfs: error: available: zerofree: group not available
Here is the code:
http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/zerofree.c;h=f98...
As you can see, it is checking for a zerofree binary somewhere along
the $PATH inside the appliance. In the appliance,
PATH=/usr/sbin:/usr/bin:/sbin:/bin
><fs> debug ll /usr/sbin
[...]
-rwxr-xr-x 1 root root 52992 Nov 12 2010 vipw
-rwxr-xr-x 1 root root 17392 Jun 25 12:40 zdump
-rwxr-xr-x 1 root root 50256 Jun 25 12:40 zic
Yup, not there.
Here is my guestfish version:
]# guestfish version
major: 1
minor: 2
release: 7
extra:
Does this version not have zerofree support? I checked the release notes
and do not see it mentioned.
By the way, this is a really really old version of libguestfs ...
There should be a host file called something similar to
/usr/lib*/guestfs/initramfs.epel-5.i686.supermin.hostfiles
(it might have a slightly different name).
This file should contain a line:
./usr/sbin/zerofree
For example:
$ grep zerofree /usr/lib/guestfs/initramfs.epel-5.i686.supermin.hostfiles
./usr/sbin/zerofree
If that line is there, then /usr/sbin/zerofree on the host filesystem
should be copied into the appliance.
If it is not there, you could try adding that line. NB the initial dot.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org