diff -urN mkinitrd/init mkinitrd-dmraid/init
--- mkinitrd/init	2010-05-08 10:47:18.000000000 +0600
+++ mkinitrd-dmraid/init	2010-06-02 12:46:12.452082622 +0600
@@ -122,6 +122,9 @@
     rootfs=*)
       ROOTFS=$(echo $ARG | cut -f2 -d=)
     ;;
+    rootfstype=*)
+      ROOTFS=$(echo $ARG | cut -f2 -d=)
+    ;;
     waitforroot=*)
       WAIT=$(echo $ARG | cut -f2 -d=)
     ;;
@@ -173,6 +176,11 @@
     /sbin/mdadm -A -s
   fi
 
+  # Initialize ATARAID:
+  if [ -x /sbin/dmraid ]; then
+    /sbin/dmraid -ay -Z
+  fi
+
   # Unlock any encrypted partitions necessary to access the
   # root filesystem, such as encrypted LVM Physical volumes, disk
   # partitions or mdadm arrays.
diff -urN mkinitrd/mkinitrd mkinitrd-dmraid/mkinitrd
--- mkinitrd/mkinitrd	2010-03-27 20:49:21.000000000 +0500
+++ mkinitrd-dmraid/mkinitrd	2010-06-02 12:54:01.000211229 +0600
@@ -42,8 +42,10 @@
 #   Add lukskey option (-K). Automatically add kernel modules listed in
 #   load-kernel-modules if that file is executable.
 #   Yada yada yada.
+# Modified by Rytchkov Alexey <lilo0@nm.ru> May 2010
+#   Added support for ATARAID partitions (static dmraid binary is required)
 
-MKINITRD_VERSION=1.4.5
+MKINITRD_VERSION=1.4.5a
 
 print_usage() {
   cat << EOF
@@ -91,6 +93,7 @@
           "TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks",
           then you need to pass: -K LABEL=TRAVELSTICK:/keys/alien.luks
   -R      Add support for RAID partitions
+  -D      Add support for ATARAID partitions
   -V      Display version number
 
 A simple example:  Build an initrd for a reiserfs root partition:
@@ -341,6 +344,10 @@
       RAID=1
       shift
       ;;
+    -D)
+      DMRAID=1
+      shift
+      ;;
     *) # unknown, prevent infinite loop
       shift
       ;;
@@ -445,6 +452,17 @@
   fi
 fi
 
+# Include ATARAID support in initrd
+if [ ! -z "$DMRAID" ]; then
+  if [ -r /sbin/dmraid ]; then
+    mkdir -p $SOURCE_TREE/sbin
+    cp /sbin/dmraid $SOURCE_TREE/sbin/dmraid
+    chmod 755 $SOURCE_TREE/sbin/dmraid
+  else
+    echo "ERROR:  dmraid binary is missing, ATARAID support not installed"
+  fi
+fi
+
 # Include udev in initrd
 if [ ! -z "$UDEV" ]; then
   cp /sbin/udev* $SOURCE_TREE/sbin/
diff -urN mkinitrd/mkinitrd.8 mkinitrd-dmraid/mkinitrd.8
--- mkinitrd/mkinitrd.8	2010-03-27 21:18:34.000000000 +0500
+++ mkinitrd-dmraid/mkinitrd.8	2010-06-02 12:40:06.612213465 +0600
@@ -58,6 +58,9 @@
 .B \-R
 ]
 [
+.B \-D
+]
+[
 .B \-V
 ]
 .SH DESCRIPTION
@@ -179,6 +182,10 @@
 This option adds RAID support to the initrd, if a static mdadm binary is
 available on the system.
 .TP
+.B \-D
+This option adds ATARAID support to the initrd, if a static dmraid binary is
+available on the system.
+.TP
 .B \-V
 Display version information and exit.
 .SH EXAMPLES
diff -urN mkinitrd/mkinitrd.SlackBuild mkinitrd-dmraid/mkinitrd.SlackBuild
--- mkinitrd/mkinitrd.SlackBuild	2010-05-08 10:47:28.000000000 +0600
+++ mkinitrd-dmraid/mkinitrd.SlackBuild	2010-06-02 12:56:54.308019475 +0600
@@ -21,7 +21,7 @@
 #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-VERSION=${VERSION:-1.4.5}
+VERSION=${VERSION:-1.4.5a}
 BB=1.15.3
 NUMJOBS=${NUMJOBS:--j7}
 BUILD=${BUILD:-2}
diff -urN mkinitrd/mkinitrd.conf.5 mkinitrd-dmraid/mkinitrd.conf.5
--- mkinitrd/mkinitrd.conf.5	2010-03-27 21:36:57.000000000 +0500
+++ mkinitrd-dmraid/mkinitrd.conf.5	2010-06-02 12:40:06.613211545 +0600
@@ -157,6 +157,16 @@
 RAID="1"          # Add RAID support to initrd
 
 .TP 5
+.I DMRAID
+This option adds the dmraid binary to the initrd to support ATARAID.
+.br
+Examples:
+.br
+DMRAID="0"          # Do not add ATARAID support to initrd
+.br
+DMRAID="1"          # Add ATARAID support to initrd
+
+.TP 5
 .I LVM
 This option adds support for LVM partitions into the initrd.
 If you wish to add LVM support to the initrd, then set this to 1;
diff -urN mkinitrd/mkinitrd.conf.sample mkinitrd-dmraid/mkinitrd.conf.sample
--- mkinitrd/mkinitrd.conf.sample	2010-03-04 05:04:45.000000000 +0500
+++ mkinitrd-dmraid/mkinitrd.conf.sample	2010-06-02 12:40:06.613211545 +0600
@@ -13,6 +13,7 @@
 #ROOTFS="ext3"
 #RESUMEDEV="/dev/sda2"
 #RAID="0"
+#DMRAID="0"
 #LVM="0"
 #UDEV="1"
 #WAIT="1"
