grub2 Windows 7 fails to start.

Bug #402154 reported by Bevin_Watson
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Fix Released
Undecided
Unassigned
grub2 (Debian)
Fix Released
Undecided
Felix Zielcke
grub2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: grub2

Karmic 9.10
grub2 1.96.20090611-1ubuntu4
I have Ubuntu on sda (SATA) and Windows 7 RC on sdb (IDE)
Grub finds and builds a menu entry for Windows 7 RC, but Windows 7 fails to boot. It says "Windows Starting" and then reboots.
I have a manual entry where I have removed the lines
 search --no-floppy --fs-uuid --set 48bc24d9bc24c374
 drivemap -s (hd0) ${root}
and this one works fine.

Revision history for this message
Bevin_Watson (bevin-watson) wrote :
Revision history for this message
Felix Zielcke (fzielcke) wrote :

I just commited a fix for this upstream, i.e. that drivemap doestn't get anymore added with Vista/7
Unfortunately the download page of Win 7 RC doestn't work for me so I can't test this out myself.

Changed in grub2 (Ubuntu):
status: New → Fix Committed
Felix Zielcke (fzielcke)
Changed in grub-installer (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub-installer - 1.40ubuntu1

---------------
grub-installer (1.40ubuntu1) karmic; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Show the grub menu and raise the menu timeout if other operating
      systems are installed (only for GRUB Legacy right now).
    - Ask grub-installer/only_debian at medium priority.
    - Remove splash boot parameter unless debian-installer/framebuffer=true.
    - If / or /boot are on a removable device, install GRUB there by
      default.
    - Only mount /target/proc if it isn't already mounted.
    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
      grub-installer to use its default MBR selection method despite there
      being unsupported operating systems on the disk.
    - Unless grub-installer/make_active is preseeded to false, mark the
      partition to which GRUB is being installed as bootable, or failing
      that the first available primary partition on the disk to which GRUB
      is being installed.
    - Support grub-installer/bootdev_directory preseeding to make use of the
      relative path feature of grub4dos, so that we can point grub4dos at
      part of a disk for Wubi. Setting this disables normal grub
      installation, but still generates a device.map; it also hides the
      menu.
    - Handle cases where /boot is bind-mounted.
    - Add support for writing an GRUB Legacy MBR on each disk in an
      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
    - Properly make use of output from os-prober to configure the booting of
      other operating systems on dmraid arrays. Attempt to guess where in
      the device map the array belongs, by substituting the first drive in
      the dmraid array for the dmraid array device node itself, and removing
      any reference to other member disks of the array.
    - Add support for lpia.
    - Set a sensible default boot device when /cdrom is not iso9660, as this
      is probably a USB install and (hd0) does not make sense when
      installing from a removable disk.
    - Go back to using update-grub -y for GRUB Legacy for now; our grub
      package is a bit old and still requires this.
    - Default to grub2 for GPT systems.
    - Allow grub/grub2 choice for ext4, though still default to grub2.

grub-installer (1.40) unstable; urgency=low

  * Don't add map/drivemap commands for Windows Vista/7. It breaks
    Windows 7 (LP: #402154).

 -- Colin Watson <email address hidden> Sat, 25 Jul 2009 09:20:12 +0100

Changed in grub-installer (Ubuntu):
status: Fix Committed → Fix Released
Felix Zielcke (fzielcke)
Changed in grub2 (Debian):
assignee: nobody → Felix Zielcke (fzielcke)
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.96+20090725-1ubuntu1

---------------
grub2 (1.96+20090725-1ubuntu1) karmic; urgency=low

  * New upstream version.
    + Fixes offering Windows (LP: #402795)
    + Fixes Vista/Win7 fails to boot (LP: #402154)
    + Fixes installation onto VFAT (LP: #401971)
  * Merge from debian unstable, remaining changes:
    + debian/control:
      - Depend on rather than Suggest os-prober; Ubuntu version does not
        suffer from the mount problem that prevents Debian from marking this
        Depends.
    + debian/default/grub:
      - Adjust for default Ubuntu boot options.
      - Use new GRUB_CMDLINE_LINUX_DEFAULT option to set "quiet splash" for
        default items only. These options won't be set in single user mode.
    + debian/legacy/update-grub:
      - Apply Ubuntu branding: title, recovery mode, quiet option, and tweak
        how memtest86+ is displayed.
      - Use UUIDs where appropriate.
    + debian/patches/03_ubuntu_grub_standards:
      - Remove GNU/Linux from default string.
    + debian/patches/10_crashkernel.patch:
      - add crashkernel= options if kdump and makedumpfile
        is available (part of the kernel-crashdump spec)
  * Update 10_crashkernel.patch for changes upstream.
  * Drop 999_os-prober_drivemap_root.diff, upstream.

 -- Mario Limonciello <email address hidden> Thu, 30 Jul 2009 12:41:19 -0500

Changed in grub2 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
John H. (john-hawk) wrote :

This bug is alive and well as of Oct 1, 2009
First Windows install found always executed, all others revert to the first found occurence.

Example entry:

#!/bin/sh
# /etc/grub.d/25_hawk
# required for save_default_entry to work
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib

echo "Adding Fedora 11 x86 (on /dev/sda3)" >&2
cat << EOF
menuentry "Fedora 11 x86 (on /dev/sda3)" {
EOF
save_default_entry | sed -e "s/^/\t/"
cat << EOF
 set root=(hd0,3)
 chainloader +1
}
EOF

echo "Adding Windows 7 32 bit RTM (loader on /dev/sda1)" >&2
cat << EOF
menuentry "Windows 7 32 bit RTM (loader on /dev/sda1)" {
EOF
save_default_entry | sed -e "s/^/\t/"
cat << EOF
 insmod ntfs
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set 964c56634c563de5
 chainloader +1
}
EOF

echo "Adding Windows 7 64 bit RC (loader on /dev/sdb1)" >&2
cat << EOF
menuentry "Windows 7 64 bit RC (loader on /dev/sdb1)" {
EOF
save_default_entry | sed -e "s/^/\t/"
cat << EOF
 insmod ntfs
 set root=(hd1,1)
 search --no-floppy --fs-uuid --set 67af6e2808c752ac
 chainloader +1
}
EOF

echo "Adding Windows 7 64 bit RTM (loader on /dev/sdb2)" >&2
cat << EOF
menuentry "Windows 7 64 bit RTM (loader on /dev/sdb2)" {
EOF
save_default_entry | sed -e "s/^/\t/"
cat << EOF
 insmod ntfs
 set root=(hd1,2)
 search --no-floppy --fs-uuid --set 7115061167664bcc
 chainloader +1
}
EOF

In all cases Windows 7 32 bit RTM is started. No 64 bit fired from Ubuntu Karmic 32 bit install from live image this date.

Revision history for this message
Konrad Materka (kmaterka) wrote :

This bug isn't solved, look at bug #475881
In bug #486499 user mentions about a workaround, but it doesn't help in my case.
In bug #454930 you can find similar problem, but with Windows XP.

From my investigation I found, that windows bootloader is starting and loading some files, but after initialization process it wants to access files via root drive and can't find this files. My Windows 7 64bit always reboots without any BSOD or error message, so it is only my guess.

I have tried using some workaround, like removing search command, but nothing helps. At last I installed Grub1, it works like a charm, but for not so experienced user it will be too hard to fix.

To make things 'worse', on second computer with similar configuration everything is OK. It has Windows 7 64bit on sda1 and Ubuntu 32bit on extended partition (sda5 or sda6 ext4). Disk is SATA2.

I don't know how exactly grub2 works, but maybe it wrongly passes root disk to windows or can't find it?

My SDA partitions:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000e1244

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 8924 71681998+ 7 HPFS/NTFS (windows root - c:)
/dev/sda2 8925 60671 415657777+ f W95 Ext'd (LBA)
/dev/sda3 60672 60801 1044225 82 Linux swap / Solaris
/dev/sda5 8925 50333 332617761 7 HPFS/NTFS (partition for data)
/dev/sda6 50334 54223 31246393+ 83 Linux (root /)
/dev/sda7 54224 60671 51793528+ 83 Linux (/home)

Revision history for this message
Owen Ilagan (oilagan) wrote :

Just also encountered this problem now after installing Ubuntu 10.10 in my system. My setup is as follows:

/dev/sda1 -- Windows Vista (32bit)
/dev/sda2 -- Ext4 Ubuntu Desktop 10.10 (64bit) (/)
/dev/sda3 -- Ext3 partition (/home)
/dev/sda4 -- Fat32 partition (used for file sharing)

/dev/sdb1 -- System Area (created by windows 7 installer)
/dev/sdb2 -- Windows 7 (64bit)

I can confirm grub2 is the problem since I can boot Windows 7 if I set my BIOS to boot from its drive. Windows Vista however, does not have this problem and can boot via grub.

Revision history for this message
Jean.c.h (slug71) wrote :

This Bug seems similar to this possible duplicate,
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/475881

And,

Here IS a duplicate of this bug,
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/486499

Definitely doesn't seem to be fixed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.