How to enable software RAID (mirroring) in Windows XP!!!

 

Here take place all the references that I gathered about this hack!

->The mod files are here also DOWNLOAD HERE (MD5-> FB5A6E64B89FAA13E6B0C95ECB55C655)

1st reference

 

I recently installed Windows XP on a system with two hard drives, intending to use the drives as mirrors. I then found out, much to my surprise, that mirroring is not enabled in Windows XP, not even in the so-called "professional" (?) version.

Fortunately, it appears that this is one of those features that are actually present in the operating system, only disabled. Thanks to a page I found with Google, from Tom's Hardware Guide, I knew exactly how to enable it.

The bottom line is that you need to hand-edit three binary system files and then install them even if Windows insists on "repairing" them by replacing your copies with the original versions.

Files to edit

The three files to edit are dmadmin.exe, dmconfig.dll, and dmboot.sys. The first two of these are in the system32 directory, while dmboot.sys is in system32\drivers. Here are the changes that need to be made (I use the elvis editor under Linux, which allows me to edit binary files).

  dmadmin.exe
Before 00001c30  73 65 72 76 65 72 6e 74 00 00 00 00 6c 61 6e 6d  servernt....lanm
00001c40  61 6e 6e 74 00 00 00 00 50 72 6f 64 75 63 74 54  annt....ProductT
After 00001c30  77 69 6e 6e 74 00 00 00 00 00 00 00 6c 61 6e 6d  winnt.......lanm
00001c40  61 6e 6e 74 00 00 00 00 50 72 6f 64 75 63 74 54  annt....ProductT
  dmconfig.dll
Before 00005140  4c 41 4e 4d 41 4e 4e 54 00 00 00 00 53 45 52 56  LANMANNT....SERV
00005150  45 52 4e 54 00 00 00 00 57 49 4e 4e 54 00 00 00  ERNT....WINNT...
After 00005140  4c 41 4e 4d 41 4e 4e 54 00 00 00 00 57 49 4e 4e  LANMANNT....WINN
00005150  54 00 00 00 00 00 00 00 53 45 52 56 45 52 4e 54  T.......SERVERNT
  dmboot.sys
Before 00011070  54 00 79 00 70 00 65 00 00 00 57 49 4e 4e 54 00  T.y.p.e...WINNT.
00011080  00 00 53 45 52 56 45 52 4e 54 00 00 00 00 4c 41  ..SERVERNT....LA
After 00011070  54 00 79 00 70 00 65 00 00 00 53 45 52 56 45 52  T.y.p.e...SERVER
00011080  4e 54 57 49 4e 4e 54 00 00 00 00 00 00 00 4c 41  NTWINNT.......LA

Note that these are slightly different from what is in Tom's Hardware Guide; I suspect the driver has been changed by Microsoft since that page has been last edited. Yes, there's a slight concern that possible future driver changes by Microsoft may render unbootable a system that was modified this way and set to boot from a RAID volume.

Replacing system files

Simply copying the edited version over the original will not work. Windows XP has a feature where it protects sensitive system files from accidental overwrites; if you copy, say, your modified version of dmboot.sys over the original, you will notice that after a few seconds, it'll revert back to the original version, even if you do the copying from the command line.

One way to overcome this difficulty is by booting from the Windows XP CD-ROM to the Windows Recovery Console, which is a DOS-like command-line environment that lets you, among other things, replace protected system files.

2nd reference
1

Pick the type of RAID

The first step is to decide what type of RAID will be needed. This can be done by looking at my article describing the different types of RAID that are available in Windows XP Pro. Note, if RAID 1 or 5 is chosen there will need to be some modified files installed. Once the type of RAID is decided upon, it’s time to move onto the hardware.

 2

Make sure you have the proper hardware

The computer will have to have at least two unused hard drive interfaces i.e. IDE, SATA or as many as is needed for the desired size of the array. Also, like any RAID solution two or more empty drives of equal size will be needed. Personally, if buying new drives, I would recommend getting two or more terabyte drives. They seem to be the best bang for the buck in today’s hard drive market. The next step is to get the proper software.

 3

Install Windows XP

