Index: dracut/modules.d/90aufs/aufs-mount.sh
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ dracut/modules.d/90aufs/aufs-mount.sh	2012-01-11 15:21:46.887432287 +0100
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# make a read-only nfsroot writeable by using aufs
+# the nfsroot is already mounted to $NEWROOT
+# add the parameter aufs to the kernel, to activate this feature
+
+# TODO: hande the /run directory, which is not yet available in Debian squeeze
+
+. /lib/dracut-lib.sh
+
+aufs=$(getargs aufs)
+
+if [ -z "$aufs" ] ; then
+    return
+fi
+
+modprobe aufs
+
+# a little bit tuning
+mount -o remount,nolock,noatime $NEWROOT
+
+mkdir -p /live/image
+mount --move $NEWROOT /live/image
+
+mkdir /cow
+mount -n -t tmpfs tmpfs /cow
+
+mount -t aufs -o noatime,noxino,dirs=/cow=rw:/live/image=rr aufs $NEWROOT
+
+mkdir -p $NEWROOT/live/cow
+mkdir -p $NEWROOT/live/image
+mount --move /cow $NEWROOT/live/cow
+mount --move /live/image $NEWROOT/live/image
+
+# aufs2 in kernel versions around 2.6.33 has a regression:
+# directories can't be accessed when read for the first the time,
+# causing a failure for example when accessing /var/lib/fai
+# when booting FAI, this simple workaround solves it
+ls $NEWROOT/*  >/dev/null 2>&1
Index: dracut/modules.d/90aufs/module-setup.sh
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ dracut/modules.d/90aufs/module-setup.sh	2012-01-11 15:21:32.172432922 +0100
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+depends() {
+    # We depend on nfs modules being loaded
+    echo nfs
+    return 0
+}
+
+install() {
+
+    inst_hook pre-pivot 10 "$moddir/aufs-mount.sh"
+}
