[Aboriginal] Fwd: mdadm issue, including qemu images.

Rob Landley rob at landley.net
Sun Aug 19 21:47:10 PDT 2012

Ok, this is my last todo item for a release. Fedora build break: fixed.
 Arm versatile regression in 3.5: fixed. uClibc++ build break where it
complains that .configure is a directory: fixed.

On 08/16/2012 03:47 AM, Piotr Karbowski wrote:
> Re-sending the images to reproduce as requested.

Alright, let's look at this...

Rereading our previous email exchange I see that I spent an entire
evening reverse engineering your build system to figure out that the
following two lines were what I needed to run to build this package the
way you're doing it:

wget http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-3.2.3.tar.gz
make CXFLAGS='-Os -pipe -fomit-frame-pointer' CWFLAGS='-Wall' \

So, under my brand new i686 dev-environment.sh I did that, and it built,
and now I have an mdadm.static, and I ran it and it said --auto requires
an argument. Lovely, now what...

Ah, I need to add your raid image as /dev/hdc.  Ok, extract the tarball
you sent me, add QEMU_EXTRA="-hdc /path/to/small-raid1.qcow2" and... it
says --auto requires an argument.

Ok, dug up the email I'm replying to now, and that says --scan instead
of --auto, and that's... still not happy. You link to a message:


Read, read... And there's an "mdadm.config" which you have never
bothered to attach to anything, so I have to loopback mount your image
to get it... except I can't, because it's an initramfs.

Ok, I still have your build directory lying around here somewhere...
there's no mdadm.conf in there either. Let's try grep -r... ah, it's
generated by functions.sh, obviously I should have guessed.

So mdadm has an --examine --scan but wants you to write the output of
that to an absolute path so it can read it back in. Lovely. (Who wrote
this thing?)

And now it's failing because the aboriginal linux kernel doesn't have md
support built in.  It's in the device drivers menu, switch on just about
everything in there, rebuild the kernel, boot back in...

cp -r /usr/etc /tmp &&
mount --bind /tmp/etc /usr/etc &&
./mdadm.static --examine --scan > /etc/mdadm.conf &&
./mdadm.static --assemble --scan

And it says:

md: md1 stopped.
md: hdc does not have a valid v1.0 superblock, not importing!
md: md_import_device returned -22
mdadm: failed to add 22:1 to /dev/md/1: Invalid argument
mdadm: /dev/md/1 assembled from 0 drives - not enough to start the array.

I _think_ it's complaining about the qcow image you sent me.  Possibly
my host qemu isn't built with qcow support?

I've now spent a couple hours trying to reproduce your test case in a
dev-environment.sh boot of a stock aboriginal linux image running under
qemu, and I still don't have anything that looks like the failure in
your message.

All of this work is still to REPRODUCE YOUR TEST CASE.  If you're
wondering why it takes so long to test your bug reports... now you know.
You do not give me isolated orthogonal test cases demonstrating an issue
in a way I can easily reproduce in an environment I'm familiar with.

The majority of the work here hasn't been anything to do with aboriginal
linux, it's been laboriously trying to unwrap your test case to reverse
engineer your custom system to see what you're doing.

Could you please get me a test case that shows my stuff failing? Pretty
please? When I've built a fresh system-image-i686: whare are the minimal
set of steps I do in that to reproduce your issue?

Sigh. I'll try to find some time to continue hacking away at this
tomorrow, but I might just cut a release and punt this to next time.

> -- Piotr.


> -------- Original Message --------
> Subject: mdadm issue, including qemu images.
> Date: Fri, 16 Mar 2012 23:33:06 +0100
> From: Piotr Karbowski <piotr.karbowski at gmail.com>
> To: rob at landley.net
> Hi, we spoke on irc earlier. The quick summary is on
> http://lists.uclibc.org/pipermail/uclibc/2012-March/046482.html
> if I build mdadm inside uclibc's buildroot (which use 0.9.32 uclibc) it
> does work, however if I build it inside aboriginal (tested 1.1.1 and
> 1.0.3) it fail on 'mdadm --assemble --auto'. Maybe kernel headers? I
> have no idea.
> Attached two qemu images, one contain bootloader (extlinux), initramfs
> (better-initramfs v0.5 + your strace binary) and kernel and another is
> empty raid1 array with one device set as missing, without any filesystem
> on it, you can run it via:
> qemu-kvm -hda better-initramfs-boot.qcow2 -hdb small-raid1.qcow2
> If you wish to test it more, you can grab better-initramfs from
> github.com/slashbeast/better-initramfs, it should be failry easy to use,
> before 'make image' you can place whatever you want in sourceroot/ dir,
> then replace output/initramfs.cpio.gz with the one inside
> better-initramfs-boot.qcow2 and you should be good.
> Thanks for looking into it.
> -- Piotr.

GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation.  Pick one.

More information about the Aboriginal mailing list