Two major problems with dual boot installation of openSuSE 11.1 and Windows 7

I’ve been experimenting with dual boot installation of openSuSE. The pre-installed OS on my Toshiba Satellite Pro is Windows 7. I’ve tried versions 11.3 and 11.2 with total failure. Eventually 11.1 went through up to the point of grub menu. It won’t boot Windows and stops with the message:

rootnoverify (hd0,1)
chainload +1
BOOTMGR is missing

On the other hand; openSuSE runs fine but it won’t find the network card and thus leave me with no internet connection.

Any ideas for either (or both) problem(s) would be greatly appreciated!

So, when you run openSUSE, your need to issue the following terminal command (If you use KDE, use Konsole):

su -
password:
fdisk -l

And post the output of this command. It would also be of value to look at your Grub menu.lst file. Here is another terminal command:

su -
password:
cat /boot/grub/menu.lst

And also post the output of this command. Anytime you post large amounts of text, consider wrapping it in a CODE block. To do so, you must be using the advanced message editor. Post your text into your message, highlight just the new text and press the Code (#) editor function and it is done.

Now consider that the Grub menu and openSUSE does not seem to guess properly on which partition your Windows is booting from. There may be three partitions present, all there before you installed openSUSE. Often there is a restore partition. There may be a boot partition and then a main Windows partition. Each partition may get an entry in your grub menu, but it is hard to tell.

So the problem may only be an issue with the grub menu selection and not your actual installation.

Thank You,

Alternatively,

  • copy/paste the code below in a file, name it findgrub (although it doesn’t just find grub) in the current directory.
  • make it executable:
    chmod 755 ./findgrub
  • execute it and post output
    ** ./findgrub**
#! /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"
        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/XP/VISTA Loader found in $pt"
                dd if=$dev bs=512 count=1 2> /dev/null | grep -q BOOTMGR && echo "Windows 7 Loader found in $pt"
        done
fi

Hi James,
hope you like that one too :wink:

please_try_again, well I am very curios, that is for sure. It did not seem to output anything in my terminal session and I had to run it as root, else the fdisk command gives an error. If we can get this to work, well post in the scripting area, but there seems to be something wrong, at least for me.

Thank You,

Yes you have to run it as root (same as fdisk -l). But I would like to know why it didn’t output anything for you. The script just looks for the strings GRUB, NTLDR, BOOTMGR in the first sector of each partition as well as in the MBR of the specified device (or sda if no argument is given). Here’s my output:

# findgrub
Grub found in MBR
NT/XP/VISTA Loader found in /dev/sda1
Grub found in /dev/sda11
Grub found in /dev/sda15
Grub found in /dev/sda19

# findgrub sdb
Grub found in MBR
NT/XP/VISTA Loader found in /dev/sdb1
Grub found in /dev/sdb6

I do use it on many machines … however I always build systems the same way.
It wouldn’t work if you were using the older IDE driver and your drives would be named hdx rather than sdx. But I doubt you do. It would’nt output anything either if you had no Grub or XP, Windows 7 bootloader installed (however I don’t know very much about the later one).

I assume you know which of your partitions contains a bootloader. So could you please read this/these bootsector(s) and write them to standard output (your terminal) ? See if you can find a meaningful string like the ones the script is looking for ( i.e GRUB, NTLDR, BOOTMGR). You would use that command:

  • for the MBR
    dd if=/dev/sda bs=512 count=1

  • for a partition bootsector (example: sda6)
    dd if=/dev/sda6 bs=512 count=1

Don’t worry if it displays garbage. But there should also be some readable plain text.

So I don’t want to interrup the fixing of the OP problem, but to help with your script, here is my fdisk -l

Disk /dev/sda: 2000.4 GB, 2000397852160 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4cbc9c09

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      243202  1953512448    7  HPFS/NTFS

Disk /dev/sdb: 600.1 GB, 600127266816 bytes
255 heads, 63 sectors/track, 72961 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x46f71f1a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         262     2104483+  82  Linux swap / Solaris
/dev/sdb2   *         263       19092   151251975   83  Linux
/dev/sdb3           19093       72962   432705294   83  Linux

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009698d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      182402  1465136128    7  HPFS/NTFS
  1. Windows 7 is located on sda1 and is bootable.
  2. openSUSE is located on sdb2 and is bootable with Generic MBR, selected as first boot drive in BIOS.

Command “dd if=/dev/sdb bs=512 count=1”, for my boot drive

dd if=/dev/sdb bs=512 count=1
1�м|��ؿ�|PW�������ˀ��~��RR����*�Ff�f>���t
                                         �~�uf�>�
                                                 ����   ���uڸ�����f�f��u��P����^��Z1���▒����f�.����BZR���rנ|��t��}=U���u�f��Z�Vu|Error 
No active partitionDisk read errorNo operating systemInvalid CHS read���`�������u�a���▒�F�G��?G9@�A�����9@���������H�3U�1+0 records in
1+0 records out
512 bytes (512 B) copied, 1.9979e-05 s, 25.6 MB/s

Command “dd if=/dev/sdb2 bs=512 count=1”, for my boot partition

dd if=/dev/sdb2 bs=512 count=1
�H����9����u���Y|1�؎м ��@|<�t��R��}�6�tV�A��U�ZRrK��U�uE�A|��x>u��t7f�L�|�D�f�D|��Df��Dpf1�Df�D
                                                                                               �B�r�p�}�s
������|�D�f1��@f�D1�������@�1����f�f�D|f1�f�4�T
f1�f�t�T
        �D
���L      ;}<�T
�ъl
   Z�t
      �p��1۸�r*�ÎH|`���1�1����a�&B|��}�@���}�8���}�0��}�*��GRUB GeomHard DiskRead Error����&lt;u��U�1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.0238e-05 s, 25.3 MB/s

