Dual Boot --- Separate Drives/Arrays

General support questions including new installations

Dual Boot --- Separate Drives/Arrays

Postby timHerold » 2009/12/06 16:25:39

My computer is set up in such a way that I have a RAID0 array with Windows 7 for gaming and a third HDD reserved for CentOS for my work/computations. What I want to do is set up the system to dual boot with each OS completely separate on the drives, and after some casual research have not been able to find much in regards to dual booting with 2 hard drives. Is there a way for me to dual boot this system? Here is some system information that may be pertinent

ASUS P6T motherboard
Western Digital Velociraptor 300gb (x2) for RAID 0 --- drives 1 and 2
Maxtor 1.5tb --- drive 3

I have set up dual boot systems before on single hard drives, but my experience level with this kind of work is low.

Tim

edit: It may also be useful to know that this is a 64-bit system.
timHerold
 
Posts: 4
Joined: 2009/12/06 16:15:09
Location: Mercer University

Re: Dual Boot --- Separate Drives/Arrays

Postby jlehtone » 2009/12/06 19:57:35

You know the boot typical routine?

1. BIOS loads boot loader from MBR of first drive.
2. Boot loader loads some more from "boot" partition.
3. User selects OS.
4. Boot loader loads that OS from whatever partition that OS resides.

It does not matter in which physical disks the "boot" partition and the OS
partition(s) are (in most cases). So what you have done with one disk
should work with multiple disks too.


However, your motherboard BIOS probably does support selecting
the boot device. Then it should be possible to have Windows boot loader
on the MBR of that RAID0, and CentOS boot loader on the MBR of the
third drive.
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Dual Boot --- Separate Drives/Arrays

Postby timHerold » 2009/12/06 21:34:36

I do understand the boot process. Is there a way to link the Windows boot loader with GRUB though so I don't have to change boot device priority every time I want to change operating systems?
timHerold
 
Posts: 4
Joined: 2009/12/06 16:15:09
Location: Mercer University

Re: Dual Boot --- Separate Drives/Arrays

Postby pschaff » 2009/12/06 23:56:04

Yes, IFF (if and only if) CentOS and GRUB can access the RAID device. If it is a true hardware RAID that should work. If it is a Fake RAID with a Windows driver (likely) it will probably not work. What do you see when you run "fdisk -l" as root?
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Dual Boot --- Separate Drives/Arrays

Postby timHerold » 2009/12/07 00:35:11

fdisk -l returns the following...

[root@localhost ~]# fdisk -l

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 72962 585962496 7 HPFS/NTFS

Disk /dev/sdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 13 104391 83 Linux
/dev/sdc2 14 182401 1465031610 8e Linux LVM


The RAID that I have enabled is set up via the Intel Matrix Manager or whatever its called.
timHerold
 
Posts: 4
Joined: 2009/12/06 16:15:09
Location: Mercer University

Re: Dual Boot --- Separate Drives/Arrays

Postby pschaff » 2009/12/07 01:06:12

Since CentOS sees both individual RAID disks, rather than a single device, is seems unlikely to me that GRUB will work. If you are feeling adventurous and want to give it a try you should be sure to have a way of booting the system, such as a LiveCD, back up the MBR on the boot disk (presumably /dev/sda - "dd if=/dev/sda of=MBR.img count=1 bs=446") and save it on removable media, then "grub-install /dev/sda". Add a stanza to /boot/grub/grub.conf:
Code: Select all
title Windows 7
        rootnoverify (hd0,0)
        chainloader +1

Cross fingers and reboot. Try CentOS and Windows 7 from the GRUB menu.

To recover the Windows MBR in the event of failure, boot from the LiveCD and reverse the process:
Code: Select all
dd of=/dev/sda if=MBR.img count=1 bs=446


Remember - "If you break it you get to keep all the pieces."
:-)

In other words, no guarantees. Let us know how it goes if you try.

P.S. I presume you are aware that with RAID0 there is no redundancy - if either disk dies so does your Windows install.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Dual Boot --- Separate Drives/Arrays

Postby timHerold » 2009/12/07 01:39:25

When I use grub-install /dev/sda I get "/dev/sda does not have any corresponding BIOS drive"
timHerold
 
Posts: 4
Joined: 2009/12/06 16:15:09
Location: Mercer University

Re: Dual Boot --- Separate Drives/Arrays

Postby pschaff » 2009/12/07 01:45:58

Well, I did say it was unlikely to work. Might try adding CentOS GRUB to the Windows boot loader. I know that worked with XP - I very deliberately have no experience with Vista or 7.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Dual Boot --- Separate Drives/Arrays

Postby jlehtone » 2009/12/07 06:33:29

I have not bothered to use the Windows bootloader for multi for a long time, either.
IIRC, you do need the bootsector -- dd is handy -- and then add something to the
Windows boot menu. That menu was in 'boot.ini' once, but Vista has a whole
directory for it, and a tool -- bcdedit IIRC -- to update it. Proprietary black magic.

Whatever you try next, the GRUB should go to /dev/sdc.


My brain genuinely hurts on trying to figure out how the fakeRAID boots rAID0 Windows.
But it must be that the BIOS and Windows bootloader can barely read enough stripes
to get the Intel Matrix driver loaded.

Now, a question is:
Can you boot the Windows with GRUB, i.e. does the 'chainloader +1' work with rAID0?

If yes, then BIOS could boot from /dec/sdc, and then GRUB could redirect to Windows.
If not, then you have to use the Windows boot loader.
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland


Return to CentOS 5 - General Support

Who is online

Users browsing this forum: No registered users and 13 guests