[Libguestfs] Supermin on mageia

Richard W.M. Jones rjones at redhat.com
Thu Aug 15 07:51:00 UTC 2013


On Thu, Aug 15, 2013 at 11:36:38AM +0800, Joseph Wang wrote:
> Hello,
> 
> I'm trying to get supermin to work on mageia and I've run into the
> following glitch.  Mageia has /etc/init.d as a symlink that is pointing to
> /etc/rc.d/init.d and after I generate the appliance and run supermin-helper
> I get
> 
> supermin helper [00033ms] finished creating kernel
> supermin helper [01415ms] finished mke2fs
> supermin helper [01415ms] visiting /usr/lib64/guestfs/supermin.d
> supermin helper [01416ms] visiting /usr/lib64/guestfs/supermin.d/base.img
> supermin helper [01548ms] visiting /usr/lib64/guestfs/supermin.d/daemon.img
> supermin helper [01555ms] visiting /usr/lib64/guestfs/supermin.d/hostfiles
> supermin-helper: ext2: parent directory not found: rc.d/init.d: File not
> found by ext2_lookup
> 
> What appears to be happening is that supermin-helper is trying to set up
> the symlink from init.d to rc.d/init.d before rc.d has been created.
> 
> Do you have any suggestions as to how to handle this?

This is a bug in supermin.  But as a simple workaround you could
create a file which creates the required directory /etc/rc.d/init.d
before hostfiles is loaded.  Something like this:

  mkdir -p /tmp/etc/rc.d/init.d
  cd /tmp
  find etc | cpio --quiet -o -H newc > /tmp/00-rc.img
  cp /tmp/00-rc.img /usr/lib64/guestfs/supermin.d/

Note files in supermin.d are visited in lexicographic order.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list