Restoring GRUB

shadow_man

Executive Member
Joined
May 27, 2005
Messages
7,025
Reaction score
1,745
Location
Cape Town
Ubuntu - just removed win xp 32bit and put on win xp 64 bit but now this has fsckd up my grub loader - how can I fix this from windows , not seeing ntfs drives is a bit lame cant open the loader to edit... :(

Thanks
J
 
How did you get into Windows if GRUB is fscked up?

Formatted my 32 bit xp partiton and installed xp 64 bit this obviously made a new mbr and stopped grub from working - need to a) probably run a live disc or b) possibly use windows recovery (not sure if that would work) to reload grub and just edit the 64 bit partition on to it - are the paths the same for 32/64 bit or... meh I dont know , fiddle fiddle fiddle.

J
 
boot off the live cd, and fix grub from there, i think the command is grub install or something like that.
 
How did you get into Windows if GRUB is fscked up?

Windows rewrites the mbr when you install it again.

Im pretty sure if you boot up off the cd, type:

grub

and then when in the grub terminal, type:

grub install

It might not be that simple, but I think that might do. Your menu.1st should still be there in /boot/grub all you do now is need to install it again into the mbr.
 
thanks guys appreciate it will sort out the grub once i finish setting up this 64 bit xp install - no BSODS so far , 2 days now YAY :)

Dont jinx it :P

Thanks
J
 
I had to do this just a few days ago when I transferred my sisters Linux system onto her new harddisk (didn't feel like reinstalling from scratch)..

It's actually a fairly simple procedure assuming your /boot partition is untouched.. (if you had it separate from /)

grub-install \(hd0\) ought to do it.. (assuming that you boot from the primary master harddisk).. - note the escape slashes (\) - important to remember on the command line.. (or just enclose it in quotes: "(hd0)" )

EDIT: The above assumes that your filesystem is mounted as normal and that /boot is infact mounted at /boot .. otherwise you need to specify the location of your root with --root-directory=DIR .. In my case the Fedora DVD "rescue mode" automatically mounts your root filesystem at "/mnt/sysimage" meaning I had to use --root-directory=/mnt/sysimage
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X