mdadm fails to activate raid partitions in 10.04 (add_mountroot_fail_hook: not found)

Bug #574808 reported by AlainKnaff
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: initramfs-tools

After upgrading a system with root on a raid partition from 9.04 to 10.04, initramfs fails to mount root in 2.6.32-21-generic.

When booting with an old kernel and initramfs (2.6.28-17), it works.

I get a message about add_mountroot_fail_hook: not found.
And indeed, such symbol is defined in scripts/functions in the old initramfs, but not in the new one.

Removing and re-installing the mdadm package, and rebuilding the new initramfs did not help.

However, if I specify the root fs as /dev/md4 (rather than with its UUID), and then do mdadm -A --scan on the initramfs prompt, everything works fine.

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

Putting the following into /usr/share/initramfs-tools/scripts/init-premount/aaamdadm, and then rebuilding the initramfs seems to help:

#!/bin/sh

mdadm -A --scan

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

Comparing with an old (9.04) kubuntu, I noticed that /usr/share/initramfs-tools/scripts/functions contained a definition for add_mountroot_fail_hook, whereas the same file for 10.04 no longer contains that definition.

initramfs-tools (which supplies the definition) is 0.92b in 9.04 and 0.93.2 in 10.04.

mdadm, on the other hand, is 2.6.7.1-1 in both versions.

It looks as if someone simply assumed that add_mountroot_fail_hook was no longer needed, without actually checking...

So, can we either have this back in the new initramfs-tools version, or have an updated mdadm version which no longer needs it?

tags: added: regression-update
Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

After un-installing initramfs-tools (with help of --force-depends), and then re-installing it, I again got a 0.92b version (even though I am in 10.04). After removing my workaround (aaamdadm) and re-generating the initramfs (using update-initramfs), everything works fine now.

The weird thing is, now it also needed an initramfs-tools-bin package (which wasn't there before).

So what happened? Did my upgrade from 9.04 to 10.04 fail to "upgrade" initramfs-tools due to the missing initramfs-tools-bin package? But then, why is the "new" version number (0.92b) less than the old one (0.93.2)?

Or was there indeed a faulty 0.93.2 package that was later retracted, and my apt-get update's didn't pick up the retraction due to the lower version number?

Inquiring minds want to know...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.