Add windows 7 to grub menu

hello people i need some help since i installed opensuse 11.2 when i boot my pc, grub doesnt show me windows to boot only opensuse and failsafe this is my details

su -
fdisk -lu
cat /boot/grub/device.map
cat /boot/grub/menu.lst
cat /etc/grub.conf
cat /etc/fstab

fdisk -lu
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x7d42ca62

Device Boot Start End Blocks Id System
/dev/sda1 * 63 368643554 184321746 f W95 Ext’d (LBA)
/dev/sda2 368644096 488394751 59875328 7 HPFS/NTFS
/dev/sda5 126 4209029 2104452 82 Linux swap / Solaris
/dev/sda6 4209093 46154744 20972826 83 Linux
/dev/sda7 46154808 368643554 161244373+ 83 Linux

cat /boot/grub/device.map
(hd0) /dev/disk/by-id/ata-SAMSUNG_HD250HJ_S0URJ1DQ413724
(hd1) /dev/sda

cat /boot/grub/menu.lst

Modified by YaST2. Last modification on Thu Dec 24 07:32:52 VET 2009

THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader

Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,5)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX
root (hd0,5)
kernel /boot/vmlinuz root=/dev/disk/by-id/ata-SAMSUNG_HD250HJ_S0URJ1DQ413724-part6 repair=1 resume=/dev/disk/by-id/ata-SAMSUNG_HD250HJ_S0URJ1DQ413724-part5 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – SUSE LINUX
root (hd0,5)
kernel /boot/vmlinuz root=/dev/disk/by-id/ata-SAMSUNG_HD250HJ_S0URJ1DQ413724-part6 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a
initrd /boot/initrd

cat /etc/grub.conf
setup --stage2=/boot/grub/stage2 --force-lba (hd0,0) (hd0,5)
quit

cat /etc/fstab
/dev/disk/by-id/ata-SAMSUNG_HD250HJ_S0URJ1DQ413724-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-SAMSUNG_HD250HJ_S0URJ1DQ413724-part6 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-SAMSUNG_HD250HJ_S0URJ1DQ413724-part7 /home ext4 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

what should i do? im such a n00b

Add this to the menu.lst

use this in a terminal to edit, depending if kde or gnome

kdesu kwrite /boot/grub/menu.lst

gnomesu gedit /boot/grub/menu.lst


###Don't change this comment - YaST2 identifier: Original name: Windows7###

**title Windows 7
** **rootnoverify (hd0,1)
** **chainloader +1** 

ok i just did this and when y choose windows 7 i get this
**
“ERROR 13: Invalid or unsupported executable format”

press any key to continue…**

Did you tried to add it from YaST -> boot loader.
Maybe this would the easy way.
Click add -> choose chianloader, and add the entries there.
In section name insert name for the selection in grub (Windows 7).
choose the right partition in the next step below(maybe sda1 or sda2).
And save it and then try.
I am not so sure, but you can give it try.

You may need to put the boot flag on sda2

Hey caf4926:
Does it look like the installer mucked with the partitioning, it all seems to be wrapped in an extended envelope?
And look at device.map: it shows hd0 and hd1, with hd1 mapped to sda, but menu.lst uses hd0, isn’t that strange?

I know what you mean. But I was hoping it was going to be OK. I know if it was mine I would rip it up and start again.

/dev/sda1 * 63 368643554 184321746 f W95 Ext’d (LBA)
/dev/sda2 368644096 488394751 59875328 7 HPFS/NTFS
/dev/sda5 126 4209029 2104452 82 Linux swap / Solaris
/dev/sda6 4209093 46154744 20972826 83 Linux
/dev/sda7 46154808 368643554 161244373+ 83 Linux

The most concerning thing about that is the ntfs partition is at the wrong end of the table. Originally it would surely have been at the start.

On further examination, sda1 is a primary partition, being the extended partition that wraps sda5+6+7. And sda2 is on higher cylinders than all of those, presumably as a primary partition. But being on higher cylinders, was it installed after openSUSE I wonder? Or was it installed first and then moved up the disk by e.g. gparted.

Can you help us with the sequence of installations Mabf000?

This is my concern. I can’t imagine it was the case that windows was installed after suse. And if it was I would expect way better partitioning than that because probably only someone who knows what they are doing would even do it that way.

My guess is, this is probably borked and will need re-doing. It needs re-doing just because it’s such a darn mess. But I was thinking - what the heck, give it a go, so offered what I though to be the correct entry for the menu.

I have only 1 hard disc and i slit this one in 2 partitions one with windows 7 and the other with opensuse 11.2, i first install windows 7 test it and then I install opensuse

first windows
second opensuse

Erase it all is my advice and start again
It should look something like this:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
240 heads, 63 sectors/track, 20673 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x93900d8b

   Device Boot      Start         End      Blocks   Id  System
/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

The only thing I would say is sda2 is a primary, it doesn’t have to be. It could have had sda2 as the extended and everything else as logical inside it.

Use Parted Magic to delete all the Partitions. Create a ntfs partition the size you want for windows and leave the rest unpartitioned.
Install windows
Let it update

Now install openSUSE. Here is a video of how:
Partitioning - Windows Live

You can view the images and download a video. It’s just to show the principle of it. The FAT32 partition at sda1 is very small, but just imagine it’s you windows 7 install on your sda1

Here is a video of installing SUSE
Custom Install.mpeg.rar - Windows Live

thank u very much guys, yes i was thinking to star over and make a better instalation and one last question how can i see all the windows files because i need to backup some files but i cant find windows folder on suse :frowning:

FSTAB - Editing Manually - openSUSE Forums

Mount the partition

/dev/sda2

More info here from 'swerdna
HowTo Mount NTFS Filesystem Partition Read Write Access in openSUSE