Notices

Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

A guide to Windows/Linux dual boot on RAID

Post Reply New Thread Subscribe Search this Thread
 
 
Thread Tools
Old 10-29-09, 09:30 AM Thread Starter   #1
Sydney
Member

 
Sydney's Avatar 

Join Date: Sep 2009
Location: Reykjavk, Iceland

 
A guide to Windows/Linux dual boot on RAID


This is a guide explaining how to dual boot Windows and Linux off a single RAID array. It was tested with a RAID0 array but it should work with all types. I originally followed this guide but it didn't specify how to install both Linux and Windows on the same array.

Why "fake" raid?
There are three ways to control a RAID array, hardware, software and fake. Hardware is when you have a dedicated RAID card that does all the work, leaving no work for the CPU, therefore yielding the best performance, and since it is connected to the control card it has maximum mobility, that is: You can transfer the array between system worry-free. Software RAID let's the operating system take care of the RAID array, this should be the easiest to set up and is recommended unless you want to dual boot Linux and Windows off a single array. Fakeraid let's the southbridge control the array, and therefore both Windows and Linux can see and use the array.

There are more ways to install Linux on a fakeraid array, for example using the alternative CD, but I strongly prefer this method.

1. Set up your SATA configuration to RAID in BIOS, save and exit.

2. After the POST screen, a RAID configuration screen should be visible, opting you to press a key to enter the configuration (CTRL+I in my case). Set up your RAID configuration, this varies between motherboards, so I suggest you look into your motherboard manual if you have problems.

You should now have a working RAID array

Against the common procedure, we have to install Linux before Windows. This is because Windows partitions the array in a way Linux can't read, but Windows can read the Linux partitioning.

3. Put in your Linux live CD, I used Ubuntu 9.04, and this should also work on 9.10. I have yet to test it on other distributions, I would love some feedback.

4. Boot up the live session.

5. Open up a terminal and type in these commands
Code:
sudo apt-get update
sudo apt-get install dmraid
This will install dmraid, which is required to read the RAID array.

If you are using another kind of RAID than RAID0 or RAID1 you must execute this command
Code:
sudo modprobe dm-raid4-5
6. Now, execute this command
Code:
sudo dmraid -ay
If everything is right, your RAID array should show up. I got a message saying it was already enabled, which is good. My RAID array is /dev/mapper/isw_dejihacffa_raid, yours may vary, so in the rest of your guide, adjust "isw_dejihacffa_raid" to what yours is called.

7. Set up the partitioning using gparted (if gparted is not found you must do 'sudo apt-get install gparted' first)
Code:
sudo gparted
8. Now select your RAID array, isw_dejihacffa_raid. Right click on it and hit "new", this should opt you to create a partition table. Create the table as 'msdos', which will be selected by default. Now right click and "new" again and create an EXT3 or EXT4 partition that takes up half the disk. EXT4 might cause incompatibility with older distros, so you might want to use EXT3. I do NOT recommend having a separate boot partition, I couldn't get it to boot properly.

9. Now create a NTFS partition on the rest of the drive. If you have less than 4GB of RAM I recommend creating a 4GB SWAP partition at the end of the drive. Now your partitioning scheme should look like this.

[IMAGE]

10. Apply the settings and close gparted. Now start up ubiquity (install shortcut on desktop).

11. Install as you normally would, and when you get to the partitioning, click manual and edit the EXT3/EXT4. Use it as EXT3/EXT4, format it and set the root as / and if you crated a swap partition edit it and select use as swap.

12. At the last step click advanced and uncheck "Install GRUB". We will install grub manually later.

13. Finish installing, now put in your Windows installation CD/DVD.

14. If you are using Windows XP you will need a floppy with your RAID drivers, if you are using Vista you will need a floppy/USB/local folder with RAID drivers while Windows 7 might have your RAID drivers by default.

15. Select your language, click Install Now, and custom. Now select the second partition on your RAID array and install on it. It should install without problems because it was set up correctly as NTFS.

16. Finish installing windows.

17. Boot into the live CD again.

18. Once again
Code:
sudo apt-get update
sudo apt-get install dmraid
19. Now mount the new Linux install
Code:
sudo mount /dev/mapper/isw_dejihacffa_raid1 /mnt/
20. Bind your /dev, /proc and /sysfs and copy over the resolv.conf then chroot into it.
Code:
sudo mount --bind /dev /mnt/dev/
sudo mount -t proc proc /mnt/proc/
sudo mount -t sysfs sys /mnt/sys/
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf 
sudo chroot /mnt
21. Now install dmraid and grub
Code:
apt-get update
apt-get install dmraid grub
22. Create the GRUB directory
Code:
mkdir /boot/grub/
23. Copy over the GRUB files to the new grub folder
Code:
cp /usr/lib/grub/x86_64-pc/* /boot/grub/
(Replace x86_64-pc with your architecture if you are using something else than AMD64)

24. Now run grub
Code:
grub
And type these commands
Code:
device (hd0) /dev/mapper/isw_dejihacffa_raid1
find /boot/grub/stage1
root (hd0,0) 
setup (hd0)
This is assuming that your RAID array is the first drive in the BIOS, and will override your MBR.
If 'fine /boot/grub/stage1' shows something else than 0,0, for example 1,0, then do 'root (hd1,0)

25. Now you can create a menu.lst by running
Code:
update-grub
And assuming that you set up windows as the second partition on the RAID array you can add it to GRUB by editing menu.lst
Code:
nano /boot/grub/menu.lst
And at the bottom of the file, add
Code:
  title                 Windows
  rootnoverify (hd0,1)
  makeactive
  chainloader +1
And if you are running a different RAID than 0 or 1 do this
Code:
echo dm-raid4-5 >> /etc/initramfs-tools/modules
update-initramfs -u
Then add
Code:
dm-raid4-5
to /etc/modules
Code:
nano /etc/modules
You should now be able to boot into both Linux and Windows residing on the same RAID array when prompted in GRUB.

This guide was heavily based on the ubuntu community fakeraid guide
https://help.ubuntu.com/community/FakeRaidHowto

I will update this guide as necessary, and any suggestions are welcome.

If you have any questions feel free to ask them in this thread, and I will do my best to help you.

__________________
Gigabyte Z68X-UD7 (EK P67A-UD7)| i7 2600K @ 5.0GHz (Heat Killer 3.0)
4x4GB Mushkin Blackline 1600MHz CL9 1.5V | Gigabyte GTX780 Windforce 3X @ 1084(C)/1150(B)/7064(M) | Swiftech MCP35X
Black Ice Pro II 240mm| Antec HCP1200 | Antec P280 |2x 120GB Mushkin Chronos RAID0| Windows 8.1 Preview

Last edited by Sydney; 10-30-09 at 02:25 PM.
Sydney is offline   QUOTE Thanks
Old 10-29-09, 01:19 PM   #2
SuperMiguel
Super User

 
SuperMiguel's Avatar 

Join Date: Sep 2007
Location: Florida, US

 
nice guide!

__________________
<(+_+)> (v)g <(+_+)>
SuperMiguel is offline   QUOTE Thanks
Old 01-04-10, 11:43 AM   #3
Dapman02
Member

 
Dapman02's Avatar 

Join Date: Jan 2008
Location: Overland Park, KS

 
I'm trying to get this working but when I type in

sudo dmraid -ay

RAID set "isw_ddihjegdgj_Windows7" was not activated

Is there any way to activate it.

__________________
Desktop: Return of Deneb
Processor: AMD Phenom II 955 @ 4.2Ghz
Cooling: TRUE Push/Pull
GPU: Visiontek 5850 Core 875Mhz/1175mhz memory
Motherboard: MSI 880G-E45
Case: CM Storm Enforcer
RAM: 2x2gb Samsung generic
HDD: Samsung 500GB 5400RPM
OS: Windows 7 64-bit
Christian Overclocker
Dapman02 is offline   QUOTE Thanks
Old 01-04-10, 01:33 PM Thread Starter   #4
Sydney
Member

 
Sydney's Avatar 

Join Date: Sep 2009
Location: Reykjavk, Iceland

 
If you have already formatted the partition in Windows, Linux can't see it. You need to format all partitions from Linux.

To get dual booting working, you need to erase everything of the RAID and start fresh.

__________________
Gigabyte Z68X-UD7 (EK P67A-UD7)| i7 2600K @ 5.0GHz (Heat Killer 3.0)
4x4GB Mushkin Blackline 1600MHz CL9 1.5V | Gigabyte GTX780 Windforce 3X @ 1084(C)/1150(B)/7064(M) | Swiftech MCP35X
Black Ice Pro II 240mm| Antec HCP1200 | Antec P280 |2x 120GB Mushkin Chronos RAID0| Windows 8.1 Preview
Sydney is offline   QUOTE Thanks

Post Reply New Thread Subscribe


Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Mobile Skin
All times are GMT -5. The time now is 08:43 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
You can add these icons by updating your profile information to include your Heatware ID, Benching Profile ID or your Folding/SETI profile ID. Edit your profile!
X

Welcome to Overclockers.com

Create your username to jump into the discussion!

New members like you have made this the best community on the Internet since 1998!


(4 digit year)

Why Join Us?

  • Share experience
  • Max out your hardware
  • Best forum members anywhere
  • Customized forum experience

Already a member?