Comment 11 for bug 550131

Revision history for this message
Stephan B (strushb) wrote :

Thank you for getting into this, Surhbi. I managed to hack a solution into my initramfs scripts, maybe you can extract something useful for the "good solution" : )

In /usr/share/initramfs/hooks/mdadm: Create /var/run/mdadm in initramfs
> mkdir -p ${DESTDIR}/var/run/mdadm

Create /usr/share/initramfs/scripts/init-bottom/mdadm: Script that copies /var/run/mdadm to the real /var/run/
> #! /bin/sh
>
> case $1 in
> prereqs)
> exit 0
> ;;
> esac
> if [ -r /var/run/mdadm/map ]; then
> mkdir -p /dev/.initramfs/varrun/mdadm
> cp /var/run/mdadm/map /dev.initramfs/varrun/mdadm/
> fi

Using 10.04 / Lucid, /etc/init/mounted-varrun.conf then copies the mapfile to the newly created /var tmpfs. HTH