bugGNU GRUB - Bugs: bug #34786, os-prober does not recognize...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #34786: os-prober does not recognize Windows 7 partition

Submitter:  Pavel Mendl <pmendl>
Submitted:  Wed 09 Nov 2011 03:04:48 PM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  other
Release:  Reproducibility:  Every Time
Planned Release:  None

Jump to the original submission

Mon 14 Nov 2011 11:48:52 AM UTC, comment #10: 

Thanks for your clues. Finally I have completely separated Windows and Linux HDDs and have clean and clear autoupdated GRUB2 menu and everything works like a charm. So it is proper time to say goodbye and close this thread.

Once again, thanks for all your kindly help and support. It saved me a lot of time and testing. Should there be something I could help you in future, feel free to e-mail me.

Take care,
Pavel

Pavel Mendl <pmendl>
Sun 13 Nov 2011 11:06:41 PM UTC, comment #9: 

Windows installer always put its bootloader on the first bootable drive on active NTFS/FAT partition and creating one if none available. The only way to ensure that no modifications are done to unrelated drives is to disconnect them. As for moving the contents of this partition web search "installing bootmgr"

Vladimir Serbinenko <phcoder>
Group administrator
Sun 13 Nov 2011 10:56:50 PM UTC, comment #8: 

Success! I finally realized, that partition table is contained in the first (=MBR) sector of the device. Thus "mysterious" /dev/sdb3 was present when I used Windows 7 MBR (and eventually booted linux via USB stick) but disappeared when I restored GRUB2 MBR from the backup made before Windows 7 installation.

I thus copied proper 64 bytes from W7 MBR to GRUB2 MBR and now I do update-grub2 and boot routinely.

Still I have big complaint against Microsoft's installer, which created unannounced, unnecessary and unwanted partition on even OTHER device then the one where I installed Windows7 themselves...

Any clues or ideas how to get rid of that partition, containing all the Windows 7 stuff in single partition will thus be highly appreciated.

Pavel Mendl <pmendl>
Sat 12 Nov 2011 06:07:35 PM UTC, comment #7: 

No joy so far. I got partial success with the below listed grub menu item, what boots into Windows XP - but they are in the /dev/sda2, not /dev/sda3, what confuses me a bit. Maybe some trickery with partition hiding and bootable flag settings could help, however I am currently short of testing time.

If you can place some recommendation based on the information I posted so far, it will be appreciated, otherwise I will continue try-and-mistake method tomorrow or on Monday.

menuentry "Windows 7 (on /dev/sdb3)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root F200C4C400C49151
drivemap -s (hd0) ${root}
chainloader +1
}

Pavel Mendl <pmendl>
Sat 12 Nov 2011 08:59:03 AM UTC, comment #6: 

Crap. You are right! I did not notice /dev/sdb3 suddenly appeared (it was not formated before I started installation process). It must be kind of Windows installer magic. And it looks like this would be the proper Windows7 boot partition. In the following /dev/sdb3 is mounted as /mnt/Windows_XP not to need to create more and more folders under /mnt :

/mnt/Windows_XP/:
Boot  bootmgr  BOOTSECT.BAK  System Volume Information  w7ldr

/mnt/Windows_XP/Boot:
BCD       BOOTSTAT.DAT  el-GR  Fonts  ja-JP        nl-NL  ru-RU  zh-HK
BCD.LOG   cs-CZ         en-US  fr-FR  ko-KR        pl-PL  sv-SE  zh-TW
BCD.LOG1  da-DK         es-ES  hu-HU  memtest.exe  pt-BR  tr-TR
BCD.LOG2  de-DE         fi-FI  it-IT  nb-NO        pt-PT  zh-CN

/mnt/Windows_XP/Boot/cs-CZ:
bootmgr.exe.mui  memtest.exe.mui

/mnt/Windows_XP/Boot/da-DK:
bootmgr.exe.mui

/mnt/Windows_XP/Boot/de-DE:
bootmgr.exe.mui

... and many more language .mui.

This is the output of $ echo /sys/block/
loop0/ loop2/ loop4/ loop6/ sda/   sdc/   sr0/  
loop1/ loop3/ loop5/ loop7/ sdb/   sdd/   sr1/

In the evening I will try to redirect W7 boot menu item to /dev/sdb3 (what I expect to work now) and will report back.

If this kind of boot will be succesfull, is there any chance to hold it all in /dev/sda3 (e.g. moving the root items and /boot folder into /dev/sda3, eventually with replacing 1st sector of /dev/sda3 with the content of first sector of /dev/sdb3) ?

Any other useful ideas, clues, recommendations or test requests?

Pavel Mendl <pmendl>
Fri 11 Nov 2011 11:39:43 AM UTC, comment #5: 

sdb3 didn't appear in your original report. Is there a bootmgr and boot/bcd in the root there? I wonder why both os-prober and bootinfo both missed it. Does it appear among  echo /sys/block/*/*[0-9] ?

Vladimir Serbinenko <phcoder>
Group administrator
Fri 11 Nov 2011 10:45:40 AM UTC, comment #4: 

