Linux News|Linux Install sidebyside windows|Ubuntu|Linux Help|Installing Apache and php from source

Tuesday, February 7, 2012

Installing Grub after windows swipe out grub usinglive cd and supergrub

Here we are going to discuss two methods one is recovering from live cd and other is using super grub:
First method:
Boot in your machine from live cd and run the live desktop session using try ubuntu option and do as follows.

This is a simple and quick method to restore grub from live cd.  The terminal is used for entering commands and you must know the partition in which you have installed boot i.e sda1 or sda3 or hda1 like that,if you have not made a different boot partition then you must know your root partition. Now problem starts here because some use does not know the partition name correctly.
Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.
Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L". 

[Sudo fdisk -l]
 
If you are not sure of partition then look for small partition you are comfortable for formatting.
 
Now the mount the partition onto /mnt using command below as follows:
 
[sudo mount /dev/sdxn /mnt

here n is replaced by integer "1","2" or "3" etc. and x is replaced by a,b or c etc.
 
Run the grub install command as described below,this will install grub again .
 
[sudo grub-install --root-directory=/mnt   /dev/sdx]

Now reboot and everything seems to be alright.

 Second Method:
 
Super grub disk is used to repair grub and restore original MBR, so that the disk does not get damaged once the Linux partition is formatted. Super Grub can be downloaded for free and then burned to a CD to make a Super Grub disk live CD.The live CD can be used to repair grub by fixing the boot of GNU Linux. The Super Grub disk can be used to restore MBR back to Windows, if the user wishes to leave the GNU Linux OS and install Windows. Before formatting the Linux partition, the Super Grub disk live CD has to be used to restore the original MBR. 

Super Grub Disk is used to repair Grub and the MBR and reinstall on another partition. 
It can also restore the original MBR uninstalling Grub for users wishing to leave GNU/Linux, without risk of making the computer unusable after formatting the Linux partition. 



You can download Super Grub Disk at this address: 
http://download.linux-live-cd.org/Super_Grub_Disk/download/binaries/sgd/cdrom/ 



Select the file. "Iso" the most recent. 
You can also download versions for other media (USB floppy) to this page: http://www.supergrubdisk.org/ 



The Use

As mentioned above, Super Grub Disk can be used to repair grub, either restore the original MBR.
Once the image. "Iso" download, see this tutorial for burning it.


Launch of Super Grub Disk
  • Start your computer from the CD Super Grub Disk.
  • Select "Super Grub Disk" from the list and click OK. Then select the language.
  • Some details are displayed, including an explanation of the main menu in text mode, click OK to continue.



Repair Grub

Sometimes, unfortunately, we should reinstall Windows, unfortunately after installation, Windows is the only system accessible from MBR because it has been rewritten.
  • From the main menu for Super Grub Disk, select "GNU / linux".
  • Then "Fix boot of GNU/linux"
  • A message will indicate that the operation was successful; Super Grub Disk will detect your installation of Linux and reinstalled GRUB on MBR using the configuration file found.

Confirm and return to the main menu by selecting the top of each menu.

  • Choose "Restart PC" to the last screen.


Restore MBR back to Windows

You may decide to leave GNU/Linux, here's how the world of free software will help you anyway in your approach. 

Perform the following before you format the partition GNU/Linux

  • From the main menu for Super Grub Disk, select "Windows".
  • Then select "Fix Windows startup.
  • A message will warn you that rewriting MBR is not a safe operation, the same warnings are given from a recovery CD of Windows when introducing the command to the C:

fixmbr 
fixboot 

NB: 
Despite the excellent free software GNU / Linux, these manipulations are not without risk, as there is not infallible, we prefer to advise you. 
But nothing ventured, nothing gained! Let us continue ... 

to emphasize that there are alternatives to uninstall Grub/Lilo MBR HERE
  • Then select your operating system Windows in the list.
  • Then select the disk in which MBR will be restored.
  • Operations continue after validation and MBR is restored successfully.
  • Navigate to the main menu by following the top of each menu.
  • And restart your PC.


Once the operations have been completed and your computer rebooted, Grub has disappeared leaving a conventional Windows startup.

No comments:

Post a Comment

ubuntuway.blogspot.com