Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need to restore grub for a windows partition

Posted on 2010-09-02
14
Medium Priority
?
1,301 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 2000 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
Suggested Courses

715 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