diff -urN mkinitrd/init mkinitrd-dmraid/init
--- mkinitrd/init	2011-03-22 04:04:24.000000000 +0500
+++ mkinitrd-dmraid/init	2011-05-04 14:28:26.321839410 +0600
@@ -117,6 +117,9 @@
     rootfs=*)
       ROOTFS=$(echo $ARG | cut -f2 -d=)
     ;;
+    rootfstype=*)
+      ROOTFS=$(echo $ARG | cut -f2 -d=)
+    ;;
     waitforroot=*)
       WAIT=$(echo $ARG | cut -f2 -d=)
     ;;
@@ -169,6 +172,11 @@
     fdisk -l /dev/md* 1> /dev/null 2> /dev/null
   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	2011-04-05 10:36:58.000000000 +0600
+++ mkinitrd-dmraid/mkinitrd	2011-05-04 14:37:49.229958076 +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 2011
+#   Added support for ATARAID partitions (static dmraid binary is required)
 
-MKINITRD_VERSION=1.4.6
+MKINITRD_VERSION=1.4.6a
 
 # Don't include these things from /lib/udev/ in the initrd image
 LIBUDEV_BLACKLIST="\
@@ -99,6 +101,7 @@
           then you need to pass: -K LABEL=TRAVELSTICK:/keys/alien.luks
   -M      Add the files in /etc/modprobe.d/ to the initrd
   -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:
@@ -364,6 +367,10 @@
       RAID=1
       shift
       ;;
+    -D)
+      DMRAID=1
+      shift
+      ;;
     *) # unknown, prevent infinite loop
       shift
       ;;
@@ -468,6 +475,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 0755 $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	2011-05-04 14:28:26.322989761 +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	2011-04-05 10:37:10.000000000 +0600
+++ mkinitrd-dmraid/mkinitrd.SlackBuild	2011-05-04 14:39:24.174697536 +0600
@@ -21,7 +21,7 @@
 #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-VERSION=${VERSION:-1.4.6}
+VERSION=${VERSION:-1.4.6a}
 BB=1.18.4
 BUILD=${BUILD:-11}
 
diff -urN mkinitrd/mkinitrd.conf.5 mkinitrd-dmraid/mkinitrd.conf.5
--- mkinitrd/mkinitrd.conf.5	2010-08-29 09:18:44.000000000 +0600
+++ mkinitrd-dmraid/mkinitrd.conf.5	2011-05-04 14:28:26.324001008 +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-08-29 09:21:02.000000000 +0600
+++ mkinitrd-dmraid/mkinitrd.conf.sample	2011-05-04 14:28:26.325046841 +0600
@@ -13,6 +13,7 @@
 #ROOTFS="ext3"
 #RESUMEDEV="/dev/sda2"
 #RAID="0"
+#DMRAID="0"
 #LVM="0"
 #UDEV="1"
 #MODCONF="0"
