HowTo Boot / Multiboot openSUSE and Windows (2000, XP, Vista - any mix) using the Windows bootloader.
You have 2000 and/or XP and/or Vista on your computer along with openSUSE. You want to do away with the Grub bootloader and boot from the Windows bootloader. This method works by adding some Linux boot code into a file on the Windows boot partition and then calling that file to the attention of the standard Windows bootloader.
You might be interested in a companion tutorial about using the openSUSE Grub bootloader for multibooting openSUSE and Windows:
HowTo Boot / Multiboot openSUSE and Windows (2000, XP, Vista - any mix) using the GRUB bootloader.
Method in brief: The method is to configure Grub in openSUSE to boot from the root partition, not from the Master Boot Record (MBR). Windows bootstrap code is left in the MBR. This bootstrap code passes control to the bootloader files in the Windows bootloader. Windows bootloader partition is always the first partition on the drive for Windows 2000/XP but can be any primary partition for Vista. Vista's bootloader partition contains the directory \boot and the file "bootmgr". You edit an option into the bootloader files - an option to boot from a Linux file you have placed specially in the Windows boot partition. The Linux file contains Grub's instructions for booting from the root partition of the openSUSE installation and thus multibooting of openSUSE is achieved.
The windows bootloader file of principal concern/interest is called boot.ini. Boot.ini pre-exists in the boot partition if you have either of 2000 or XP installed. Boot.ini does not exist if you only have Vista installed but you can create it and Vista will recognise it as a boot menu and act on it when it boots.
Method in detail: There's a series of steps below illustrating commands issued in a terminal window to get Suse ready for multibooting from the Windows bootloader. I have used sda1 as the windows boot partition. If yours is different, e.g. sdb2, then make the appropriate substitution. All the commands are root commands so don't forget always to enter su to become root if you're starting a session.
Step 1: Boot into openSUSE. If you're having difficulty doing that because your bootloader is damaged then use the install media DVD/CD to boot into Suse as follows: Insert Suse's installation CD/DVD and reboot the computer. Commence the installation process but only carry it forward a few steps. Click "Next" through the Language screen. In the Media Check screen, do not click "Start Check" but simply click "Next" to skip to the the next screen. Agree to the Licence and "Next" to the Installation Mode screen. Here you select "Other Options". That will allow you to select to "Boot Installed System". Select that and click "next" to proceed. That gets you into openSUSE and you might have to use it a couple of times while you shuffle back and forth between Windows and Suse to get multibooting fully installed.
Step 2: Prepare openSUSE for booting from the root partition using Grub: Open Yast --> System --> Boot Loader. The Grub configuration screen comes up with the Tab "Section Management" activated. Activate the tab labelled "Boot Loader Installation" and select to "Boot from the Root Partition" if you don't have a separate boot partition or from the Boot Partition if you do have a separate boot partition. You normally don't have a boot partition because a boot partition is for advanced users with complex servers. So 99.9% will select to "Boot from the Root Partition". Click "Finish" to make that happen.
Step 3: Mount your ntfs boot partition at /mnt/windows so you can edit the Windows files. I'm using sda1 as the example, but for Vista it might (very occasionally) be different. First enter su to get rootly powers. Then use these commands:
Step 4: Copy the boot code in the boot sector of Suse's root partition over to a file in the Windows boot partition for use by the Windows bootloader. I've used sda3 as Suse's root partition to illustrate the procedure and you will need to change that to suit your situation. This command makes the file "suse.bin" and places it in the Windows boot partition mounted in /mnt/windows:
Check that suse.bin was successfully created in the windows boot partition with this command:
Step 5: Add "openSUSE" as a boot item to the Windows boot menu. Step 5 is slightly different for Vista by itself on the computer and for a computer that has 2000 and/or XP on it (and/or Vista). So choose the appropriate version of step 5 below.
Step 5 if 2000 and/or XP is on the computer (with or without Vista): In this case the file boot.ini pre-exists in the boot partition and you now edit it. Open up the Windows menu file for editing with this command if you use KDE:
or use this command instead if you use Gnome
That will open the file boot.ini for editing. Typically that file looks much like this example:
Add this line as a last line:
Save and exit. In Windows, later you may wish to add carriage returns in notepad for esthetic purposes but it's not necessary.
Step 5 if Vista is on the computer without 2000 or XP: In this case the file boot.ini does not exist in the boot partition and you create it. Create the Windows menu file for editing with this command if you use KDE:
or use this command instead if you use Gnome
That will open a blank file boot.ini for editing. Edit these lines into the file:
Save and exit. In Windows, later you may wish to add carriage returns in notepad for esthetic purposes but it's not necessary.
Step 6: Make sure the Windows boot partition is marked "Bootable" so Windows can boot. Open a console and enter su to get rootly powers. Then start cfdisk, the GUI version of the command line partitioner, with this console command:
I used sda because the first drive commonly carries the window bootloader. Now use the up/down arrow keys to change partitions and the left/right keys to locate [Bootable] function. The Enter key toggles the [Bootable] state from off to on. Switch the [Bootable] flag on the Windows boot partition (usually sda1) to on and switch any [Bootable] flags on other partitions to off. Then use the arrow keys to locate the function [Write] and press Enter to make it happen. Answer "Yes" and then after writing finishes, press Q to exit.
Now you can reboot and the Windows bootloader can take over. However if it doesn't because Grub code has lodged in the MBR you can easily replace it with Windows boot code and get back on track as follows:
If problems persist, browse on over to openSUSE Forums.org and recount your problem in the Install/Boot Forum.
That's all folks -- stay well
Chainloader tutorial May 06; Revised Nov 07; fully revised 12 June 08