So many times i thought to post about GRUB here are COMMANDS TO REINSTALL GRUB:
All you need to do is access the terminal using the installation CD/DVD of your GNU/Linux operating system. Ubuntu installation CD is a live CD and so, when it loads, you can run the terminal from there. Fedora installation CD/DVD offers options through which you will have to choose to upgrade the system using commands(rescue mode). Some other like Knopics LIVE etc also have similar options
Once you are at the terminal, you will have to access the ‘grub’ shell to change the grub configuration.So, give this command at the terminal:
$ grub
If it says that you don’t have the permission, in which case you will not have logged in as root(as in Ubuntu), give this command at the terminal:
$ sudo grub
You will get the grub-shell prompt:
grub>
Now, you will have to find out in which partition Grub had been installed before, so that you reinstall in that partition only. Give this command at the terminal:
grub> find /boot/grub/stage1
(returns value)
It returns the number of the partition in which Grub i.e your GNU/Linux had been installed.
e.g.,
grub> find /boot/grub/stage1
(hd0,2)
You can also reinstall Grub in your GNU/Linux partition, only if this GNU/Linux partition is “primary” and you have another boot loader installed at the MBR (in case of more than one GNU/Linux operating systems) through which you can boot this primary partition. To do that, give this command at the terminal:
grub> setup (returned value)
e.g.,
grub> setup (hd0,2)
All you need to do is access the terminal using the installation CD/DVD of your GNU/Linux operating system. Ubuntu installation CD is a live CD and so, when it loads, you can run the terminal from there. Fedora installation CD/DVD offers options through which you will have to choose to upgrade the system using commands(rescue mode). Some other like Knopics LIVE etc also have similar options
Once you are at the terminal, you will have to access the ‘grub’ shell to change the grub configuration.So, give this command at the terminal:
$ grub
If it says that you don’t have the permission, in which case you will not have logged in as root(as in Ubuntu), give this command at the terminal:
$ sudo grub
You will get the grub-shell prompt:
grub>
Now, you will have to find out in which partition Grub had been installed before, so that you reinstall in that partition only. Give this command at the terminal:
grub> find /boot/grub/stage1
(returns value)
It returns the number of the partition in which Grub i.e your GNU/Linux had been installed.
e.g.,
grub> find /boot/grub/stage1
(hd0,2)
You can also reinstall Grub in your GNU/Linux partition, only if this GNU/Linux partition is “primary” and you have another boot loader installed at the MBR (in case of more than one GNU/Linux operating systems) through which you can boot this primary partition. To do that, give this command at the terminal:
grub> setup (returned value)
e.g.,
grub> setup (hd0,2)
No comments:
Post a Comment