initramfs prompts because of dmraid

Bug #247027 reported by Filipe Sousa
This bug report is a duplicate of:  Bug #315735: FakeRAID fails with kernel 2.6.28. Edit Remove
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dmraid (Ubuntu)
Fix Released
High
Unassigned

Bug Description

After updating initramfs-tools in intrepid i'm no longer able to boot. I'm getting the busybox prompt. In order to boot i have to call dmraid -ay and exit.

$ lsb_release -rd
Description: Ubuntu intrepid (development branch)
Release: 8.10

$ apt-cache policy initramfs-tools
initramfs-tools:
  Installed: 0.92bubuntu3
  Candidate: 0.92bubuntu3
  Version table:
 *** 0.92bubuntu3 0
        500 http://archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

$ apt-cache policy dmraid
dmraid:
  Installed: 1.0.0.rc14-1ubuntu1
  Candidate: 1.0.0.rc14-1ubuntu1
  Version table:
 *** 1.0.0.rc14-1ubuntu1 0
        500 http://archive.ubuntu.com intrepid/universe Packages
        100 /var/lib/dpkg/status

Related branches

Revision history for this message
Andreas Simon (andreas-w-simon) wrote :

The same here. The dmraid devices (in my case /dev/mapper/isw_bgjcdcfheh_volume*) are not there when the boot scripts try to mount rootfs.
Only /mapper/control is there.

"dmraid -ay" at the busybox prompt creates all dmraid devices under /dev/mapper/ (and triggers udev to create my LVM volume devices which sit on top of the dmraid array) and the system boots fine after exiting the busybox.

BTW, this works fine under Debian Testing and SID, so it's probably introduced by Ubuntu specific patches. It also worked fine unter Gutsy.

Revision history for this message
Andreas Simon (andreas-w-simon) wrote :

Setting the package to dmraid, as this is probably a bug in dmraid's initrd magic.

Revision history for this message
Filipe Sousa (natros) wrote :

This is what I have got so far:

Begin: Mounting root file system...
Begin: Running /scripts/local-top...
no block devices found
Done.
Begin: Waiting for root file system...
Done.
Gave up waiting for root device. Common problems:

It seems that dmraid -ay can't find the block device, maybe it's being called too sooner.

If understand it right, the mount() function in scripts/local file waits for root being mounted after "run_scripts /scripts/local-top". The problem is that dmraid is called before and fails, so waiting for the root has no effect.

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

fixxed it :)

added: /sbin/udevadm settle --timeout=30
before the modprobes
in /usr/share/initramfs-tools/scripts/local-top/dmraid
and did an update-initramfs -u

---COMPLETE FILE---

#!/bin/sh

PREREQ="udev"

prereqs()
{
        echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
        prereqs
        exit 0
        ;;
esac

/sbin/udevadm settle --timeout=30
modprobe -Q dm-mod
modprobe -Q dm-mirror

[ -x /sbin/dmraid ] && /sbin/dmraid -ay

Changed in dmraid:
status: Confirmed → Fix Committed
Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

*** scripts.old/local-top/dmraid 2008-07-31 10:32:29.000000000 +0200
--- scripts/local-top/dmraid 2008-08-15 02:29:31.000000000 +0200
***************
*** 15,20 ****
--- 15,21 ----
          ;;
  esac

+ /sbin/udevadm settle --timeout=30
  modprobe -Q dm-mod
  modprobe -Q dm-mirror

Changed in dmraid:
status: Fix Committed → Confirmed
Revision history for this message
C de-Avillez (hggdh2) wrote :

marking back to Triaged. Chatted with jean-Louis Dupond, and he stated the missing line was in 8.04, and was taken out from Intrepid...

Changed in dmraid:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 247027] Re: initramfs prompts because of dmraid

This is known, and will not be fixed in this way. The plan is for dmraid to not need an initramfs script to launch it. Instead, the plan is for dmraid to have a udev rule. This rule will launch dmraid when udev gets loaded.

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Ok!

