SUSE Studio and Kiwi mke2fs Error

If you have followed the SUSE Studio guide on how to install kiwi locally to build your files you may end up in the unfortunate position of not being able to actually build your image.  If you the following error while trying to create the image please see the tips below:

Feb-12 14:30:54 <3> : Couldn't create ext3 filesystem: mke2fs 1.41.9 (22-Aug-2009)
mke2fs: No such file or directory while trying to determine filesystem size
The "solution" I found is described here

Petr Uzel 2010-01-04 17:31:24 UTC
It seems this bug is reproducible only if there are some active device-mapper
maps. I see two issues:

1) bnc#568048

2) kpartx uses libdevmapper to get info about the loopdevice; this worked fine
in 11.1 because bnc#568048 wasn't present there.

To fix 2), I suggest following patch:

--------
Index: multipath-tools-0.4.8/kpartx/kpartx.c
===================================================================
--- multipath-tools-0.4.8.orig/kpartx/kpartx.c  2010-01-04 16:43:57.000000000
+0100
+++ multipath-tools-0.4.8/kpartx/kpartx.c   2010-01-04 16:49:00.000000000 +0100
@@ -309,7 +309,7 @@ main(int argc, char **argv){

    off = find_devname_offset(device);

-   if (!loopdev) {
+   if (!loopdev && !is_loop_device(device)) {
        uuid = dm_mapuuid((unsigned int)MAJOR(buf.st_rdev),
                  (unsigned int)MINOR(buf.st_rdev));
        mapname = dm_mapname((unsigned int)MAJOR(buf.st_rdev),
--------

kpartx packages with the above patch are available in [1], resp [2].

Harald, Don: could you please verify that the patch fixes kiwi for you?

Hannes: Are you OK with the patch? The is_loop_device() function wasn't used
anywhere-I think this is the correct place.

[1] https://build.opensuse.org/project/show?project=home%3Apuzel%3Afixes%3A11.2
[2]
http://download.opensuse.org/repositories/home:/puzel:/fixes:/11.2/openSUSE_11.2/

Leave a Reply