I am attempting to dual boot windows XP and OpenSUSE 12.1. Currently I have both XP and OpenSUSE installed, but can only boot into Windows. I have done the following:
- Installed Windows XP
- Resized Windows partition using GParted
- Installed OpenSUSE 12.1 using DVD image burned to a usb memory stick
-
During the install I selected for /home/ to be on its own partition. That was the only changes I made to the automatic install.
It appears the machine is booting using the mbr instead of GRUB. Currently I am stuck and don’t know what to do. Any ideas?
You have to set the bootflag on the partition where the Grub bootloader is installed, using fdisk or sfdisk. If you don’t know which partition it is, you can use findgrub -a. It will detect the Grub partition (primary or extended) and activate it for you. You can run findgrub on a live system after installing it.
Boot from an openSUSE live CD
su -l
zypper ar [noparse]http://download.opensuse.org/repositories/home:/please_try_again/openSUSE_12.1/ PTA[/noparse]
zypper refresh -r PTA
zypper in updategrub
findgrub -a
if the last command says:
Bootflag can not be set: No Grub found in primary or in the extended partition
you’ll have to install Grub with the grub command (we will explain to you how). But try that first!
Looks like I’m going to need to reinstall grub. Please advise on how to go about doing that.
findgrub -a
Find Grub Version 3.7.2 - Written for openSUSE Forums
- reading MBR on disk /dev/sda ... --> Windows Generic MBR (Sig: 0x48cf8e61)
- searching partition /dev/sda1 * (NTFS) ... --> Windows NT/2K/XP Loader found in /dev/sda1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can add the following entry to /boot/grub/menu.lst :
###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
rootnoverify (hd0,0)
chainloader +1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- reading bootsector /dev/sda2 (Extended) ...
- reading bootsector /dev/sda5 (LINUX) ...
- skipping partition /dev/sda6 (swap)
- reading bootsector /dev/sda7 (LINUX) ...
- reading bootsector /dev/sda8 (LINUX) ...
********************************************************************************
WARNING: /boot/grub/device.map not found.
Displayed BIOS device mapping may be incorrect!
********************************************************************************
Bootflag can not be set: No Grub was found in primary or in the extended partition.
It’s not installed anywhere. It’s not normal. In a terminal:
su -l
grub
- and look for Grub stage2:
grub> find /boot/grub/stage2
What does it say? (hd0,6), (hd0,7) or nothing?
Here are the results:
grub> find /boot/grub/stage2
(hd0,4)
Oops. I overlooked that one. Ok. Now in the Grub shell, type:
grub> root (hd0,4)
grub> setup (hd0,4)
grub> setup (hd0,1)
It will install the bootloader in the root partition (not necessary but doesn’t hurt) and in the extended partition. Notice that (hd0,4) means sda5 and (hd0,1) sda2.
Then set the bootflag on sda2 with either
findgrub -a
or
sfdisk /dev/sda -A2
When you reboot, you should see the Grub menu … Well maybe look for the menu before to make sure there is one:
grub> find /boot/grub/menu.lst
It should output (hd0,4).
and let us see the menu before rebooting:
su -l
mount /dev/sda5 /mnt
cat /mnt/boot/grub/menu.lst
I have to go. Others will help if something goes wrong. You’re almost done.
That worked great. Thanks for the help.