Friday, 24 June 2011

How To Restore Grub After Installing Windows Over Linux

               Recently I installed Windows 7 in a computer that already contains a linux installation .After installation I was unable to boot into linux OS(I can't find it in boot menu). What to do this time? reinstall linux ? No Need.Let's see what happens in this case..
                               When we install windows ,it uses its own boot loader and overwrites the grub(linux boot loader).The boot loader of windows never mind about any other OS which is installed on the computer .It erases the boot load entry of linux. Still the Linux OS is hidden there in the hard disk. So the solution we have to restore our OS without losing any previous data is to restore or reinstall grub. We can apply this methods when our grub installation has any damages happen. Here we discuss about two methods
which  verified  myself .

Method 1: Using a live CD of Ubuntu 9.10 or higher

Here assuming the Ubuntu partition is sda2,and /boot partition is sda1 (if you have a
separate /boot partition).
Boot up ubuntu from the livecd,open terminal and run:

-------------------------------------------------------------------------------------------------------
    sudo -i
    mount /dev/sda2 /mnt
    mount /dev/sda1 /mnt/boot #skip this one if not have a separate /boot partition
    grub-install --root-directory=/mnt/ /dev/sda
-------------------------------------------------------------------------------------------------------

If you miss “grub.cfg” file,use following to recreate:
-------------------------------------------------------------------------------------------------------
  mount --bind /proc /mnt/proc
  mount --bind /dev /mnt/dev
  mount --bind /sys /mnt/sys
  chroot /mnt update-grub
  umount /mnt/sys
  umount /mnt/dev
  umount /mnt/proc
  exit
-------------------------------------------------------------------------------------------------------
method 2: This method can be used when you have access to the grub terminal
Using the cd/usb boot up with grub
Boot up the cd/usb,press c in grub menu.you will be in the grub terminal
grub>
:in terminal type following



-------------------------------------------------------------------------------------------------------

  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
-------------------------------------------------------------------------------------------------------

                                                   The End.

Tuesday, 7 June 2011

Install GNOME 3 on Ubuntu 11.04/11.10

how to install it and remove it Here is the answer

Sunday, 5 June 2011

Gnome 3 : The Modern interface of Linux


Read about GNOME 3 AND WATCH SCREENSHOTS HERE