PDA

View Full Version : [all variants] HOWTO: Installing (K)ubuntu 9.10, along with Windows 7, on an Intel ICH10R fakeRAID.



Lupusceleri
November 2nd, 2009, 07:44 PM
Ahoy folks.

After many hours of breaking my head over this problem, I finally came up with a working - and surprisingly enough, rather easy - solution.

First off, let's start by highlighting why Windows 7 was such a pain for me to dualboot:

Microsoft has decided to use a new, 100 mb "system" partition to boot Windows 7 from. This partition is comparable to the Linux /boot partition, from what I understand, and to avoid confusion I'll refer to it as the WinBoot partition from now on.

This similarity with the /boot partition stretches to WinBoot needing to be located somewhere at the start of your harddrive, just like the partition that contains your /boot folder. Unfortunately, Microsoft being Microsoft, Windows seems to only accept the WinBoot partition when it is generated by Windows 7 itself.

An additional problem of this new way to boot Windows is that GRUB 0.97 does not automatically recognize your Windows 7 installation, which means you'll have to add it to GRUB manually.

So let's start. Boot up your Karmic Koala graphical LiveCD, then connect to the internet, open a terminal, and run the following commands.


## First, let's see if your fakeRAID is detected properly.
## This command should return the name of your raiddrive - in my case:
## brw-rw---- 1 root disk 252, 0 2009-11-02 18:42 isw_cgacfdajhc_MRAID
ls -l /dev/mapper

## Next, we bring our LiveCD up to date.
sudo apt-get update

## Then, we install GParted.
sudo apt-get install gparted -y

## Now let's boot GParted with root rights.
sudo gpartedI'm assuming you've got an empty drive at the start of this, if not, it's probably best if you nuke every piece of data on the harddrive by creating a new msdos partition table with GParted. Don't forget to make back-ups if there is anything important on your harddrive.

In GParted, create a 100MB Primary partition at the beginning of your harddrive - this will hold your /boot later on, in my case I chose for an ext2 filesystem - and then create an Extended partition at the end of the harddrive.

While doing so, make sure the amount of space left between your /boot and your extended partition is the size you want your Windows C:\ drive to be, plus 100 MB for the WinBoot partition.

Take care! It is essential that you DO NOT assign the boot flag to ANY partition at all. It is also essential that you DO NOT create ANY additional Primary partitions, at all.

Note that all four Primary partitions are now taken up:

First Primary will be /boot later on.
Second Primary will be WinBoot later on (does not exist for now).
Third Primary will be C:\ later on (does not exist for now).
Fourth Primary is your extended partition.

I suggest labeling your partitions, so you can recognize what is what easily at a later time. :)

Go ahead and apply the changes, GParted should confirm everything went as planned.

Exit GParted, exit the terminal, reboot your system, and start your Windows 7 installation. When prompted where to install Windows, assign the setup program the unallocated space between your future /boot partition and your extended partition.

Click through the questions the installer asks you, don't attempt to make things harder than they are. Make sure Windows actually starts, and that you can log in without the installation DVD in your computer.

At this point, let's reboot to your Karmic Koala graphical LiveCD, then connect to the internet, open a terminal, and run the following commands.


## First, we bring our LiveCD up to date.
sudo apt-get update

## Then, we install GParted.
sudo apt-get install gparted -y

## Now let's boot GParted with root rights.
sudo gpartedInside GParted, you will notice that the previously unallocated space is now filled with a 100 MB WinBoot partition (note that the Windows installer gave this partition the boot flag), and the C:\ partition.

Remove the boot flag from the WinBoot partition, and instead give the boot flag to your First Primary partition - the one we set up earlier to be your future /boot.

Make some logical partitions in the extended partition, however you want, but I suggest you get at least:

- Root partition.
- 2048 MB swap-filesystem.
- Home partition.
- Optionally add a NTFS "Home" for Windows 7 too.

Apply your changes, and exit GParted after verifying the future /boot partition owns the boot flag.

Start Ubiquity (AKA the Ubuntu installer). Walk through the options, select the option to manually manage your partitions, and take care the future /boot has as mount point /boot and your future root as mount point /. Same goes for the other partitions of course. Whatever the other walkthroughs say, allow Ubiquity to install GRUB for you to the main RAID "device". It'll be hell if you have to do that manually.

Allow Ubiquity to do its job, and when asked to do so, reboot your PC. (K)ubuntu should boot itself properly now (without LiveCD), and when it does, log in and open a terminal.


## Say yes to creating a menu.lst
sudo update-grub

## Replace kate (KDE) with gedit (Gnome) or nano (commandline) if necessary.
sudo kate /boot/grub/menu.lstScroll down to the end of the file, which should look something like this:


## ## End Default Options ##

title Ubuntu 9.10, kernel 2.6.31-14-generic
root (hd0,0)
kernel /vmlinuz-2.6.31-14-generic root=/dev/mapper/isw_cgacfdajhc_MRAID5 ro quiet splash
initrd /initrd.img-2.6.31-14-generic

title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
root (hd0,0)
kernel /vmlinuz-2.6.31-14-generic root=/dev/mapper/isw_cgacfdajhc_MRAID5 ro single
initrd /initrd.img-2.6.31-14-generic

title Ubuntu 9.10, memtest86+
root (hd0,0)
kernel /memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LISTThen add the following lines after, for example, the memtest86+ entry:


title Windows 7
rootnoverify (hd0,1)
makeactive
chainloader +1Save your menu.lst, quit Kate, and go back to the terminal. Run sudo update-grub again.

Reboot your computer and verify that both Windows 7 and Kubuntu 9.10 are booting with GRUB.

Enjoy!

gordo88
November 26th, 2009, 05:33 PM
Works fine for me ! thank you ! Very usefull. :D

I did it on a Intel fakeraid to, the only difference with the procedure, windows did not build it's 100 mo boot partition and my windows partition was the bootable one. So i moved the flag to the "linux boot" and all is fine now.

jpichie
December 2nd, 2009, 07:15 PM
I glanced over this on my lunch and gave it a shot, still boots right into Win7 with windows bootloader.

I know I'm missing a step, hoping someone here could help me.

Here is my HDD setup:

3x Seagate 500GB HDD in RAID 0
Using Intel ICH9 chipset.
Created one 150GB "Partition - Short Stroked my HDDs" (which is partitioned as 50GB for windows, 100GB for games)
and then a 1.3TB "Partition" which is partition as 50GB EXT4, 4GB Swap, rest for storage.

These 2 "partitions" are seen as different Hard Drives, one named Windows (150GB) and the other named Storage (1.3TB).

I also do not have a 100mb partition at the start of my Windows hard drive, as I partitioned them through Acronis on a Hiren's Disk.

booting into 9.10 LiveCD and running os-prober shows both installs.

/dev/mapper/someletters/storage2 - Ubuntu 9.10
/dev/mapper/someletters/windows1 - Windows7(Chainloader)

Everything is installed fine, but GRUB does not seem to want to install. I even tried the alternate x64 image.

I had no problems with Ubuntu 9.04 on this same setup.

Thanks in advance.

gilson585
December 21st, 2009, 05:54 AM
check my instructions over here http://ubuntuforums.org/showthread.php?t=1360445