If the computer already has Windows XP Pro installed on it, then just make sure that it is upgraded to Service Pack 3 and has all of the available updates installed. Once the computer is fully updated the next step can be started. If the computer doesn’t have XP Pro installed it’s time to get a copy of Windows XP Pro and install it. Once Windows XP Pro is installed make sure to install all of the updates and install Service Pack 3. If any help is needed installing Windows XP this tutorial should be of great help. Once Windows is done being installed and updated it’s time to move onto the next step.

 4

Install modified files with the Windows XP Recovery Console

(Note: if RAID 1 or 5 isn’t being used skip this step.) Now that XP Pro is installed and updated to Service Pack 3, it’s time download some files and do a do some work from the Recovery Console. Firstly, download these four files raid-setup.batdmadmin.exedmboot.sys and dmconfig.dll or DOWNLOAD HERE (MD5-> FB5A6E64B89FAA13E6B0C95ECB55C655).

 Make sure to download these files to the C:Windows\RAID directory (note: the RAID directory will need to be created). Once the files are in their proper directory put the XP Pro Install CD into the CD drive and reboot the computer. When the computer reboots, boot to the XP Pro CD as if installing Windows. When the XP installer gets to the Welcome screen press R to enter the Recovery console. Test edit.

windows xp setup screen

Once in the Recovery Console, it’s time to start entering commands. First, type in the number of the Windows install that’s going to have the RAID and hit enter. After the correct Windows install is selected the Recovery Console will ask for the account password, if there is an account password type it in and hit enter. After logged on, change the to the RAID directory that was created earlier by typing the following command

cd raid

and hitting enter. After changing to the raid directory, type the following command.

batch raid-setup.bat

Once that command executes type

exit

and hit enter.

Now that the proper files are in place it’s time to create the RAID array. Eject the Windows’s XP install CD from the CD drive, restart the computer and move onto the next step.

 5

Create the RAID array

The first step to create the RAID array is to go to the start menu and right click My Computer and select Manage (the My Computer icon may also be on the Desktop).

manage

Once in Computer Management click on the Disk Management section.

disk-management

(WARNING: This step will erase any data that is on the disks that are going to be in the array. Make sure to backup data before performing this step.) Once in Disk Management right click on one of the disks that is going to be used in the RAID array and click Convert to Dynamic Disk.

convert-to-dynamic-disk

Then select all of the disks that are going to be included in the array and click OK.

select-all-three-or-more-discs

After the disks have been converted to Dynamic Disks, right click on any one of them and select New Volume.

new-volume

Click Next at the first step of the New Volume Wizard. The second step of the wizard is to select the volume type. If you’re not sure what type of volume you want, check out Simple RAID explanation covering RAID levels 0, 1, 5 and JBOD.

select-raid-5

Once the volume type is selected click on the next button. This will brings up the Select Disks part of the wizard. In this step, click one of the disks that is going to be in the array and click the add button. Repeat this until all of the drives that are to be included in the array are added.

select-other-two-and-then-click-next

The next step is to format the volume. In this step select the desired file system and give the volume a label.

give-the-volume-a-label

The final step is to give the volume a drive letter and click next.

select-a-drive-letter

After selecting the drive letter, review all of the settings to ensure they’re current and then click finish to start formatting the disks. Be prepared to wait a while. Formatting my array was an overnight job.

review-all-of-your-settings-and-click-finish

So there you have it, an awesome, low cost RAID using Windows XP. If you want to prevent the RAID array from being disabled by future updates or service packs do not update your Windows install. Check this article on how to disable automatic updates if you’re worried about the array being broken by a future update. Personally, I think most updates will be perfectly fine. The only update I would avoid is a Service Pack 4, if one is ever released. If there are any questions ask them in the comments and I will get back to you as soon as possible.

 6

Receive emails in the event of a drive failure

To receive email notification in the event of a hard drive failure go to my article Windows XP Email Notification When a Drive Fails. This is a nice feature if your Windows XP RAID machine is sitting in a closet some where. This will ensure that you replace a failed hard drive before the whole array is ruined.


3rd reference
Microsoft Windows XP, by design, is not capable of a native software RAID5; however, capable of mirroring drives.

First you need to download free hex editor.

* Copy the following files from the Windows sub directories to somewhere else, so you may edit them with a hex editor

system32\drivers\dmboot.sys
system32\dmconfig.dll
system32\dmadmin.exe

