Help: GRUB is not detecting Windows 7

i just installed openSUSE on my machine which had windows 7 in other partition as primary partition. Now after rebooting i see the green screen showing only 2 options

-Desktop – openSUSE 11.2 -***
-Failsafe – openSUSE 11.2 -***

how do i get my windows 7 in the list.
Please reply as soon as possible
thanks in advance.

Please open a terminal and become su and do this:

fdisk -l

post result

Just in case you are not sure about su in a terminal
Become su in Terminal - HowTo - openSUSE Forums

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x611340b2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2        5221    41929650    f  W95 Ext'd (LBA)
/dev/sda2   *        5222        7166    15623212+  83  Linux
/dev/sda3            7167        7296     1044225   82  Linux swap / Solaris
/dev/sda5               2        5221    41929618+   7  HPFS/NTFS

Depending if you use kde or gnome, this is how to add the following:
In a normal user terminal type:

kdesu kwrite /boot/grub/menu.lst
gnomesu gedit /boot/grub/menu.lst

Add this to the lower section of the menu file:

###Don’t change this comment - YaST2 identifier: Original name: windows###
title Windows
rootnoverify (hd0,4)
chainloader +1

I might be wrong that it’s (hd0,4)
In reality windows is on (hd,0,0) but that’s not how SUSE see it.

it says

rootnoverify (hd0,4)
chainloader +1

I tried fixing the grub using Some grub repair disk too, but its not proving useful either.

But grub isn’t broken.
You just need to get the chainloader correct.

Why did windows get wrapped in an extended partition?
I’m not certain windows will ever boot without a valid partition for it’s boot code.

It should look more like this example:

/dev/sda1 * 1 9017 68163763+ 7 HPFS/NTFS
/dev/sda2 9017 11235 16771829 83 Linux
/dev/sda3 11235 20674 71352666+ f W95 Ext’d (LBA)
/dev/sda5 11235 11651 3140676 82 Linux swap / Solaris
/dev/sda6 11651 20674 68211958+ 83 Linux

Let me encourage someone else to look at this. Please wait patiently.

If you put the XP code into menu.lst provided by caf4926, what happens ? ‘in detail’.

You should be able to boot XP on a logical volume but you will not be able to do any type of install ,clean or repair. XP sometimes will refuse to boot when its starting partition # changes, as yours has. It can be fix but that might not be your problem, with out knowing in detail the exact booting problem.

It would be best to convert XP’s logical volume back to a primary partition. Have not idea why SuSe installer does that, but it should not as it does create unneeded problems. Power Magic will convert it back, testdisk may, and sure there are linux programs that will. ‘do a web search for programs, wait for others to post’

@LostFarmer: Are you sure Windows can boot without a suitable primary? I read a comment recently about this, I think you were in that thread too. You can install XP in a Logical but I have only done that where a ntfs primary existed, small though it was, it was sufficient for the boot code.

I doubt very much SUSE did what we are seeing here, I think some kind of user intervention took place during the setup.

I doubt very much SUSE did what we are seeing here, I think some kind of user intervention took place during the setup.
I have seen this problem too many times not to think it is not what SuSe does. If one read the proposed partition change correct it might show what it will do and then could be manually corrected before accepting change (?).

Are you sure Windows can boot without a suitable primary?
I have done it before several times. I would never recommend it as other problems could crop up. Depending on program used to format the partition , it might be required to manually edit the Volume Boot Record’s Disk Parameter Block hidden sector count, something else would not recommend.

It would be best to convert XP to a primary partition but do not know just what programs can be used , I normally will do it manually.

I just read this and perhaps we missed that there is no entry for windows appearing in the bootloader menu. If vickyhacky sees this:

-Desktop – openSUSE 11.2 -***
-Failsafe – openSUSE 11.2 -***

Nothing can be tested until vickyhacky sees this:

-Desktop – openSUSE 11.2 -***
-Failsafe – openSUSE 11.2 -***
-windows 7 -***

So I have two questions for vickyhacky

  1. do you now see a windows entry in the menu at boot time (forget about whether it works, just do you see it)?
  2. please post here the response you get to this command in a console/terminal window: sudo cat /boot/grub/menu.lst

TYPO ALERT

should be sudo cat /boot/grub/menu.lst

not
sudo cat /boot/brub/menu.lst

When you play around with boosectors and partitions, you can certainly do funny things. I too got some operating systems to boot from logicals with the help of bootmanagers or bootsector hacking or brought different DOS to boot from the same primary by renaming the system files, puting them at the top of the file allocation table (needed by certain DOS but not all) and modyfing the bootsector accordingly. But I believe only a few people are interested in such pratices.

I don’t know if you can boot Windows without any primary and you seemed no so sure either, as you wrote in one thread it was possible and in another one it was not. That’s the kind of thing that would be simple to test within a virtual machine. I often installed Windows into logicals, except for ntldr, ntdetect.com and boot.ini. True, you need a primary C: to install and it should be large enough to temporarly store a bunch of files. It doesn’t have to be NTFS. I always used a FAT16 for that purpose, which BTW I resized afterwards. And true, nobody should do that without a good reason. If you happen to add a second harddisk with a primary partition and you have Windows sytem on a logical, the drive letters will be changed and Windows won’t find its system files anymore. You won’t be able to login and get into an endless ‘saving your settings’ loop. Sometimes you will be able to edit the registry from another place in lan and search/replace hundreds of a absolute paths there. That’s a totally absurd behaviour for an operating system (which has been a gag from the beginning anyway).

Why not just running that findgrub script I posted the other day. It will tell you where Windows is located by looking for the string NTLDR in all bootsectors.

#! /bin/bash

dev=/dev/sda
 "$1" ] && dev=/dev/$1 

if  -b $dev ] ; then
	dd if=$dev bs=512 count=1 2> /dev/null | grep -q GRUB && echo "Grub found in MBR"
	dd if=$dev bs=512 count=1 2> /dev/null | grep -q NTLDR && echo "NT Loader found in MBR"
	for pt in `fdisk -l $dev | awk '/^\/dev/ { print $1 }'` ; do
		dd if=$pt bs=512 count=1 2> /dev/null | grep -q GRUB && echo "Grub found in $pt"
		dd if=$pt bs=512 count=1 2> /dev/null | grep -q NTLDR && echo "NT Loader found in $pt"
	done
fi