Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34

Thread: GRUB + Windows 7 = Can't put windows to sleep/hibernate

  1. #31
    Join Date
    Sep 2013
    Beans
    1

    Re: GRUB + Windows 7 = Can't put windows to sleep/hibernate

    I tried setting the boot flag on different partitions, and it's still not working.

    My T430 came with a 320G HD (/dev/hda). It has an utility partition /dev/hda1, and Windows 7 is installed on /dev/hda2.

    I replaced the DVD tray with a SSD drive (/dev/hdb), and put Ubuntu on it. I then changed BIOS' boot order to make the new SSD as the first boot device, old 320G HD as second.

    When the system starts up, it goes to the SSD first and GRUB takes over, I then can choose between Win 7 and Ubuntu from the GRUB menu. So far, Ubuntu works as expected in all aspects - hibernation works perfectly. However, Win 7 is no longer be able to hibernate. I know it's not related to hardware drivers and hibernation file because hibernate worked fine before I installed Ubuntu.

    Win 7 is not seeing the "Default Operating System" drop-down from the "Startup and Recovery" settings regardless which partition (hda1 or hda2) is flagged as "boot". What else can I do?


    Here is my disk setup:



    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x84e23367


    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 1026047 512000 7 HPFS/NTFS/exFAT
    /dev/sda2 1026048 625139711 312056832 7 HPFS/NTFS/exFAT


    Disk /dev/sdb: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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: 0x00004ab0


    Device Boot Start End Blocks Id System
    /dev/sdb1 * 2048 218056703 109027328 83 Linux
    /dev/sdb2 218056704 234440703 8192000 5 Extended
    /dev/sdb5 218058752 234440703 8190976 82 Linux swap / Solaris

    =======================

    This is the follow up after a few hours of reading and study about the problem. I ACTUALLY SOLVED THE PROBLEM after trying different things including screwing up the MBR, rebuilding GRUB2 and etc.

    Here is what I did:

    - Read Amilmand's answer on page 3 carefully
    - Read the Grub documentation and understand a bit more about Windows booting
    - Apply Amilmand's method: turning off auto OS probers, add a custom entry to /etc/grub.d/
    - Set Boot flag to /dev/hda1

    Everything is working well now - both Win 7 and Ubuntu can hibernate.
    Last edited by Victor_Zhang; September 30th, 2013 at 10:04 AM.

  2. #32
    Join Date
    Jun 2014
    Beans
    2

    Re: GRUB + Windows 7 = Can't put windows to sleep/hibernate

    Quote Originally Posted by NHellFire View Post
    amilmand is correct. Windows expects to be the first HDD and refuses to sleep if it's not.
    You can fix it in /etc/grub.d/30_osprober, just change:
    Code:
          case ${LONGNAME} in
            Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
            ;;
            *)
              cat << EOF
            drivemap -s (hd0) \${root}
    EOF
            ;;
          esac
    To:
    Code:
            cat << EOF
          drivemap -s (hd0) \${root}
    EOF

    I've submitted a bug: https://bugs.launchpad.net/bugs/1055880

    Sorry to bump this old thread but I had the exact problem described by OP. It had nothing to do with which partition was marked as boot, the windows 7 partition does have to be marked as boot but it also has to be the first HDD. GRUB was the culprit. This patch worked for me on Ubuntu 14.04 install. Patch the osprober file and run update-grub. Windows 7 can hibernate or hybrid sleep just fine now.

  3. #33
    Join Date
    Aug 2014
    Beans
    1

    Re: GRUB + Windows 7 = Can't put windows to sleep/hibernate

    Great suggestion. It works for me. System: Windows 7 + Ubuntu 14.04

    For my case, normal Windows OS runs under /dev/sda2, which I select to boot windows in the multi-boot menu.
    Using gparted, it was found that /dev/sda1, which is occupied by Recovery Partition, was flagged somehow flagged as 'boot'.
    I simply right click on /dev/sda2 and mark it as 'boot'. Reboot and Windows hibernate works again!

  4. #34
    Join Date
    Oct 2014
    Beans
    1

    Re: GRUB + Windows 7 = Can't put windows to sleep/hibernate

    Can you, please, help me with the following issue.

    My setting is:
    /dev/sda1 - Windows7 200 mb partition, stores windows boot loader, I suppose.
    /dev/sda2 - Windows7 main partition (OS and user files)
    /dev/sda3,6,7,8 - Open SUSE Linux partitions. One of them stores grub, I suppose.
    I've attached the picture to be clear.
    Photo 01.10.14, 21 50 54.jpg

    My problem was that Win7 was able to go sleep but unable to go hibernate. Using Gparted I have seen that boot flag is on sda3, where Open SUSE Linux resides. Using the main method of this thread I've moved the boot flag from sda3 to sda1. Now Windows is able to hibernate. BUT, I can't load Linux since Windows is loading and grub dialog isn't shown.

    How this can be fixed?

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •