LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dual booting. i have installed windows vista after ubuntu. want 2 recover grub. (http://www.linuxquestions.org/questions/linux-newbie-8/dual-booting-i-have-installed-windows-vista-after-ubuntu-want-2-recover-grub-898498/)

hemanthm17 08-20-2011 02:19 PM

dual booting. i have installed windows vista after ubuntu. want 2 recover grub.
 
i have installed windows vista on my laptop over ubuntu to which im unable to access ubuntu. i dont know the version of my ubuntu to inform wheather grub 1 or 2 .i remember that i have upgrade the kernal so i dont know which live cd to use and how to re install grub. please anyone explain me each and every step involved in recovering ubuntu o.s including nomenclature of partioning. if it can be done using BCDEDIT utility of vista then please let me know each and every step.

MS3FGX 08-20-2011 03:04 PM

The Ubuntu documentation already has this process explained in excellent detail, you should simply need to follow along with this and you will be back up and running:

Rescuing Ubuntu after installing Windows

saikee 08-20-2011 03:12 PM

See if this simpler or quicker.

(1) Boot up Ubuntu and run it as a Live CD.

(2) Click Application/Accessories/terminal and claim to be a Super user by
Code:

sudo su
(3) Display the hard disk partition by command
Code:

fdisk -l
and identify which partition holds Ubuntu. It will be the first one with type 83. Say this is sda2.

(4) Create a mount point and mount Ubuntu partition (assuming it is sda2) and do a grub-install
Code:

mkdir /mnt/sda2
mount /dev/sda2 /mnt/sda2
grub-install --root-directory=/mnt/sda2 /dev/sda

The procedure Will work for every Linux that uses Grub. For non-Debian and non-Ubuntu distros claim the super user by
Code:

su
-----------------------------using Vista to dual boot Linux-------------------------------------------------

Do the above except in Step (4) Last command you tell Grub2 to install itself in sda2 by
Code:

grub-install --root-directory=/mnt/sda2 --force /dev/sda2
You then follow Task E5 of Just booting tips in my signature on how to use BCDedit to arrange the dual boot.

You should be left in no illusion that Grub needs only 1/4 of the work of Vista's bootmgr (Vista/Win7 boot loader) to do a dual boot.

When it comes to booting Linux is light years ahead of M$ systems.

Stranger420 08-20-2011 03:21 PM

Hi hemanthm17,just boot from live cd,from which you installed ubuntu,open terminal then type these commands

sudo grub
find /boot/grub/stage2

look at the output of above command, it will show a partition like this (hd0,9)
now type

root (hd0,9)
setup (hd0)

don't forget to replace (hd0,9) with what "find /boot/grub/stage2" command returns.


All times are GMT -5. The time now is 05:31 AM.