But its maby a good TEMP solution for people not wanting to type dmraid -ay every single boot :)

Revision history for this message
Phillip Susi (psusi) wrote :

Aye, dmraid is supposed to be invoked by udev now when it detects disks, and the init scripts are just supposed to keep checking for the root device to come into existence every few seconds.

Revision history for this message
Luke Yelavich (themuso) wrote :

Phillip, this is not the case. Udev does not even know about dmraid. It only knows about the physical disks that are part of the array. As I said, I am working on a udev rule to address this, so no init scripts will be needed at all.

Revision history for this message
Phillip Susi (psusi) wrote :

You seem to be contradicting yourself and disagreeing with me while agreeing with me. Yes, udev detects the physical disks, then should have a udev rule to invoke dmraid to scan them for being part of a raid set and activate if possible.

Revision history for this message
Luke Yelavich (themuso) wrote :

Heh right. Well that udev rule is what I'm working on.

Revision history for this message
Filipe Sousa (natros) wrote :

Hi Luke

It seems you have made a new dmraid package but it's still not working:

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.26-5-generic
cpio: ./sbin/dmraid-check: Cannot stat: No such file or directory

Revision history for this message
Luke Yelavich (themuso) wrote :

Oops, thanks for the heads up. Missed that one. :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dmraid - 1.0.0.rc14-2ubuntu5

---------------
dmraid (1.0.0.rc14-2ubuntu5) intrepid; urgency=low

  * debian/initramfs/dmraid.initramfs-hook/dmraid: dmraid-check ->
    dmraid-activate. (LP: #247027)

 -- Luke Yelavich <email address hidden> Thu, 28 Aug 2008 08:33:07 +1000

Changed in dmraid:
status: Triaged → Fix Released
Revision history for this message
Filipe Sousa (natros) wrote :

It's working :)

Thank you!

Revision history for this message
ViRMiN (virmin) wrote :

Seconded! Thanks!

Revision history for this message
luca (lucamarkio) wrote :

Bug still present upgrading to Intrepid Ibex beta.
Same workaround

$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

$ apt-cache policy initramfs-tools
initramfs-tools:
  Installed: 0.92bubuntu15
  Candidate: 0.92bubuntu15
  Version table:
 *** 0.92bubuntu15 0
        500 http://it.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

$ apt-cache policy dmraid
dmraid:
  Installed: 1.0.0.rc14-2ubuntu12
  Candidate: 1.0.0.rc14-2ubuntu12
  Version table:
 *** 1.0.0.rc14-2ubuntu12 0
        500 http://it.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
FrankSL (franksl) wrote :

I confirm bug is still present in ubuntu 8.10 on an hp Proliant ML310 server.
I tried other versions of dmraid from other maintainers (up until rc15) with no luck.
Even the "settle" workaround does not work.
Please tell me if you need any info about the system,
Thanks

Revision history for this message
Andreas (a-ender) wrote :

Same Problem here with a Proliant ML110G5

Revision history for this message
Bojan Ramšak (naboj) wrote :

After installation of 8.10-Intrepid from alternate CD on a FAKERAID 1
i had the same issue (initramfs prompt).

I replaced the /usr/share/initramfs-tools/scripts/local-top/dmraid
with the suggested file from Dupond Jean-Louis above
---COMPLETE FILE---
#!/bin/sh

PREREQ="udev"

prereqs()
{
        echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
        prereqs
        exit 0
        ;;
esac

/sbin/udevadm settle --timeout=30
modprobe -Q dm-mod
modprobe -Q dm-mirror

[ -x /sbin/dmraid ] && /sbin/dmraid -ay
---END OF FILE---

After this set the file executable flags
and make an update-initramfs -u

Revision history for this message
Andreas (a-ender) wrote :

Still the same in Ubuntu 9.04......

Revision history for this message
Kalisto (marcford) wrote :

I can confirm this bug still exists in 9.04

Revision history for this message
Danny Wood (danwood76) wrote :

This bug is fixed.
Please read the description and if you still have a bug report a new one.

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.