Dear friend, thank you for your care and will to help.

I did search for bootmgr in /dev/sda2 and /dev/sda3. Results are in the attached text file. As I DID FOUND bootmgr in /dev/sda3 and the search (mounting, search itself...) is a timeconsumpting process I did not continue with other partitions. Please ask, if you need me to do so.

I am attaching .tar with all first sectors. Please note, that /dev/sda4 does not exist (File not exists error on dd if=/dev/sda4), what I believe is because it is just holder for the extended partition containing /dev/sda5-7. /dev/sdb is in two versions, one for GRUB2 and other for Windows 7.

I am attaching my current boot.cfg as well. Please note, that it is temporary manually modified (just added the (non funcional) menu item for Windows7).

(file #24348, file #24349, file #24350)

Pavel Mendl <pmendl>
Thu 10 Nov 2011 10:14:26 PM UTC, comment #3: 

Your system doesn't seem to be EFI since you have no EFI system partition, so you need bootmgr somewhere. Are you able to find bootmgr on any partition (probably sda2 and sda3)? Can you send me the first sector of every disk and first sector of every partition? There is a slight possibility of one somewhat esoterical situation and I need those files to check it

Vladimir Serbinenko <phcoder>
Group administrator
Thu 10 Nov 2011 09:56:25 PM UTC, comment #2: 

Thanks for zour swift answer which displaz deep insight.

I know I am a bit out of bugreport now, but still: as strange as it sounds I AM able to boot Windows 7, however I really DID NOT find the way, how to do that from GRUB. Usual insmod part_msdos, ... ntfs, set root..., search... chainloader +1 really complains about missing bootmanager.

However simple dd of=/dev/sdb if=MBR_WIN7.backup did the trick (of course I did dd backup before MBR restore for GRUB2) and this way I normally boot into running Windows 7 (now I am writting from there).

But I really insist on consistent triple boot (Linux/W XP/ W 7) and the highly preffered way would be GRUB2. For this reason I would very appreciate any help or at least pointer where to continue my search for workaround now.

Pavel Mendl <pmendl>
Wed 09 Nov 2011 03:57:32 PM UTC, comment #1: 

We don't maintain os-prober. Moreover your bootinfo results clearly show the lack of bootmgr and associated files which leads me to believe that you windows install is incomplete and thus unbootable.

Vladimir Serbinenko <phcoder>
Group administrator
Wed 09 Nov 2011 03:04:48 PM UTC, original submission:  

The issue is related to the GRUB2 from Debian, stating version 1.99-12.

I post here as:
1) I have found several discussions in various forums, with unclear results, closing as the matter of ntfs-3g, what I can definitely deny (at least in my case).
2) I feel familiar enough in Linux environment (Debian) to hope to be able to assist the diagnosis.
3) Did not find any bugreport about os-prober here.

To the topic:
Yesterday I have installed Windows 7, restored MBR, run update-grub and was confused by no new entry (W 7) appearing in the menu.

Snuffing and googling around I have found, that os-prober does not detect the Windows 7 in it's sda3 partition at all - what at least explains no new menu item added. os-prober output is as:

/dev/sda2:Microsoft Windows XP Professional:Windows:chain
/dev/sda5:Debian GNU/Linux (lenny/sid):Debian:linux



Based on the related threads
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/545033
http://ubuntuforums.org/showthread.php?t=1705363
I tried to run the boot_info_script.sh with the following result:

============================= Boot Info Summary: ===============================

 => Grub Legacy (v0.97) is installed in the MBR of /dev/sda and looks on the
    same drive in partition #1 for /grub/stage2 and /grub/menu.lst.
 => Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and looks
    for ?? on this drive.

sda1: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files:        /grub/menu.lst

sda2: ________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:   No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files:        /boot.ini /ntldr /NTDETECT.COM

sda3: ________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:   No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /Windows/System32/winload.exe

sda4: ________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sda5: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux lenny/sid
    Boot files:        /etc/fstab

sda6: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files:       

sda7: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files:       

sdb1: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files:        /grub/grub.cfg /grub/core.img

sdb2: ________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sdb5: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux wheezy/sid
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb6: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files:       

sdb7: ________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files:

All information there seems correct to me. (sda is older disk, now designated for Windows (=gaming) use, while sdb is newer, designated for Linux (=production environment). However I am still in the transition so partition types are still mixed there. MBR points to sdb (!), specifically sdb1, not to confuse you.

Should you need any specific details, testing or output, feel free to ask via my e-mail. Hope we will settle this once for all.

Pavel Mendl <pmendl>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #24348:  first_sectors.tar added by pmendl (20KiB - application/x-tar - Files requested for debugging)
file #24349:  bootmgr_locations.txt added by pmendl (1KiB - text/plain - Files requested for debugging)
file #24350:  grub.cfg added by pmendl (8KiB - application/octet-stream - Files requested for debugging)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by pmendl (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-11 pmendl Attached File- Added first_sectors.tar, #24348
        Attached File- Added bootmgr_locations.txt, #24349
        Attached File- Added grub.cfg, #24350
    2011-11-09 phcoder StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code