Make sure you keep backup copies in case it all goes something wrong

* Open the files in a hex editor and replace ‘SERVERNT’ or ’servernt’ to ‘WINNT’ or ‘winnt’ and vice versa (’WINNT’ replace through ‘SERVERNT’). Make sure that the length of the lines dont change. The difference in length between the string SERVERNT and WINNT must be filled up with spaces.

* Copy the three edited files to their original location. This you can do from the recovery console, but admins may do it immediately from Windows. Make sure the Windows XP CD isn’t in your drive. Ignore windows complaining about changed files which have to be replaced with the original ones.

copy dmboot.sys system32\drivers
copy dmboot.sys system32\dllcache
copy dmconfig.dll SYSTEM32
copy dmconfig.dll system32\dllcache
copy dmadmin.exe SYSTEM32
copy dmadmin.exe system32\dllcache

* Reboot the computer.

Now you can see similar to the following screen when you try to create RAID





4th reference

About Windows Recovery console

Table of Contents

  1. What is the Recovery Console?
  2. How to install the Recovery Console to your hard drive
  3. How to start the Recovery Console
  4. Remove the prompting of a password
  5. How to use the Recovery Console
  6. Deleting the Recovery Console

What is the Recovery Console?

The Recovery Console is a special boot up method that can be used to help fix problems that are preventing your Windows installation from properly booting up into Windows. This method allows you to access the files, format drives, disable and enable services, and other tasks from a console prompt while the operating system is not loaded. It is suggested that the Recovery Console is to only be used only after Safe mode and the other standard startup options do not work. I feel that the Recovery Console is also useful in other situations such as removing malware files that start in both Safe mode and Standard Mode and thus not allowing you to delete the infection.

This tutorial will guide you through the installation of the Recovery Console and how to use it. For those who are familiar with DOS or the command prompt, you will find the Recovery Console to be very familiar. For those who are not comfortable with this type of environment, I suggest you read through this primer in order to get familiar with this type of interface:

Introduction to the Windows Command Prompt

How to install the Recovery Console to your hard drive

I recommend that you install the Recovery Console directly onto your computer so that if you need it in the future, it is readily available. The Recovery Console only takes up approximately 7 megabytes so there is no reason why you should not have it installed in case you need it.

To install the Recovery Console on your hard drive, follow these steps:

  1. Insert the Windows XP CD into your CD-ROM drive.

  2. Click the Start button.

  3. Click the Run menu option.

  4. In the Open: field type X:\i386\winnt32.exe /cmdcons , where X is the drive letter for your CD reader, and press the OK button. An image of this step can be found below:




  5. After pressing the OK button a setup window will appear similar to the one below.




    Simply press the Yes button to continue with the installation of the Recovery Console. The setup program will then attempt to do a Dynamic Update to make sure you have the latest files as shown below.






    Simply allow it to continue and then when it is finished, you will be presented with a screen similar to the one below telling you so.




  6. Press the OK button and remove the CD from your computer.

Now when you start your computer you will have an option to start the Recovery Console.

How to start the Recovery Console

To start the Recovery Console when it is installed on your hard drive you would do the following:

  1. Reboot your computer and as Windows starts it will present you with your startup options as shown in the figure below.





  2. With the arrows keys on your keyboard select the option listed as Microsoft Windows Recovery Console and press the enter key on your keyboard.

  3. The Recovery Console will start and ask you which Windows installation you would like to log on to. If you have multiple Windows installations, it will list each one, and you would enter the number associated with the installation you would like to work on and press enter. If you have just one Windows installation, type 1 and press enter.

  4. It will then prompt you for the Administrator's password. If there is no password, simply press enter. Otherwise type in the password and then press enter. If you do not know your password then see this.

  5. If you entered the correct password you will now be presented with a C:\Windows> prompt and you can start using the Recovery Console.

  6. Proceed to How to use the Recovery Console.

To start the Recovery Console directly from the Windows XP CD you would do the following:

  1. Insert the Windows XP cd in your computer.

  2. Restart your computer so you are booting off of the CD.

  3. When the Welcome to Setup screen appears, press the R button on your keyboard to start the Recovery Console.

  4. The Recovery Console will start and ask you which Windows installation you would like to log on to. If you have multiple Windows installations, it will list each one, and you would enter the number associated with the installation you would like to work on and press enter. If you have just one Windows installation, type 1 and press enter.

  5. It will then prompt you for the Administrator's password. If there is no password, simply press enter. Otherwise type in the password and then press enter. If you do not know your password then see this.

  6. If you entered the correct password you will now be presented with a C:\Windows> prompt and you can start using the Recovery Console.

  7. Proceed to How to use the Recovery Console.


Remove the prompting of a password

When the Recovery Console starts it will ask for your Administrator password before continuing. In many cases when you have XP pre installed on your computer the Recovery Console will not recognize your Administrator's password. In these situations it is possible to edit a registry setting so that the Recovery Console does not ask for a password. This setting works on both Windows XP Home and Pro editions.

To change this setting do the following:

  1. Click on the Start button.

  2. Click on the Run option

  3. Type regedit.exe in the open field and press the OK button.

  4. Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Setup\RecoveryConsole

  5. Change the value of SecurityLevel value to 1

  6. Close regedit

  7. Reboot your computer.

Now the Recovery Console will no longer ask for a password.


How to use the Recovery Console

Though the Recovery Console looks similar to a standard command prompt it is not the same. Certain commands work, while others do not, and there are new commands available to you. There is no graphical interface, and all commands must be entered by typing them into the console prompt with your keyboard and pressing enter. This may be confusing for those who are not familiar with this type of interface, but after doing a few commands it does becomes easier.

The following is a list of the available commands that you can use in the Recovery Console. When using the recovery console you can type help followed by the command to see a more detailed explanation. For example: help attrib.

Command
Description
Attrib Changes attributes on a file or directory.
Batch
Executes commands that you specify in the text file, Inputfile. Outputfile holds the output of the commands. If you omit the Outputfile parameter, output appears on the screen.
Bootcfg Allows you to modify the Boot.ini file for boot configuration and recovery.
CD (Chdir) Change directory. Operates only in the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.
Chkdsk Checks a disk for drive problems or errors. The /p switch runs Chkdsk even if the drive is not flagged as dirty. The /r switch locates bad sectors and recovers readable information. This switch implies /p. Chkdsk requires Autochk. Chkdsk automatically looks for Autochk.exe in the startup folder. If Chkdsk cannot find the file in the startup folder, it looks for the Windows 2000 Setup CD-ROM. If Chkdsk cannot find the installation CD-ROM, Chkdsk prompts the user for the location of Autochk.exe.
Cls Clears the screen
Copy Copies one file to a target location. By default, the target cannot be removable media, and you cannot use wildcard characters. Copying a compressed file from the Windows 2000 Setup CD-ROM automatically decompresses the file.
Del (Delete) Deletes one file. Operates within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. By default, you cannot use wildcard characters.
Dir Displays a list of all files, including hidden and system files.
Disable Disables a Windows system service or driver. The variable service_or_driver is the name of the service or driver that you want to disable. When you use this command to disable a service, the command displays the service's original startup type before it changes the type to SERVICE_DISABLED. Note the original startup type so that you can use the enable command to restart the service.
Diskpart Manages partitions on hard disk volumes. The /add option creates a new partition. The /delete option deletes an existing partition. The variable device is the device name for a new partition (such as \device\harddisk0). The variable drive is the drive letter for a partition that you are deleting (for example, D). Partition is the partition-based name for a partition that you are deleting, (for example: \device\harddisk0\partition1) and can be used instead of the drive variable. The variable size is the size, in megabytes, of a new partition.
Enable Enables a Windows system service or driver. The variable service_or_driver is the name of the service or driver that you want to enable, and start_type is the startup type for an enabled service. The startup type uses one of the following formats:
SERVICE_BOOT_START
SERVICE_SYSTEM_START
SERVICE_AUTO_START
SERVICE_DEMAND_START
Exit Quits the Recovery Console, and then restarts the computer.
Expand Expands a compressed file. The variable source is the file that you want to expand. By default, you cannot use wildcard characters. The variable destination is the directory for the new file. By default, the destination cannot be removable media and cannot be read-only. You can use the attrib command to remove the read-only attribute from the destination directory. The option /f:filespec is required if the source contains more than one file. This option permits wildcard characters. The /y switch disables the overwrite confirmation prompt. The /d switch specifies that the files will not be expanded and displays a directory of the files in the source.
Fixboot Writes a new startup sector on the system partition
Fixmbr Repairs the startup partition's master boot code. The variable device is an optional name that specifies the device that requires a new Master Boot Record. Omit this variable when the target is the startup device.
Format Formats a disk. The /q switch performs a quick format. The /fs switch specifies the file system.
Help If you do not use the command variable to specify a command, help lists all the commands that the Recovery Console supports.
Listsvc Displays all available services and drivers on the computer.
Logon Displays detected installations of Windows and requests the local Administrator password for those installations. Use this command to move to another installation or subdirectory.
Map Displays currently active device mappings. Include the arc option to specify the use of Advanced RISC Computing (ARC) paths (the format for Boot.ini) instead of Windows device paths.
MD (Mkdir) Creates a directory. Operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.
More/Type Displays the specified text file on screen. More will display a text file one page at a time, while Type displays the entire text file at once.
Rd (Rmdir) Removes a directory. Operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources.
Ren (Rename) Rename a file or directory. Operates only within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. You cannot specify a new drive or path as the target.
Set Displays and sets the Recovery Console environment variables.
Systemroot Sets the current directory to %SystemRoot%.


Deleting the Recovery Console

Warning: To remove the Recovery Console you need to modify the Boot.ini file. Modifying this file incorrectly can prevent your computer from starting properly. Please only attempt this step if you feel comfortable doing this.

To remove the Recovery Console from your hard drive follow these steps:

  1. Double-click on My Computer and then double-click on the drive you installed the Recovery Console (usually the C: drive).

  2. Click on the Tools menu and select Folder Options.

  3. Click on the View tab.

  4. Select Show hidden files and folders and uncheck Hide protected operating system files.

  5. Press the OK button.

  6. Now at the root folder delete the Cmdcons folder and the Cmldr file.

  7. At the root folder, right-click the Boot.ini file, and then click Properties.

  8. Click to clear the Read-only check box, and then click the OK button.

  9. Click on Start, then Run and type Notepad.exe c:\boot.ini in the Open: field and press the OK button.

  10. Remove the entry for the Recovery Console. It will look similar to this:
    C:\cmdcons\bootsect.dat="Microsoft Windows Recovery Console" /cmdcons

    Make sure you only delete that one entry.

  11. When you are done, close the notepad and save when it asks.

  12. Right click again on the boot.ini file and select Properties.

  13. Put a checkmark back in the Read-only checkbox and then press the OK button.

The recovery console should now be removed from your system.



5th reference

About RAID

RAID stands for Redundant Array of Independent Disks. It is a dynamic data storage technique which always stores data in collection of hard disks simultaneously so if any one hard disk fails from bunch or array of disk. So another will continue the work.

RAID is one of the security feature for data much similar to backup but it’s advantage is that it doesn’t take any downtime foe providing 100% data availability. This technique includes many standards known as Raid levels which are :

1.    RAID 0

2.    RAID 2

3.    RAID 5

4.    RAID 6

RAID 0 : Raid 0 is also known as strip volume. To create RAID 0 we require two equal size software Raid partitions. The device created by any Raid level is called as meta device represented as /dev/md. Each Raid volume is independently working as a normal volume or partition. Raid 0 doesn’t provide fault tolerance.

RAID 1 : Raid 1 is also known as mirror volume. It also require two equal size software Raid partitions & meta device is created. Raid 1 provides fault tolerance. RAID 1 uses 50% of overall size into overhead for providing fault tolerance & remaining 50% is available to users for data storage. Raid 1 stores a single data in both of the devices simultaneously so it has a slow Data transmission rate.

RAID 5 : RAID 5 is also known as strip with distributed parity. To create Raid 5 we must require three equal size software Raid partitions. Raid 5 provides fault tolerance by using distributed parity concept. Parity bit is a s ingle ‘1’ bit with each 8 bit data for doing the data recovery in case of data loss. It is the most popular and faithful  RAID level in the industry. Raid 5 uses 33% of overall size into overhead for providing fault tolerance and remaining 66% is available to users for data storage.

Example of some popular RAID softwares are :

EMC2 : symmtrix , Claria

IBM: T4600 Box SAN