/dev/sdc is a USB 3 drive, but the outputs are similar. I know what you are saying about building several computers the same way. Problems or lack of problems follow all of my computers because we are creatures of habit, sticking with what works, time and time again.

Thank You,

I’m not looking for generic MBR, so an empty output is normal in this case. However I wonder why it didn’t find your Windows 7 bootloader, because you should have some Windows bootloader in sda1. Obviously it doesn’t contain the string ‘BOOTMGR’. But what else?
If you had type :

findgrub sdb

the script would have output:
Grub found in /dev/sdb2

@ giavvns
Sorry for confusing you. The script was actually intended to help you locate your Windows partition. Obviously it doesn’t work as expected: doesn’t find Windows 7 bootloader in any case.

If you copy/paste the output of the two commands jdmcdaniel3 ask you to type in his first post, it will tell us :

  • which partition does contain Windows 7, but it is more likely te one we already know : (hd0,1)
  • what to add/change in /boot/menu/grub.lst in order to boot Windows.

Also we need to know where you did install the grub bootloader. That’s something the script I posted can show us.

On 2010-09-27 02:36, please try again wrote:
>
> Alternatively,

> for pt in fdisk -l $dev | awk '/^\/dev/ { print $1 }' ; do

You could also parse “/proc/partitions”. There could be others, perhaps.

> dd if=$pt bs=512 count=1 2> /dev/null | grep -q GRUB && echo “Grub found in $pt”

Perhaps use “-i” for grep, too.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I dealt with one like this a day or two ago
It was simply that the installer had pointed to the wrong partition (the same as this (hd0,1) when it should have been (hd0,0)
(hd0,1) was the windows installation
(hd0,0) was the boot partition, where of course the bootmgr is located.

Hence one request in this thread for fdisk -l

Does Windows 7 maybe put its bootloader in both partitions? :\

Does it have a boot partition you mean? … Yes, very often.

Boot code in both partitions. NO

In that case, the script I posted should indicate which of both is the boot partition, assuming the bootcode contains the string BOOTMGR. But I don’t have a Windows 7 machine to test. The ones I’ve seen used that string. (?) BTW, YaST should find out that too if it would read bootsectors rather than guessing (?).

It’s something that needs fixing in SUSE because I see it constantly missing when boot partition exists

Thank you all for your help. I looked some more on the internet and using the Repair tool of the original Windowd 7 DVD fixed the booting of Windows. But…

  1. Now, upon turning on my computer, I don’t get the grub menu but the system takes me directly and boots Windows 7.
  2. I’m still dealing with the problem of not being able to have openSuSE see my Network card, thus leaving me without internet.

Any ideas?

That problem will remain, as long as openSUSE will refuse to install Grub in MBR by default in order to preserve Windows. IMHO this is ridiculous because

  1. it doesn’t preserve Windows (as you just experienced)
  2. it doesn’t preserve openSUSE (since you had to use Windows Repair DVD)

My advice is to boot with a liveCD or PartedMagic and install Grub in MBR. But people following the openSUSE ‘policies’ won’t agree.

Re-Install Grub Quickly with Parted Magic

I say boot flag to extended
Then Install grub as above

On 2010-09-27 10:06, please try again wrote:
>
> That problem will remain, as long as openSUSE will refuse to install
> Grub in MBR by default in order to preserve Windows. IMHO this is
> ridiculous because
>
> - it doesn’t preserve Windows (as you just experienced)
> - it doesn’t preserve openSUSE (since you had to use Windows Repair
> DVD)

Installing grub to the MBR can break windows, as it happened. And repairing it breaks GRUB, as it
happened >:-)

> My advice is to boot with a liveCD or PartedMagic and install Grub in
> MBR. But people following the openSUSE ‘policies’ won’t agree.

Indeed >:-)

My general recommendation is:

Leave the MBR as is, untouched (ie, generic boot code as installed by windows. Install grub in a
free primary (or extended (not logical)) partition. Mark that partition as bootable. Unmark the
previously marked bootable partition.

Double check.

Advantages?

Windows repair tools will not damage things, they can blast away the MBR and windows boot sectors.
Grub is safely far away, in a partition. When they do, linux will not boot, but reparing is simple:
start a partition manager and mark again that partition as bootable.

In any case, installing/repairing grub is not a trivial task. Just see the hundreds of threads of
newbies about grub problems. And the main problem is that the person affected has no idea of how
grub was supposedly installed, which is the first step at diagnosis.

Your script, if it can be made to check all cases, can be a very useful tool. It should print all
the things we usually ask.

Thinking… I would perhaps do a for loop on /dev/sd*, checking for strings (is the “strings”
program, or something else, always installed?), and also run a brief partition list. And the command
“file -s” on that for loop, too.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

When I get home I’ll try your suggestions.
Could someone tell me how to make openSuSE reognize my Network card? It doesn’t seem to be able to take IP address.
Thanks

Until you get suse booting again that will be difficult.

Switching the boot flag to the extended partition is done with Parted Magic
My guess it’s on sda1 now
But we didn’t get to see your disk info. You can get that from parted magic too. Open the terminal and type: fdisk -l
(that’s a lower case L)

You will have to toggle the flag of the current partition and set it to extended
Then carefully follow the grub guide to install grub again, adjusting the numbering as appropriate for your settings.

Actually - if you post the fdisk info and the part that answers (find /boot/grub/menu.lst) we can tell you exactly how to proceed if you can’t figure it.

On 2010-09-27 12:36, giavvns wrote:
>

> Could someone tell me how to make openSuSE reognize my Network card? It
> doesn’t seem to be able to take IP address.

There is a specific network forum. Ask there and give details, please.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)