Google Plus

restore Grub 2 after reinstalling Windows XP/Vista/Win7

Written by Mel Kham on . Posted in Frequently Asked Questions

Question:  How  to restore Grub 2 after reinstalling Windows XP/Vista/Win7 ?GRUB2-logo

Answer: There is  two  ways  to  restore the grub2 on MBR  after  reinstalling  windows

  • Methode1

 Use the following commands:

grub>find /boot/grub/core.img
grub>root (hdx,y) (previous command will output the x,y)
grub>kernel /boot/grub/core.img
grub>boot

After the boot command,you’ll go into grub2 menu. Select to boot up ubuntu, and run this command to restore grub.

sudo grub-install /dev/sda
  •  Mothode2

You need to have an Ubuntu LiveCD, Start with LiveCD

under root, check your Linux partition

fdisk -l

example output for Linux partition7

/dev/sda7 7300 7919 8880278+ 83 Linux

sudo mkdir mnt1
sudo mount /dev/sda7 mnt1

followed by:

sudo grub-install --root-directory=/mnt/ /dev/sda

Where is your root directory mounted? Is it /mnt? That’s not where you mounted it just now…

sudo grub-install --root-directory=/media/mnt1 /dev/sda

 

  •  Methode3

It’s possible to do grub2/burg recovery & configuration using a live cd by installing  Grub Customizer  at the live system.  All the file systems you need will be automatically mounted after choosing the root partition and some sub partitions on the “live cd setup assistant” (a dialog which pops up, when you start Grub Customizer inside a live system).*

You can install Grub customizer using the following PPA:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

 

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • guest

    thanks , method 1 worked for me
     

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

jacky can

|

You can actually unzip your secret archive by leaving out the -t option, instead using:

unzip newPhoto.jpg

DragonFartOutLoud

|

it went to china.

DragonFartOutLoud

|

great review! i’ve been using it as my main OS since Beta 1 release. its been a awesome ride so far :)

jet li

|

i try the method, and i unzip the image contain zip secret, i dont find the file that i was hide, where it go? and how to open it? :s

zinovsky

|

Yes, it is possible using Steganography, we will post another quick howto do that in the next few days

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .