Setting up Debian on a Serial ATA RAID device

This page explains how to use Debian Installer to set up Debian on a Serial ATA (SATA) RAID disk (using dmraid).

/!\ Note that support for SATA RAID is experimental and currently only available in the Lenny version of the installer (daily built images). It is strongly recommended that you make a backup of any data on your system that you do not wish to lose before using this option.

SATA RAID support has currently only been tested on i386, but should also work on amd64. Other architectures are not supported.

There have not yet been any tests installing Debian alongside an existing Windows installation. We expect that that is possible, but there is a risk that the Windows partition will become corrupted.

SATA RAID or Software RAID

The RAID support offered by most Serial ATA disk controllers is not hardware RAID. Instead it can best be classified as "software RAID provided by the BIOS of the controller".

Various terms are used to refer to this type of RAID support: SATA RAID, BIOS RAID, fake RAID, software RAID. We have decided to use the term SATA RAID. We prefer to reserve the term "software RAID" to refer to the RAID support in the Linux kernel.

The general consensus is that using Linux software RAID is to be preferred over using this relatively cheap, and because of that possibly less reliable, software RAID offered by SATA disk controllers.

However, if your system already has another operating system installed on a SATA RAID disk and you want to install Debian alongside that, using dmraid is basically your only option.

In all other cases we strongly suggest that you use Linux software RAID (using the mdadm package), which is also much better supported by the installer.

Of course, if your system has a SATA-based RAID controller that does offer real hardware RAID, you should just completely ignore the information on this page.

Other resources

Translations

Translations for this page are available in:

Booting the installer

Because the support for SATA RAID is still experimental, you will need to boot the installer with a special boot parameter:

install dmraid=true

Hardware detection

The SATA RAID disk should be automatically detected and if it is detected, some additional installer components will be loaded for support during partitioning.

If it's not detected, please file an installation report!

Partitioning

In the current implementation, support for SATA RAID devices is not really integrated in partman. What we have done is to make sure that dmraid devices are displayed and that basic partitioning is possible. We hope that the current basic support will help to gradually implement more structural support later. This may require changes in both partman and libparted.

Guided partitioning is not supported.

Resizing partitions that are part of a SATA RAID device has not yet been tested and is likely to fail. It is therefore advisable that you resize existing partition before starting the installer if you need to do so.

After booting the installer and choosing "manual partitioning", you should get a screen that looks somewhat like this (line numbers added):

 1.  Write changes in SATA RAID partitioning to disk
 2.  Guided partitioning
 3.  Help on partitioning
 4.
 5.  Serial ATA RAID isw_dhiiedgihc_Volume0 (mirror) - 40.0 GB Linux device-mapper
 6.  >      #1 primary   10.0 GB B   fat32
 7.  >         pri/log   30.0 GB     FREE SPACE
 8.  Serial ATA RAID isw_dhiiedgihc_Volume01 (partition #1) - 10.0 GB Linux device
 9.  >      #1  10.0 GB     fat32
10.
11.  Undo changes to partitions
12.  Finish partitioning and write changes to disk

Line 5 corresponds to your SATA RAID device and the next two lines represent its existing partition table. The first partition is marked bootable.
Because dmraid will also create separate device nodes for each partition on a SATA RAID device, there is also line 8 and 9 which correspond to the first partition on the device.

Note that the name of the RAID1 device defined in the BIOS in this example is "Volume0"; this name is also used in the device nodes and the partition number is added to that for device nodes corresponding to partitions. So, "isw_dhiiedgihc_Volume01" should be read as "isw_dhiiedgihc_Volume0" + "1". The first part of the name ("isw") is the name of the driver used (in this case "Intel Software Raid"").

/!\ In some cases an existing partition may be displayed as "FREE SPACE" even if it is not. If you wish to keep the data on that partition, you should just ignore this. As long as you do not change the size of the partition and do not change the number of the partition, the data should be preserved.

Changing the partitioning

To completely delete any existing partitions on the SATA RAID, select line 5 and press enter. The installer will offer to create a new partition table. To delete an existing partition, select the line corresponding to the partition below the SATA RAID device (e.g. line 6). To create a new partition, select FREE SPACE listed below the SATA RAID device (e.g. line 7).

Note that the lines for the SATA RAID partitions will not be updated automatically if you make any changes to the partitioning of the SATA RAID device. For that you will need to select the option "Write changes in SATA RAID partitioning to disk" (line 1), which will commit your changes to disk and update the display for the SATA RAID partitions.

So, after creating two new partitions and committing these changes, your display should look something like this. Note that the new partitions have been formatted as ext2 to make them show up correctly as SATA RAID partition devices.

 5.  Serial ATA RAID isw_dhiiedgihc_Volume0 (mirror) - 40.0 GB Linux device-mapper
 6.  >      #1 primary   10.0 GB B   fat32
 7.  >      #2 primary   29.0 GB     ext2
 8.  >      #3 primary  995.3 MB     ext2
 9.  Serial ATA RAID isw_dhiiedgihc_Volume01 (partition #1) - 10.0 GB Linux device
10.  >      #1  10.0 GB     fat32
11.  Serial ATA RAID isw_dhiiedgihc_Volume02 (partition #2) - 29.0 GB Linux device
12.  >      #1  29.0 GB     ext2
13.  Serial ATA RAID isw_dhiiedgihc_Volume03 (partition #3) - 995.3 MB Linux device
14.  >      #1 995.3 MB     ext2

Don't forget to make the first partition bootable if needed.

Creating file systems

To create file systems and select mount points, you need to select the lines below those for the SATA RAID partitions, so in this case 10, 12 or 14. After setting up / on the 2nd partition and selecting the 3rd for swap, the display will look as follows.

 5.  Serial ATA RAID isw_dhiiedgihc_Volume0 (mirror) - 40.0 GB Linux device-mapper
 6.  >      #1 primary   10.0 GB B   fat32
 7.  >      #2 primary   29.0 GB     ext2
 8.  >      #3 primary  995.3 MB     ext2
 9.  Serial ATA RAID isw_dhiiedgihc_Volume01 (partition #1) - 10.0 GB Linux device
10.  >      #1  10.0 GB     fat32
11.  Serial ATA RAID isw_dhiiedgihc_Volume02 (partition #2) - 29.0 GB Linux device
12.  >      #1  29.0 GB     ext3       /
13.  Serial ATA RAID isw_dhiiedgihc_Volume03 (partition #3) - 995.3 MB Linux device
14.  >      #1 995.3 MB     swap       swap

You can now select "Finish partitioning and write changes to disk" from the bottom of the menu to commit these changes and proceed with the rest of the installation.

Boot loader installation

SATA RAID devices are currently not really supported by either grub or lilo, basically because you cannot probe the BIOS for the device. But it is possible to install grub using a semi-manual method. This method has been implemented in grub-installer. Using lilo is currently not supported, but it may be possible to set up lilo manually if you prefer.

The installer will automatically detect if /boot is on a dmraid device and will then install grub in the MBR of that device. No other options will be offered.
As the current installation procedure assumes that the SATA RAID device is (hd0), the SATA RAID disk should be listed as the first hard disk in the boot order in your BIOS configuration.

In case of problems, please check the log file /var/log/grub-dmraid.log.

As the physical disks that are part of the SATA RAID device are excluded from the detection of other operating systems by os-prober and dmraid devices are currently not supported, an existing Windows installation will not be automatically detected. You will need to manually add that to the GRUB menu.

Installing GRUB manually

The installer basically runs 'grub' and executes some commands in the GRUB command interface. For the partitioning scheme used as an example above, the commands would be (values between '<>' should be changed according to your situation):

# grub  --device-map=/dev/null
grub> device (hd0,<1>) /dev/mapper/<isw_dhiiedgihc_Volume02>
grub> device (hd0) /dev/mapper/<isw_dhiiedgihc_Volume0>
grub> root (hd0,<1>)
grub> setup (hd0)
grub> quit

You can of course perform this procedure manually if you want to change your GRUB installation, or if you need a different setup than the installer currently offers. See Gerte's page for details.

Remember that the GRUB partition number is one less than the actual partition number as GRUB numbers partitions starting at zero.

User comments

If you have tried the SATA RAID support in the installer, please list your experiences below.

/!\ /!\ If you find any bugs, then please also file an installation report.



Lenny bootinstall (end of 04/2008)

Following the above I ended up in grub complaining about error 23 (by memory, I didn't take note) since it wrote in menu.lst

root (isw_XXX_Volume0)

Fixing was just a matter of editing the root line and changing it to

root (hd0,0)

then edit menu.lst.

I think it can be done in one step just editing the menu.lst when you're still installing Debian, before the first boot. Maybe there is something wrong with grub auto-generating menu.lst.

Other than that, it worked like a charm on my Dell Precision T3400. http://www.webthatworks.it/d1/node/page/dmraid_aka_fakeraid_lenny_sid_dell_t3400


I followed the above instructions until I got to the manual grub configuration. There I ran into some problems. This is how worked around it.

Intel 965

I recently (29 november 2007, daily image used was from that date CET) tried installing on a intel 965 chipset. The grub-installer script fails.

I have not debugged extensively as this was an install with a timelimit.

Config of the raid pack is RAID 1.

The name of the raid pack in intel BIOS was RAID1 that means that I got an isw_<id>_RAID1 in /dev/mapper

I created 6 partions 3 primary and 3 logical. One of these was a swap partition. I formatted the partitions with a JFS filesystem.

The isw_<id>_RAID1 was the disk. and isw_<id>_RAID11 was root. I did not create a separate boot partiotion.

Following instructions from the pervious section Encrypted Partition I installed stage1 jfsstage1_5 and stage2 in /boot/grub by manually copying the relevant files

I started grub in the chrooted partition as above.

I had to change the order of device (hd0) and device hd(0,0). i.e. I mapped these as specified by the script fragment Installing grub manually (hd0,0) device first and then the (hd0) device.

No failures were given upon setup (hd0)

Since the script did not create the /target/boot/grub directory and did not copy the grub stage files. I believe the script borked on detection of dmraid root device and/or disk numbers, prematurely ending the script.

After closing grub upon successfull install, I ran update-grub twice to create a menu.lst file.

I went back to the installer and fished without bootloader install. Crossed my fingers and rebooted. It worked like a charm.

SiI 3132

14 March 2008 - I installed on an Intel ICH7 RAID-less system with a Silicon Image add-in card. The install went smoothly, except for the grub-install. I did find the partitioning instructions a bit confusing. My striped volume was already setup with three partitions: linux, swap and windows. It was not apparent that you have to select "Write changes in SATA RAID partitioning to disk" before the installer would let me choose file system types and mount points.

To solve the grub install problem, I followed the steps outlined in the above comments and used a console to install grub manually.

In the grub shell, I entered:

device (hd0,0) /dev/mapper/sil_ahagagabfedh1

device (0) /dev/mapper/sil_ahagagabfedh

After rebooting, everything came up correctly, but there were quite a few (harmless) complaints about seeking beyond the end of the device on /dev/sda and /dev/sdb.

nForce 430

5 April 2008 - Using the daily business-cd build install onto my raid0 was painless, everything worked perfectly. This has been the most painless part of setting up this raid array. Great work guys.


CategoryCommandLineInterface

DebianInstaller/SataRaid (last edited 2008-04-22 21:06:41 by FransPop)