SataRaid - Debian Wiki
SataRaid - Debian Wiki
http://wiki.debian.org/DebianInstaller/SataRaid
Quick guide setting up Debian with SATA RAID using grub2 (Squeeze, Lenny, etc)
This information has been added to serve as solution, where the old guide did not work. Please read the old information below to get an insight in what you are actually doing! 1. Run installer with dmraid: 1.1 boot cd/usb, SELECT (expert) install 1.2 press TAB 1.3 add 'dmraid=true' (without quotes) 2. Install the system on RAID partition 3. When GRUB fails, choose 'continue without bootloader' and reboot 4. Boot from installation media, go to option rescue, press TAB, add option 'dmraid=true' 5. Go through the process, when it asks you to select root partition, choose the partition on which you just installed debian 6. You are now in a shell on the installed system. Execute: grub-install /dev/dm grub-mkconfig > /boot/grub/grub.cfg 7. Reboot and enjoy
1 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
2 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
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 BIOS RAID page from Gerte Hoogewerf - link is dead (3/3/10) Ubuntu Wiki SATA RAID FAQ - linux-ata.org is apparently dead, is linuxmafia this page the same content?
Translations
Translations for this page are available in: Vi t
3 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
the option.
Hardware detection
When the boot parameter is passed, the SATA RAID disk should be automatically detected and if it is detected, some additional installer components will be loaded. If it's not detected, please file an installation report! The syslog can be checked for possible causes of a failure to detect the hardware.
Partitioning
Starting with the Lenny RC1 release partitioning of SATA RAID disks is completely supported. The RAID disk can be partitioned just like a normal hard disk, including the use of "guided partitioning", LVM and encryption. See the installation guide for further details.
4 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
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. The os-prober component should detect the presence of other operating systems such as Microsoft Windows on the SATA RAID device, but the bootloader may not be correctly configured to boot those. It should be possible to make other operating systems boot correctly with minor changes in the GRUB configuration. Installing GRUB manually The installer basically runs 'grub' and executes some commands in the GRUB command interface. This example gives an impression of the commands executed by the installer (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.
5 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
# create an ISW volume (raid1) with a name of "Test1" on two disks. $ dmraid -f isw -C Test1 --type 1 --disk "/dev/sda /dev/sdb"
Otherwise you can also create your own using the HPT45X'; RAID1).
6 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
1. Determine what size you want your fakeraid disk to be. For a 6GB disk you will need the following numbers: disk size = 6 * 1024 * 1024 * 1024 = 6.442.450.944 nr. of sectors = disk size / 512 = 12.582.912; this is 0xC00000 in hexadecimal offset for fakeraid metadata = nr. of secors - 11 = 12.582.901 2. Use a hex editor to change the disk size (total number of sectors) in the hpa.dat file. The disk size is coded in 3 bytes starting at offset 12 of the file. Note that the notation is little endian, so the bytes are in reverse order. The current value in the file is 000080, which corresponds to 0x800000 (for 4GB, 8.388.608 sectors). For this example 000080 needs to be changed to 0000C0. 3. Create a raw disk image file
# Create a sparse disk image file with nr. of sectors as size $ dd if=/dev/null of=dmraid_hpa.raw seek=12582912 # Copy the metadata sector into the disk image file $ dd if=hpa.dat of=dmraid_hpa.raw conv=notrunc seek=12582901
From the raw image file the (compressed) disk images for qemu or VirtualBox (or for vmware) can be created. 4a. Create disk images for VirtualBox
# Create the full size (!) vbox disk image files $ VBoxManage convertdd dmraid_hpa.raw dmraid_hpa-1.vdi $ VBoxManage convertdd dmraid_hpa.raw dmraid_hpa-2.vdi
7 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
# Compact the disk image files (requires full path to image) $ VBoxManage modifyvdi $(pwd)/dmraid_hpa-1.vdi compact $ VBoxManage modifyvdi $(pwd)/dmraid_hpa-2.vdi compact
$ qemu-img convert -f raw -O qcow2 dmraid_hpa.raw dmraid_hpa-1.qcow2 $ qemu-img convert -f raw -O qcow2 dmraid_hpa.raw dmraid_hpa-2.qcow2
User comments
If you have tried the SATA RAID support in the installer, you are welcome to list your experiences below. If you find any bugs, then please also file an installation report.
Tried today (2010-10-14) to install onto RAID0 volume on Dell T3500 workstation from USB stick prepared as described in ' http://kitenet.net/~joey/blog/entry/Debian_USB_install_from_hybrid_iso/'. After first unsuccessful partitioning attempt, figured out that 'dmraid=true' is required. OK, another attempt was more-or-less smooth until grub installation step. Despite the fact that 'grub-legacy' is mentioned above, the installer tried to use 'grub-pc' which failed to find the RAID0 volume. Then I tried manually lilo, grub-legacy, and grub-pc, followed the suggested grub installation procedure, but with no luck. (May be just mistyped or misunderstood something). Ended up with software RAID eventually.
What is the situation regarding PATA fakeraid cards? are they supported by this same system and if so why did you reffer to it as SATA raid support? -- plugwash
8 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
Just found that "'PATA"' support for raid chips such as the "promise 378" one is not compiled in the supplied kernel. -- nunix Are there any? If there are, that would be a good reason to reconsider referring to this as "ATA RAID" instead. -- fjp I was under the impression that almost all IDE raid cards were fakeraids. I don't know if any of them are supported by dmraid though. -- plugwash The Intel Server Boards SCB2 and SE7501WV2 with Promise PATA Controller are supported by dmraid. -- drf Trying to install on a fakeraid with raid level 5 hits bug Open in dmraid/1.0.0.rc13-2: #411172: dmraid is looking for the raid45 kernel module and not the raid456 modules.: 411172 Possible solutions : Use the unofficial dm-raid45 install .iso and instructions from http://ctu.iuculano.it/dm-raid45/
wait for/hand-patch dmraid-45 code in the kernel and install kernel wait for/hand-patch mdadm 3.0 (Intel RAID metadata support only) wait for/hand-patch dm2md code Instead of using the boot parameter 'dmraid=true', one can run the install process normally right before the moment when the system disks are detected. Then switch to a virtual console with a shell (e.g. vc/2) and activate it.
Afterwards, let the installer detect your disks - you should now see a raid instead of multiple physical disks.
9 of 10
2011-10-23 16:41
http://wiki.debian.org/DebianInstaller/SataRaid
CategoryPermalink
10 of 10
2011-10-23 16:41