Hi To All The Mindbenders,
As Like My Earlier Tutorials i'm not Going To Consume your important time. I am Always here to provide all The Mindbenders readers a Quick and Easy Solutions.
i already posted a tutorial about Recovering Grub2 but That Was Too Advance To Learn Recovering Grub2.
Grub is similar to boot-manager(Bootmgr) of windows.
But i'm a Linux Lover And Proudly Help Someone Who wants To Stay With Linux Distros.
Now We Are Looking Forward To This Post.
Note:- 1. only commands(text) in red must be typed in your terminal.
2. Text in green after ===> sign indicates the uses of commands you are using at that
instant.
3. sda5 is my partition having Linux OS, so Don't Behave Like Monkeys Use step 1 to
identify your Linux Partition Generally it is In Form Of Ext4 or Ext3 or something like
these Formats and for your Convenience Command will show you Linux in front of
your Partition.
4. Refer To My Video For Better Results.
Steps To Follow:-
Step 0.
Boot from live Linux or backtrack 5 flash drive or any boot-able media of your choice, it could be your Dvd.
Step1.
Figure out where you need to install grub 2 means we need to identify our Partition having Linux.
root@bt:~# sudo fdisk -l =================> List All Partition
root@bt:~# ls =================> List All the Files/folders of your
current mounted partition having root
Privellages
Step2.
Mount the Partition where you need to install the grub2
root@bt:~# sudo mount /dev/sda5 /mnt ========> here sda5 is the partition where linux
is and we mounted in mnt folder
root@bt:~# mount ================> List all the mounted partitions
Step3.
Mount the Partition to an alternate location
root@bt:~# sudo mount /dev/sda5 /mnt/boot
Step4.
Create an unbreakable link from /dev folder on the live image you booted from to the /dev folder on the partition you mounted to /mnt
root@bt:~# sudo mount --bind /dev /mnt/dev/
Step 5.
CHROOT from the live image's root to the mounted partition's root
chroot temporarly changes the root of the filesystem directory.
root@bt:~# pwd ================> Print Working Directory To Check
The Current Root Privellages
root@bt:~# sudo mount ================> List All The Mounted Partitions
root@bt:~# pwd
root@bt:~# ls =================> List All the Files/folders of your
current mounted partition having root
Privellages
if yoou found your linux hard drive content then you are almost on track
Step 6.
Now Reinstall the grub2 loader to the drive on which exists the partition you mounted previously.
root@bt:~# sudo grub-install /dev/sda ==========> Install Grub In Your Hard Drive
Which is sda your primary hard drive.
root@bt:~# pwd
now exit your chroot shell
root@bt:~# exit
Step7.
cleanly unmount all the partitions you previously mounted
root@bt:~# sudo umount /mnt/dev
root@bt:~# sudo umount /mnt/boot
root@bt:~# sudo umount /mnt
now reboot...
root@bt:~# sudo reboot
pull out your live flash disk
when Linux or backtrack says to login simply login and do not try to type startx in case of backtrack Use below Command Before typing startx.
And for other linux, Login To System and then open terminal then use commands.
root@bt:~# os-prober
root@bt:~# update-grub
root@bt:~# startx =================> Only For Backtrack Linux
As Like My Earlier Tutorials i'm not Going To Consume your important time. I am Always here to provide all The Mindbenders readers a Quick and Easy Solutions.
i already posted a tutorial about Recovering Grub2 but That Was Too Advance To Learn Recovering Grub2.
Grub is similar to boot-manager(Bootmgr) of windows.
But i'm a Linux Lover And Proudly Help Someone Who wants To Stay With Linux Distros.
Now We Are Looking Forward To This Post.
Note:- 1. only commands(text) in red must be typed in your terminal.
2. Text in green after ===> sign indicates the uses of commands you are using at that
instant.
3. sda5 is my partition having Linux OS, so Don't Behave Like Monkeys Use step 1 to
identify your Linux Partition Generally it is In Form Of Ext4 or Ext3 or something like
these Formats and for your Convenience Command will show you Linux in front of
your Partition.
4. Refer To My Video For Better Results.
Steps To Follow:-
Step 0.
Boot from live Linux or backtrack 5 flash drive or any boot-able media of your choice, it could be your Dvd.
Step1.
Figure out where you need to install grub 2 means we need to identify our Partition having Linux.
root@bt:~# sudo fdisk -l =================> List All Partition
root@bt:~# ls =================> List All the Files/folders of your
current mounted partition having root
Privellages
Step2.
Mount the Partition where you need to install the grub2
root@bt:~# sudo mount /dev/sda5 /mnt ========> here sda5 is the partition where linux
is and we mounted in mnt folder
root@bt:~# mount ================> List all the mounted partitions
Step3.
Mount the Partition to an alternate location
root@bt:~# sudo mount /dev/sda5 /mnt/boot
Step4.
Create an unbreakable link from /dev folder on the live image you booted from to the /dev folder on the partition you mounted to /mnt
root@bt:~# sudo mount --bind /dev /mnt/dev/
Step 5.
CHROOT from the live image's root to the mounted partition's root
chroot temporarly changes the root of the filesystem directory.
root@bt:~# pwd ================> Print Working Directory To Check
The Current Root Privellages
root@bt:~# sudo chroot /mnt
root@bt:~# sudo mount ================> List All The Mounted Partitions
root@bt:~# pwd
root@bt:~# ls =================> List All the Files/folders of your
current mounted partition having root
Privellages
Step 6.
Now Reinstall the grub2 loader to the drive on which exists the partition you mounted previously.
root@bt:~# sudo grub-install /dev/sda ==========> Install Grub In Your Hard Drive
Which is sda your primary hard drive.
root@bt:~# pwd
now exit your chroot shell
root@bt:~# exit
Step7.
cleanly unmount all the partitions you previously mounted
root@bt:~# sudo umount /mnt/dev
root@bt:~# sudo umount /mnt/boot
root@bt:~# sudo umount /mnt
now reboot...
root@bt:~# sudo reboot
pull out your live flash disk
when Linux or backtrack says to login simply login and do not try to type startx in case of backtrack Use below Command Before typing startx.
And for other linux, Login To System and then open terminal then use commands.
root@bt:~# os-prober
root@bt:~# update-grub
root@bt:~# startx =================> Only For Backtrack Linux
Story Behind The Tutorial:-
I know how much it hurts when you Wants to upgrade but instead of that You Got Problems Like Previously installed linux or any other os is missing from your boot and i got the same situations when i was upgraded to Windows 7 to windows 8 Rtm. i was shocked when i rebooted my Laptop and didn't find my previously installed backtrack 5 grub menu, i can't tell you how much sad i was at that time then i asked everyone But i had a Huge List Of No Hahah. And Finally Referred to some Linux Forums And Found the Fix... Then I Recorded a video of fixing the same in ubuntu...