Windows and openSuse 11.4 dual boot problem

I have installed openSuse 11.4 and works perfectly. The main problem is, I have another system on my HD, Windows XP, and unable to boot to my XP system.

If I choose Windows on Grub menu, its just show me the same text as in the menu.lst at Windows’ section.

I am able to boot in Windows, by adding ‘makeactive’ but then, I unable to see the grub menu. And to boot to oS again, I must insert DVD installer and made an update. How tiring… -_____-

I just a little bit confused

fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x78ac2597

Device Boot Start End Blocks Id System
/dev/sda1 63 61438985 30719461+ 7 HPFS/NTFS/exFAT
/dev/sda2 61438986 271443878 105002446+ f W95 Ext’d (LBA)
/dev/sda3 271443968 274792447 1674240 82 Linux swap / Solaris
/dev/sda4 * 274792448 312580095 18893824 83 Linux
/dev/sda5 61439056 118485869 28523407 7 HPFS/NTFS/exFAT
/dev/sda6 163644586 257110685 46733050 7 HPFS/NTFS/exFAT
/dev/sda7 257110749 271443878 7166565 7 HPFS/NTFS/exFAT
/dev/sda8 118487040 163637247 22575104 83 Linux

Partition table entries are not in disk order

menu.lst

Modified by YaST2. Last modification on Sun Apr 24 16:44:26 WIT 2011

THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader

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

default 2
timeout 8
gfxmenu (hd0,3)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.4 - 2.6.37.1-1.2
root (hd0,3)
kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/sda4 resume=/dev/disk/by-id/ata-Hitachi_HTS543216L9SA00_090703FB22015CDT4WUA-part3 splash=silent quiet showopts vga=0x361
initrd /boot/initrd-2.6.37.1-1.2-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.4 - 2.6.37.1-1.2
root (hd0,3)
kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/sda4 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x361
initrd /boot/initrd-2.6.37.1-1.2-default

Don’t change this comment - YaST2 identifier: Original name: windows###

my last edit : I changed (hd0,0) -> (hd0,1)

and I changed chainloader (hd0,0)+1 -> chainloader (hd0,1)+1

the result? The same.

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

These are modifications I made :

title Windows
rootnoverify (hd0,0)
chainloader (hd0,0)+1

This make me boot to Windows, after display this text in the monitor

and I forced the system to restart by pressing Ctrl+Alt+Del

title Windows
map(hd0,0) (hd0,0)
map(hd0,0) (hd0,0)
rootnoverify (hd0,0)
chainloader (hd0,0)+1
makeactive

Please help me. I am about going crazy about this. I am tired already to try and restarting my system so many times…

I appreciate any responses. Thank you.

This make me boot to Windows, after display this text in the monitor

and I forced the system to restart by pressing Ctrl+Alt+Del

title Windows
map(hd0,0) (hd0,0)
map(hd0,0) (hd0,0)
rootnoverify (hd0,0)
chainloader (hd0,0)+1
makeactive

Remove the lines in red. Don’t use makeactive. makeactive sets the bootflag on the Windows partition, with the consequence that you can not boot into Grub anymore.

Thank you for the reply. But it just gimme black screen with the following content :

rootnoverify (hd0,0)
chainloader (hd0,0)+1

:’(

When? What do you see before that?

it was after I choose ‘Windows’ option in the Grub menu. Then, it only show me the text… And it’s all. Nothing happen next.

Hmm … All right, before further investigating, try the following and report back here.

  • reboot
  • at the Grub menu, press escape
  • Press Enter (OK) when you see the following message:

You are leaving the graphical boot menu and starting the text mode interface

  • at the text mode Grub menu, press c

You will see a command line with the following prompt
grub>

  • type the following commands and watch for error or other messages:
root (hd0,0)
chainloader +1
boot

I was not able to do all of the commands you mentioned.
I just could do the first line type root (hd0,0) then Enter with this message :

filesystem type unkonwn, partition type 0x7

And I didn’t continue to the next step. Was I wrong?
Or I should do the others too??

Yes. There is nothing wrong with this message. And I asked you to use root(hd0,0) rather that rootnoverify(hd0,0) because I wanted to see this message.

Yes.

Well, I did the others.
The first command give the prev message.

The second and the third gimme nothing. Nothing happen afterward. So, I just press Ctrl+Alt+Del and back to oS

Hmmm …
To save time, type the following in a terminal:

su -l
zypper ar [noparse]http://download.opensuse.org/repositories/home:/please_try_again/openSUSE_11.4/[/noparse] PTA
zypper refresh -r PTA
zypper in updategrub

It won’t help you booting Windows yet. But it would install a program that you can use to easily reactivate the Linux Grub partition after a ‘makeactive’. You would still have to boot from a live CD. But then you would just open a terminal an type:

su -l
mount -t ext4 /dev/sda4 /mnt
/mnt/usr/bin/updategrub -a

Might be faster than reinstalling/updating.

I’m kind of skeptical because of this :

fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x78ac2597

Device Boot Start End Blocks Id System
/dev/sda1 63 61438985 30719461+ 7 HPFS/NTFS/exFAT
/dev/sda2 61438986 271443878 105002446+ f W95 Ext'd (LBA)
/dev/sda3 271443968 274792447 1674240 82 Linux swap / Solaris
/dev/sda4 * 274792448 312580095 18893824 83 Linux
/dev/sda5 61439056 118485869 28523407 7 HPFS/NTFS/exFAT
/dev/sda6 163644586 257110685 46733050 7 HPFS/NTFS/exFAT
/dev/sda7 257110749 271443878 7166565 7 HPFS/NTFS/exFAT
/dev/sda8 118487040 163637247 22575104 83 Linux

Partition table entries are not in disk order 

You could fix partition order with fdisk. But I don’t know how Windows would like that. It is an expert functionality. You’ll have to press x and then f. But wait for another advice before trying that.

After installing updategrub, you can run findgrub - another script from this package. Just type :

/usr/bin/findgrub

and copy/paste the output. Do you know what’s in all the other NTFS partitions sda5, sda6 and sda7 ?

The last thing you can try - but be prepared to reboot from liveCD and type updategrub -a afterwards - is to repeat the same commands I gave you in post #5, but insert the command makeactive, just before the last command (boot) to see if makeactive really makes the difference. If so, your Windows bootsector might be encrypted or unreadable by Grub. The following command would show us if it is encrypted:

findgrub -d

It’s a pretty long output though.
I hope the others can help you. I really need to get some sleep.

  • We already had the case when Windows could not be booted because of some antivirus encrypting the bootsector. :frowning:
  • also first of all try the commands in post #5 replacing (hd0,0) with (hd0,1). If it starts some kind of Windows recovery, just say no to everything and exit as soon as possible.

It’s a pretty long output though.
I hope the others can help you. I really need to get some sleep.

  • We already had the case when Windows could not be booted because of some antivirus encrypting the bootsector. :frowning:

OK. Thank you very much for the help till this far.

this is what I did and got :

thom:~ # zypper ar Index of /repositories/home:/please_try_again/openSUSE_11.4 PTA
thom:~ # zypper refresh -r PTA
thom:~ # zypper in updategrub

thom:~ # mount -t ext4 /dev/sda4 /mnt
thom:~ # /mt/usr/bin/updategrub -a
-bash: /mt/usr/bin/updategrub: No such file or directory
thom:~ # /mnt/usr/bin/updategrub -a
thom:~ # /usr/bin/findgrub

Find Grub Version 3.0.1 - Written for openSUSE Forums

  • reading MBR on disk /dev/sda …
  • 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) …
  • skipping partition /dev/sda3 (swap)
  • reading bootsector /dev/sda4 (LINUX) … → Grub found in /dev/sda4 => sda8 0x83 (openSUSE)
  • searching partition /dev/sda5 (NTFS) …
  • searching partition /dev/sda6 (NTFS) …
  • searching partition /dev/sda7 (NTFS) …
  • reading bootsector /dev/sda8 (LINUX) …

Press <enter> to Exit findgrub…

That what I did and got from terminal without reboot/ using LiveCD…
And lemme reboot my machine first

This findgrub output is pretty much normal. So, does it mean that the following in /boot/grub/menu.lst doesn’t work:

###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
rootnoverify (hd0,0)
chainloader +1

while this works:

###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
rootnoverify (hd0,0)
makeactive
chainloader +1

?

In the second case, you’ll have to reboot from live CD and reactivate your extended partition as I already described with updategrub -a.

findgrub -a does the same while actually asking for confirmation first:

 Grub found in /dev/sda4. Do you want to activate /dev/sda4? [yn]

Next time run findgrub in debug mode and let us have a look at your Windows boot sector:

findgrub -d

Oh, I understand why Partition table entries are not in disk order. sda2 is actually an extended partition. So the only partition which can boot Windows is definitely (hd0,0).

This could not have worked :

### my last edit : I changed (hd0,0) -> (hd0,1)
### and I changed chainloader (hd0,0)+1 -> chainloader (hd0,1)+1

For your information, sda1 is (hd0,0) and sda2 is (hd0,1).

You might want to try the following boot entry too (but you’ll have to reactivate your Linux partition afterwards) :

###Don't change this comment - YaST2 identifier: Original name: GenericMBR###
title Windows through MBR
rootnoverify (hd0)
makeactive
chainloader +1

That trick (which chainloads the MBR) should work but is not a solution since you’ll have to change the bootflag everytime before booting Linux. It’s worth a try though in this situation.

Just to be clear, they both just gimme the same result : black screen and the content was the script itself.
The difference in the second scripts, after it gave me black screen, I press Ctrl+Alt+Button and Grub was gone.

I dont have any openSUSE LiveCD/ DVD. Could I use the installer DVD?
FYI, I have ubuntu images. Could I use that? to update the grub?

OK, I’ll try that. But since I just could ‘touch’ my oS after-work-time, so maybe it’ll take long time…

Thankyou for your help so far please_try_again… I’ll report ‘my experience’ then… :slight_smile:

title Windows
rootnoverify (hd0,0)
chainloader (hd0,0)+1

You need a SPACE between 0) and +1
chainloader (hd0,0)**SPACE **+1

If the space is not there you will first see the GUI menu.lst, the a text menu.lst.

No.

Not for updategrub, since this is not the same version of Grub. I can not check now if updategrub -a would work. This option actually doesn’t do anything with Grub but just activate the Grub partition. However it might fail while not finding some other file. But you can use findgrub -a on an Ubuntu live CD.

Hi, LostFarmer! nice to meet you here.
While using a space here in the Grub shell, I get the following error:

Error 1: Filename must be either an absolute pathname or blocklist

Without space, it boots ok (some old DOS actually in my case).

@mynameisthom
findgrub -a should be OK. Try that first! However if it doesn’t work or you cannot mount the partition, here’s how to activate sda4 using fdisk on Ubuntu live CD. In a terminal, type:

**sudo fdisk /dev/sda**
Command (m for help): **a**
Partition number (1-x): **1**
Command (m for help): **a**
Partition number (1-x): **4**
Command (m for help): **w**

With Mepis’s grub legacy , with out the space it willl just re-display the menu on my comp. Do not know if it is due to a different stage2 or what. Mepis’s stage 2 is 121k while Suse’s is 97.26k.

mynameisthom-- need to have 1 item clarified. When you put ‘makeactive’ in the menu.lst , on the very first boot with the grub menu, did it boot into XP or did you have to reboot ? What I’m asking is did the grub menu ever boot into XP .

edit: just tried with Mepis grub , with out the space in ‘chainloader +1’ , in the command shell it gives me unrecognized command. I guess it just the difference in grub 2 , making it harder to give good advice between different linux’s.

Sorry if it took so long. I was so tired after work yesterday.

I did type findgrub -a via Ubuntu’s Terminal.
This is the result :


Find Grub Version 3.0.1 - Written for openSUSE Forums


 - reading MBR on disk /dev/sda                    ...
 - 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)      ...
 - skipping partition  /dev/sda3   (swap)         
 - reading bootsector  /dev/sda4   (LINUX)         ... --> Grub  found in /dev/sda4   => sda8   0x83 (openSUSE)
 - searching partition /dev/sda5   (NTFS)          ...
 - searching partition /dev/sda6   (NTFS)          ...
 - searching partition /dev/sda7   (NTFS)          ...
 - reading bootsector  /dev/sda8   (LINUX)         ...

 Grub partition /dev/sda4 is already active.

Press <enter> to Exit findgrub...

I had to reboot first by pressing Ctr+Alt+Del, because the monitor showed me just black screen with content :


rootnoverify (hd0,0)
chainloader +1
makeactive

I just wonder if my partitions are correct.
This is the screenshot of my partition via ubuntu’s Gparted :
ImageShack® - Online Photo and Video Hosting