Installing and configuring a multiboot OS (being Windows Vista one of them) is an issue well known and documented, specially when the point of view adopted to carry that task to a happy end is read as follows:
- Install Windows.
- Install Linux
- Configure the linux boot loader (grub) to deal with the booting process of both systems.
In this small, quick and dirty guide, I’ll change the focus of step 3), and serve the same purpose doing the following:
- Install Windows.
- Install Linux.
- Configure the Windows boot manager to boot Linux.
This last step involves tools that don’t have anything to do with Open Suse, so some of you may think an Open Suse forum is not the right place to tackle with this subject. Even though I agree with that point of view, I think that an important number of potential Open Suse users will finally give the first step towards Open Suse or whatever Linux distro they wish if they know they can tweak such a delicate multiboot task using tools available in their Windows system they are more familiarized with.
Anyway, some tasks must also be performed from Linux to complement the multiboot deployment plan.
In order to achieve the task, we only need the Open Suse 11 DVD disk and a usb stick hosting a file system supported by the rescue mode kernel. Fat/Fat32 will be ok.
I’ll delve into details. Steps 1 and 2 are the same as always. I won’t tell you how to install Windows nor waste time and space telling you how to install Linux. There are quite a few excelents guides, documents and posts in the Open Suse site covering until the most tiny detail of that procedure.
I want to highlight, though, some points that may ease the process and you might want to be aware of:
a) Before trying to install Open Suse, boot Windows and take the needed actions you find appropriate to get the storage space that will be used by Open Suse: uninstall software, scan, defrag, disable/decrease virtual memory space, repartition and remove whatever FAT/NTFS partition you don’t need so that Open Suse see it as unused disk space. This will make the life easier to you and the yast disk module when the time comes to provision the disk space used by your new linux system.
Yes, I know, yast disk can manage that, and I must say it does a great job. However, in order to make Yast disk work smooth, you have to do all that disk preparations beforehand, so that, why don’t you take advantage of the fact you are logged to Windows and provision all the disk space needed by Open Suse?
Also, be advised that sometimes yast resizing operations performed on ntfs file systems fail mainly because of haven’t also failed to do as suggested at the beginning of this paragraph.
b) Regarding Open Suse 11 install process, double check that you configure grub to be installed in one of the partitions hosting file systems that will be mounted on /boot or on / , but never in the MBR of the disk where Windows is also living. If you do that, what I am about to tell you is not needed anymore, since you have wiped the windows boot manager.
Again, create a small partition (200-300 Mb) hosting an ext3 file system intended to be mounted in the /boot directory of the Open Suse system tree hierarchy. You will install grub into the boot record of this partition. Don’t accept the defaults offered to you by Yast, you will have to choose the expert mode of grub configuration to select the partition device name it must be installed to.
Needless to say, you create all the other partitions your system will need, select your software, do all the other things and finish the installation as ever. Take into account that once Open Suse installation is completed, grub will only be installed in the boot record of the partition you configured yast to do so. That means you won’t be able to boot Open Suse 11 when you reboot the machine, since grub was not installed in MBR and the Windows manager doesn’t know anything about it (yet).
Don’t panic, this situation will only last a few minutes more.
At this point in time we have two systems installed in our disk, but only Windows can be booted. Check that your Windows Vista is still there by booting it as you have always done…still there?..good.
Now, put the Open Suse 11 CD/DVD disk into the DVD driver and boot the machine from it in rescue mode.
If everything goes fine, after a while you will be prompted to type ‘root’ to enter the rescue environment.
A) TASKS TO BE PERFORMED FROM LINUX
Now you have a very basic linux system loaded and a command line shell prompt to type your commands.
Before running any command, plug the usb stick in one of the usb ports and wait a couple of seconds. Now run:
fdisk -l
You will see the device names corresponding to the disks and partitions detected by the kernel. If your system has only an internal sata disk, you will see the devices in them, named probably /dev/sda[1,2,…n] and /dev/sdb[1], the latter being the usb stick.
Now, mount the fat partition in the usb device (I’ ll assume it is sdb1) on the media directory of the rescue environment running this:
mount -o rw /dev/sdb1 /media
And, now run this command:
dd if=/dev/sda2 of=/media/opensuse.bin bs=512 count=1
Please, notice that the value of parameter ‘if’ I am using is the device corresponding to the partition in which grub was installed. Note that I am assuming /dev/sda1 is the bootable (active) partition where your Windows system is installed, while /sda2, … belong to Open Suse. Thus, be very careful when identyfing the partition where grub is installed.
To clarify, what I have done is getting a raw copy of the boot record where the grub loader was installed (sda2) to an external usb disk.
After that, unmount the usb stick, reboot the system, select Windows and log in as an Administrator user. Don’t forget to unplug the usb stick and remove the DVD disk.
**B) TASKS TO BE PERFORMED FROM WINDOWS VISTA **
Now you are back to Windows. All that is left to do in order to have the windows boot manager to load also Open Suse is to tell him about it.
First of all, plug the usb stick and copy the file opensuse.bin to the root directory of the windows active volume, normally C:.
-Now, get a dos command line prompt and tell windows manager to make an OS menu entry for Open Suse:
> bcdedit /create /d “Open Suse 11” /application BOOTSECTOR
-If everything goes fine, the command will give you an long entry ID string you better write down inmediatly, since it will be used in the following commands. It should look something like this: {18914bae-0e58-11aa-9ef4-000cdbc368a1} (mind the braces, they are part of the id).
And now, using the specific boot entry you got before, run (braces must be typed too):
> bcdedit /set {18914bae-0e58-11aa-9ef4-000cdbc368a1} device partition=C:
-Now make it know where the grub loader is stored:
> bcdedit /set {18914bae-0e58-11aa-9ef4-000cdbc368a1} PATH \opensuse.bin
-Tell the windows manager we want Open Suse loader be the last entry displayed in the Os menu:
> bcdedit /displayorder {18914bae-0e58-11aa-9ef4-000cdbc368a1} /addlast
-Finally, tell it to wait a given number of seconds for you to select the OS you want to boot:
> bcdedit /timeout 8
That’s all there is about it. Reboot the machine and check if it works.
Summarizing, what we have done is telling the windows manager to chainload to grub. Thus, even though the windows boot manager doesn’t know how to load Open Suse, it can be configured to delegate that task to other boot managers, like grub.
By the way, this is appliable only to Windows Vista. Doing the same thing for Windows XP is also likely but the steps to be performend from Windows XP are different.
Hope this helps.
Regards.