New Linux users like to keep windows in their computers while getting use to Linux. But I don’t recommend that because when they find something hard in Linux or something new to do in Linux, most of them just forget about everything and get it done in windows. So they won’t learn anything new.
However most new users think whenever they run a new installation of Windows the GRUB gets disappear so they also have to reinstall Linux. But that’s not the way! Oops, I almost forgot to tell what GRUB is. Well GRUB stands for GRand Unified Bootloader. It’s a flexible and a powerful boot loader which comes with Linux. It’s useful when we use more than one operating system in a single PC.
So the reason for the disappearance of GRUB is when user installs Windows or any other OS after a Linux installation, the newly installed OS rewrites the MBR (Master Boot Record) with its own boot loader. OK then this is the way to re-establish the GRUB.
0. Boot the machine from your Live CD/DVD.
1. Open a terminal/konsole and get into root mode by giving
2.Then type ‘grub’ and press enter. This allows the user to run the grub shell.
3. Setting the root device. Root device means the partition which contains the ‘/boot’ directory. If you’re not sure with that, you can find the corresponding partition by giving,
grub> find /boot/grub/stage1
I have resulted this,
This says my hard disk number is 1 and partition number is 3.
Note: hard disk numbers and partition numbers are starting from 0.
(According to me, this is the 4th partition of my 2nd hard disk)
Now, I’m setting it as the root device.
4.After setting the root device correctly run the following command,
This tells to install the GRUB to the MBR of the 2nd hard disk.
5.Now exit from the grub shell
The missing GRUB is back on business.