GRUB Error 22 - Restore Win mbr

Asked by Random774

I know there are many similar topics, but they don't seem identical to my problem. Not long ago I asked how to uninstall Ubuntu. The solution was to delete the partition from within Ubuntu liveCD session. It worked, but now my computer won't boot anything. I turn on my machine, and get GRUB Loading... blah blah blah... Error 22. You all have seen enough people with this problem to fix it I hope. My goal is to boot Windows Vista, so I can then install Ubuntu to a pre-set up HD partition. I am new to command prompts and Linux, so please, take very little info as granted. Thanks Y'all.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Tom
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Unistall Ubuntu and install or restore Windows

a) - Be sure you have the Windows installation CD and it is readable from your cdrom
b) - Using Windows force a complete hard-disk check and reboot selecting Windows to perform the check
c) - Make an external backup (on cd or other devices ) of your relevant Windows data.

d) - Boot your pc from the Ubuntu 7.10 or 8.04 or 8.10 or 9.04 live install cd
When Ubuntu is up press ALT+F2 and type into opened dialog window: gparted
Now using gparted
Select from upper right the /dev/... hard disk
Then select the etx3 right click with mouse on that partition and select delete, press "Apply"
gparted delete partition and close itself

Press ALT+F2 and type into opened dialog window: gparted
Redo the same for the swap partition.
gparted delete partition and close itself

Press ALT+F2 and type into opened dialog window: gparted
When you will see only the NTFS partition and free space
Select NTFS partition and resize it by dragging the cursor arrow then press "Apply"

Shutdown Ubuntu remove Ubuntu CD and insert the Window XP cd

Boot from Win XP Cd ( you will get setup inspecting hardware configuration)
Will come to screen to setup or repair existing install press R to enter recovery console
You will be asked to choose install to repair enter number and you will get prompt
for admin password followed by: C:WINDOWS>

at this point type FIXMBR or HELP will give you list of options.

Reboot the pc...

Depending on what drive you have XP installed you might have to give an additional command: "fixboot x:" where "x:" represents the drive XP is installed.

See: www.microsoft.com/documentation/bootcons_fixmbr
And: www.microsoft.com/documentation/bootcons_fixboot

HTH

Revision history for this message
Random774 (crinaldi77) said :
#2

I don't have a windows CD, and its Vista, though I'm not sure what difference it will make.

Revision history for this message
Best Tom (tom6) said :
#3

Hi

I am really sorry i made a mess of that. For some reason i thought you were going to reinstall Ubuntu immediately after uninstalling it. That is really about the only way to fix this now. It doesn't matter which version of linux you install but you need to install a linux as a dual-boot so that you can boot into Windows. Then when you boot into Windows get to an MsDos prompt and type in

fixmbr

then check that Windows does boot up without going through grub. Finally get into a LiveCd session to remove Ubuntu again.

I am really sorry i missed the "fixmbr" step
Apols and regards from
Tom

Revision history for this message
Random774 (crinaldi77) said :
#4

Thanks! Hey, don't worry about the confusion. Honestly, it was probably my being unclear on what I needed/wanted. One more question: same method of uninstalling Ubuntu as before, or something different?

Revision history for this message
Random774 (crinaldi77) said :
#5

Thanks Tom, that solved my question.

Revision history for this message
Tom (tom6) said :
#6

Hi :)

I think you will have to install using the more robust dual-boot method
https://help.ubuntu.com/community/WindowsDualBoot
and probably using the Manual Partitioning method now, giving Ubuntu at least 10Gb of hard-drive space. Then reboot into Windows and do "fixmbr". Then just delete the Ubuntu partition from inside a LiveCd session afterwards.

If you don't have 10Gb of space then a different version (a different distro) of linux, perhaps sliTaz rather than Ubuntu, would be better for this but would work in very much the same way. SliTaz would need less than 500Mb of hard-drive space and is a 30Mb download.

Thanks again and apols from
Tom :)

Revision history for this message
Tom (tom6) said :
#7

Brilliant! :))) Nicely done :)))
Congrats and regards from
Tom :)