GRUB boot into Windows 7 breaks GRUB and makes system unbootable

5,764

This not really an "answer". The content would be a better match to a comment, but is too long-winded to fit in one. Apologies :-(

Some questions just to make sure I am reading your question correctly. (Please update/edit your question if you any further info to add.)

  • You say "I installed grub manually onto the hard disk (/dev/sda)."
    So you have already booted into the 12.04 installed on partition sda5 and successfully run
    sudo grub-install /dev/sda?
  • You say that "... after booting into Windows 7, grub doesn't load on the next boot. The computer simply reboots again and again."
    Does it make any difference which of the two entries for Windows in your GRUB menu you use to boot into Windows?
    There is one for /dev/sda1 (label "OSDisk") and another for /dev/sda3 (label "BDEDrive").
  • Is there any error or status information at all displayed prior to or during this infinite boot loop? Can you tell if it is Linux/GRUB or Windows that is looping?

I am wondering if there is some conflict between your two Windows boot configurations. Only one of them would seem to be needed. (Probably the one on the first partition, OSBoot?)

Perhaps you might learn something by installing a Windows boot utility such as EasyBCD and making sure your Windows boot settings are correct?


Another alternative might be to bring up the Windows 7 Advanced startup options boot menu by pressing F8 immediately after starting a Windows boot from the GRUB menu. If the option to Repair your computer is available in the advanced options boot menu, you could run Startup repair to check for and (maybe) correct problems in your Windows boot setup.

Note: You have to be quick pressing F8 or Windows will just boot as usual.


I'm not sure exactly what is going wrong, but could there be some corruption in either your Windows or Linux file systems?

The excerpt below is from your boot-repair log from lines 616 to 641. The repeated failures of getcwd() (get current working directory) and the GRUB warning about ZISD (ZENworks Image Safe Data ?) might mean something. Do you use ZENworks?

REPAIROK:
Copied Win boot files from sda3 to sda1
Reinstall the GRUB of sda5 into all MBRs of disks with OS or not-USB
Reinstall the GRUB of sda5 into the MBR of sda
dpkg --configure -a sda5
sh: 0: getcwd() failed: No such file or directory
grub-install (GRUB) 1.99-21ubuntu3
grub-setup: warn: Sector 5 is already in use by ZISD; avoiding it.  This software may cause boot or other problems in future.  Please ask its authors not to store data in the boot track.
SETUPOUTPUT: SETUPEXIT:0
sh: 0: getcwd() failed: No such file or directory
/usr/sbin/grub-setup: warn: Sector 5 is already in use by ZISD; avoiding it.  This software may cause boot or other problems in future.  Please ask its authors not to store data in the boot track.
INSTALLOUTPUT: Installation finished. No error reported.
INSTALLEXIT:0
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Generating grub.cfg ...
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Found memtest86+ image: /boot/memtest86+.bin
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Share:
5,764

Related videos on Youtube

Matthew East
Author by

Matthew East

Updated on September 18, 2022

Comments

  • Matthew East
    Matthew East about 1 year

    I have installed Ubuntu 12.04 (daily-live iso from 21.04.12) alongside Windows 7 on an HP EliteBook laptop.

    The installation went fine, except that it installed grub onto my usb disk (/dev/sdb) instead of the hard disk (/dev/sda). I was able to boot into the Ubuntu installation by using the usb disk which had grub installed on it. I then installed grub manually onto the hard disk (/dev/sda) by running "grub-install /dev/sda".

    After I do that, I can book into either Ubuntu or Windows 7 from the Grub menu. However, after booting into Windows 7, grub doesn't load on the next boot. The computer simply reboots again and again, without giving any error. The screen simply goes black and reboots. There are two entries for Windows 7 in grub: for /dev/sda1 and /dev/sda3. These are in reality a single Windows installation which uses both partitions. Booting into either of them produces the same effect.

    If I boot into the Ubuntu partition using the usb disk, I have found that I can restore grub to working order by using the boot-repair application. Then if I boot into Windows again, grub breaks again.

    Full details of the log file which boot-repair produces, showing the partition details, are here: http://paste.ubuntu.com/940155/

    Any ideas?

    • Madhusudhan
      Madhusudhan over 11 years
      From log : Found Windows 7 (loader) on /dev/sda1 Found Windows 7 (loader) on /dev/sda3 [Found two windows partition] better solution is re-install windows7 and then recover ubuntu grub.
    • Matthew East
      Matthew East over 11 years
      I don't have any way to re-install windows 7.
    • Madhusudhan
      Madhusudhan over 11 years
      can you please explain why?
    • Matthew East
      Matthew East over 11 years
      Because I don't have any Windows 7 installation disks. In any event, I don't think the fact that there are two Windows partitions is the problem.
    • Madhusudhan
      Madhusudhan over 11 years
      After load windows7 it changes boot loader(MBR). What does this means? Windows is changing your MBR, fix windows anyway. Not a ubuntu issue.
    • Admin
      Admin over 9 years
      I have the exact same problem and I think I have a correlation with the use of zenworks. Twice already The bootloader broke and after a short flash of GRUB loading... the computer resets. Both times right after zenworks was fixed because it complained some services were not running, it recovered and I installed some programs. I suspect the programs needed some work early in the boot cycle and windows decided to break the bootloader. I now have to fix it again. I have a backup of the mbr (first 512 byte), would that be enough to restore grub?
  • irrational John
    irrational John over 11 years
    If I am reading the information in paste.ubuntu.com/940155 correctly, line 55 implies there is a /boot/grub/grub.cfg in sda5.
  • Matthew East
    Matthew East over 11 years
    Thank you very much for your help. Yes, Zenworks is installed on the machine. I believe that my office uses it to update software and install new programs used for my office. I have used the application which you suggested - EasyBCD - to install a new boot record with a Windows boot manager, and to add entries on it for Windows 7 and for Ubuntu. I can now happily boot into both operating systems, so that's fantastic.
  • Mahmoud Al-Qudsi
    Mahmoud Al-Qudsi over 11 years
    Glad EasyBCD worked for you! (I'm the author)