Solved

Need to restore grub for a windows partition

Posted on 2010-09-02
14
1,279 Views
Last Modified: 2013-12-01
I had a system set up for dualboot (Windows - ubuntu) and then I removed the ubuntu partition and now my grub is hosed (error 22 on boot). I'm trying to restore grub for the windows partition using supergrub but I want to make sure I'm selecting the correct options.

I verified that I can still boot into the windows partition through supergrub 2 (booted into off of a usb stick) by selecting the following options:

1) Detect any OS

2) Windows Vista bootmgr

But now I want to permanently fix the boot partition on the hard drive.

0
Comment
Question by:opike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
14 Comments
 

Author Comment

by:opike
ID: 33587987
When I select:

"Detect any GRUB2 configuration file (grub.cfg)"

from the grub 2 menu, I get the error message:

"Error: Could not find any grub.cfg files."

When I select:

"Detect any GRUB2 installation (even if mbr is overwritten)"

I get the error message:

"Error: Could not find any core.img files"
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 33588736
Hi!

If you only want Windows Vista on your machine you might boot on the Vista installation DVD and select "Repair" to repair the boot. Then you'll lose Grub, but you don't need Grub if you're only gonna use Vista.

Regards, Tobias
0
 
LVL 18

Accepted Solution

by:
TobiasHolm earned 500 total points
ID: 33588794
And the same is true if you're using Windows 7.  Boot on the Win7 installation DVD and select "Repair" to repair the boot.

Regards, Tobias
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
LVL 18

Expert Comment

by:TobiasHolm
ID: 33588861
If you don't have a Windows installation DVD and want to fix the MBR you can use FixMbr: http://www.sysint.no/nedlasting/mbrfix.htm

Download: http://www.sysint.no/products/Download/tabid/536/language/en-US/Default.aspx (scroll down a bit on the page)

Regards, Tobias
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 33589030
You could try Ultimate Boot CD for Windows ( http://www.ubcd4win.com/downloads.htm ) too, it has MbrFix (I reversed the name above, ignore that ;) and a tool for "Vista Recovery Console" (if you're running Vista).

Regards, Tobias
0
 

Author Comment

by:opike
ID: 33589614
I tried running the "Startup Repair" from the windows 7 install dvd and I get the message

"Startup Repair cound not detect a problem"

Ïf you have recently attached a device to this computer, such as a camera or portable music player, remove it and restart your computer. If you continue to see this message, contact your system administrator or computer manufacturer for assistance"

I don't have any external items connected to the machine.
0
 

Author Comment

by:opike
ID: 33590102
I think windows is struggling to repair the boot process because there are 2 paritions, a boot partition (presumably with grub installed) and then the windows partition.
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 33591592
ok. Do you still see the Grub menu when you boot your machine? Then try to write a "clean" MBR with the MbrFix tool I linked to above. Then Grub won't pop up trying to boot and fail due to the lack of the Linux partition.

Regards, Tobias
0
 

Author Comment

by:opike
ID: 33593398
Is this the mbrfix command I should run?

 MbrFix /drive <num> fixmbr {/vista|/win7}
0
 

Author Comment

by:opike
ID: 33593414
Here's a list of the partitions:

C:\Users\ollie\Downloads>mbrfix64 /drive 0 listpartitions
# Boot Size (MB) Type
1 Yes     16384   39  Unknown
2           200    7  NTFS or HPFS
3        460355    7  NTFS or HPFS
4             0    0  None
0
 

Author Comment

by:opike
ID: 33593417
I tried to issue a fixbootsector command on partition 1:

C:\Users\ollie\Downloads>mbrfix64 /drive 0 /partition 1 fixbootsector /win7
You are about to Fix boot sector,
are you sure (Y/N)? y
Invalid OS version specified
Function failed. Error 10: The environment is incorrect.
0
 

Author Comment

by:opike
ID: 33593560
I just fixed the problem.

I went back to the "repair" option off of the windows 7 installation dvd, but I then had to do the following:

Go into the command shell and enter the command:
bootsect /nt60 C:

After this I was able to successfully remove grub and boot directly into windows 7.
0
 

Author Comment

by:opike
ID: 33593575
Please reopen this question. The points did not get assigned the way I wanted.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question