HOWTO: Fake Raid 0 Bios and Dual Boot Sabayon and XP
HOWTO: Fake Raid 0 Bios with Sabayon and XP
How to dual boot XP and Sabayon with RAID 0 INTEL ICH5(possibly others)
I followed this guide as a reference so credit to them and their authors
First things first, we need to set-up our drive and partition it, before installing XP. Also, if you have to hit f6 everytime to load raid drivers for XP you might want to look @ http://www.nliteos.com/ It's called nlite and you can slipstream your raiddrivers and other things It's worth checking out! I used GParted as my tool to do this. So, go ahead and boot up the Sabayon liveCD. I used the POD edition...
A couple things you should do before you fire-up GParted is:
Go to the terminal and go into superuser mode via su and type root for password of course. type dmraid -a y this activates the raid array to make it easier when starting GParted we double check by typing ls /dev/mapper if it only says control then something is amiss if this all went well then go ahead and fire up GParted its time to partition our drives.It should show your total drive as one big one.
After ls /dev/mapper it should look something like this:
# ls /dev/mapper control isw_bcehhdfdci_TOWER_RAID16 isw_bcehhdfdci_TOWER_RAID1 isw_bcehhdfdci_TOWER_RAID1p1 isw_bcehhdfdci_TOWER_RAID11 isw_bcehhdfdci_TOWER_RAID1p2 isw_bcehhdfdci_TOWER_RAID12 isw_bcehhdfdci_TOWER_RAID1p5 isw_bcehhdfdci_TOWER_RAID15 isw_bcehhdfdci_TOWER_RAID1p6
We need to create 4 partitions and the first one will need to be changed after XP is installed. So for the first go round here is what you need to do...
Your First partition should be a fat32 drive and only 100MB or more;mine is 250MB playing it safe. Be sure this partition is set with a hidden flag! So Windows thinks its inactive and won't screw up its booting.However, after windows is installed this first partition will be ext2 and it's mount point will be /boot Your second partition will be your NTFS make this the size you want for windows, leaving room for your linux swap and ext3, or whatever fs. Next we will create an extended partition right after the NTFS This will be the rest of your hd. So, right after NTFS you should have extended and then your linux swap partition. The next partition will be the rest of your drive or however you want it. I chose to make the rest of my space an ext3 and its mount point will be / (root) The mount points will be set in anaconda the Sabayon installer after XP is installed. Go ahead and apply these changes.
So, once again. It should look like this
*fat32 100MB or > but not to huge with hidden flag *NTFS set with the boot flag *extended *linux swap *ext3
After thats all applied and everything is hunkydory, reboot with your windows XP CD and install it to your NTFS partition.
So you installed windows!Start your liveCD!
Now we need to change that first partition in GParted, but before that goto terminal in su mode again. We need to activate the raid; makes life easier.Do you remember the command? It's dmraid -a y and check it again by ls /dev/mapper You will like the ls /dev/mapper since you can copy and paste the name of your RAID into other parts that need them. Ok--Lets go into GParted and change that first partition to ext2 with no flags. Apply the changes, it might not take the first time(for some reason) and you may have to do it again.
Yeah! Now we are ready to install Sabayon!
Go ahead and start your live install! When you get to the partitioning screen pick manual partitioning and now we can set our mount points!
Do it the way I said in part 1:
*first partition will be mount point of /boot Chose do not format on all of them! *last partition will be ext 3 and mounted at / (root) *or however you decide to do it, but this is the easiest *Also Important keep notes of the numbers in this window like name of array and all the raid#'s in the window; this makes life easy.
When you get to your grub installer go ahead and set that up; go to advanced and pick the first option dmraid MBR;also for ease in setting up your grub.conf file later, go ahead and pick the partition for your XP if it didn't detect it.
Start installing!WARNING THIS MIGHT STALL THE FIRST TIME! It did this to me twice...and you will have to reset your mountpoints again! Just remember before starting anaconda again to set the raid active dmraid -a y for peace of mind! BUT DO NOT FORMAT IF IT DOES THIS INSTALL OVER TOP! IT WILL BE FINE!
After we are done installing Sabayon don't reboot since grub has no idea what to do(unless you want to boot from the liveCD again and mount the drive)... Now, we need to define grub correctly and our different boot partitions, right?...So we need to set-up Grub! To do this we need to access that partition--Lets hit the terminal again and go into su mode remember the ls /dev/mapper command? Let's enter that so we can copy and paste the name of our raid! Pick the one that is your / (root) partition. We need to mount that drive...So if you don't know already--
- type mkdir mnt/root
- type mount /dev/mapper/your_raid_root_partition_here /mnt/root
- type chown root:root /mnt/root
- type chroot /mnt/root
Now, you should notice a command line change.We have to tell Grub we are specifying our devices manually...
Time to get our hands dirty!
- type grub --device-map=/dev/null
We are now at the grub command prompt--
We need to specify where our partitions are:
- type device (hd0) /dev/mapper/copy and paste the name of your raid set here
We also need to specify our drive geometry by specifying our cylinders heads and sectors
This is an easy task! Go back into su mode in a different terminal and type cfdisk /dev/mapper/paste the name of your raid here
You should get an output something like this:
cfdisk (util-linux-ng 2.13.1)
Disk Drive: /dev/mapper/isw_bcehhdfdci_TOWER_RAID1 Size: 320080969728 bytes, 320.0 GB Heads: 255 Sectors per Track: 63 Cylinders: 38914
Name Flags Part Type FS Type [Label] Size (MB) ------------------------------------------------------------------------------ isw_bcehhdfdci_TOWER_RAIPrimary Linux ext2 263.21 isw_bcehhdfdBootOWER_RAIPrimary NTFS [^R] 157283.81 isw_bcehhdfdci_TOWER_RAILogical Linux swap / Solaris 3142.06 isw_bcehhdfdci_TOWER_RAILogical Linux ext3 159389.48
Notice the bold section above?Now we can use that in our grub terminal!
Lets specify the drive geometry in Grub terminal.
- type geometry (hd0) C H S
Where the C H S above corresponds with your cfdisk; keep your spacing.
Now Grub knows where the boot partition is and where to write the MBR!
We are ready to install Grub...
- type root (hd0, and hit tab key here it should display your partitions.)
pick the partition that is your /boot one. It is most likely 0
- next we type set-up (hd0)
Before we type quit in Grub lets check the partitions again
So we know the partition numbers for XP and Linux but do not hit enter!
- type root (hd0,hit tab then back space
You should have one that shows as a ext2(x83) partition and on that show NTFS (x7) Save those numbers and remember where they go for the grub.conf
Now *type quit
We are done with that! It's grub.conf time! We can close that out and start a new terminal in su mode
We have to mount our /boot partition to get at the grub.conf
So we need to mount that drive:
- type mkdir /mnt/boot
- type mount /dev/mapper/copyandpastetheraidnameofyourbootdrivehere /mnt/boot
You won't chroot that--
Now we can open her up!
- type abiword /mnt/boot/boot/grub/grub.conf
We should have our grub.conf before us and being in su mode we can save it when we are done!
I'll give you the example from the gentoo guide and then mine and it should be easy to decipher
default 0 timeout 10 splashimage (hd0,0)/grub/splash.xpm.gz
title Gentoo Linux kernel (hd0,0)/your_kernel_image root=/dev/ram0 real_root=/dev/mapper/your_raid_set* init=/linuxrc ramdisk=8192 dodmraid udev #(change your_raid_set* to your root partition) #init=/linuxrc may be needed if you get errors after the ramdrive loading #udev is needed on some newer boards, add this if during boot it fails to find root initrd (hd0,0)/your_initrd_image
title Windows XP SP2 rootnoverify (hd0,1) makeactive chainloader +1
This above is a good guide for what goes where;now my grub.conf file
# grub.conf generated by the Sabayon Linux Installer # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /kernel-genkernel real_root=/dev/mapper/isw_bcehhdfdci_TOWER_RAID16 # initrd /initramfs-genkernel #boot=mapper/isw_bcehhdfdci_TOWER_RAID default=0 timeout=6 splashimage=(hd0,0)/grub/splash.xpm.gz
title Sabayon Linux x86 3.5 (genkernel-x86-2.6.25-sabayon-r1) root (hd0,0) kernel /kernel-genkernel-x86-2.6.25-sabayon-r1 root=/dev/ram0 ramdisk=8192 dodmraid udev real_root=/dev/mapper/isw_bcehhdfdci_TOWER_RAID16 dolvm quiet init=/linuxrc splash=silent,theme:sabayon vga=791 CONSOLE=/dev/tty1 resume=swap:/dev/mapper/isw_bcehhdfdci_TOWER_RAID15 initrd /initramfs-genkernel-x86-2.6.25-sabayon-r1
title Sabayon Linux x86 3.5 (genkernel-x86-2.6.25-sabayon-r1) (safe mode) root (hd0,0) kernel /kernel-genkernel-x86-2.6.25-sabayon-r1 root=/dev/ram0 ramdisk=8192 dodmraid udev real_root=/dev/mapper/isw_bcehhdfdci_TOWER_RAID16 dolvm init=/linuxrc CONSOLE=/dev/tty1 resume=swap:/dev/mapper/isw_bcehhdfdci_TOWER_RAID15 nox acpi=off ide=nodma vga=normal initrd /initramfs-genkernel-x86-2.6.25-sabayon-r1
title XP PRO rootnoverify (hd0,1) makeactive map (hd0,0) (hd0,1) map (hd0,1) (hd0,0) chainloader +1
Also, note the map command at the end; this is needed so Winblows believes its on the first partition!
This is also kind of a rough draft so if any mistakes were made or problems let me know!
Here is my speeds if you want to see how to test it--
# hdparm -tT /dev/mapper/isw_bcehhdfdci_TOWER_RAID1
Timing cached reads: 1986 MB in 2.00 seconds = 993.63 MB/sec Timing buffered disk reads: 346 MB in 3.01 seconds = 115.09 MB/sec