Page 1 of 1
Setting GRUB after re-installing windows
Posted: Thu Nov 29, 2007 10:43 am
by Ahmad ullah
Dear Brothers/sisters
Assa lamo Alaikum WW.
Hope you all are fine and living a life of comfort. As usual, i come here and past some lines describing the problem which i face recently. Today, as usual, i have faced one problem and hope you will never hesitate to help me in this prob as well for which i shall be thankfull for ever.
The problem is:
How to set GRUB to show multiple Operating Systems when windows OS is reinstalled and Linux still exists on the Hard drive? I had both linux and wondows and the GRUB used to give me the choice of the Operating System, now after reinstalling windows, windows starts by default and The window for GRUb is even not shown. How to solve this problem?
Thanks for your your help.
Posted: Thu Nov 29, 2007 12:51 pm
by mudasir
AOA,
Dear Ahmed Ullah,
Boot with Linux CD and go in to the LINUX RESCUE mode. Type the command.
/sbin/grub-install /dev/hda
(Replace HDA with you Master drive, dont enter any number like HDA1 or HDA2.)
further explaination
Posted: Thu Nov 29, 2007 3:45 pm
by Ahmad ullah
Dear mudasir!
Can you ( or some other brother ) explain the line:
(Replace HDA with you Master drive, dont enter any number like HDA1 or HDA2.)
in alittle more details, because i did not understand (dont enter any number like HDA1 or HDA2) which could mean " i should not use capital letters" or some thing else. I think the installation of Linux on my system is on hda0. should i give that?
How to reinstall grub on MBR
Posted: Thu Nov 29, 2007 5:23 pm
by geoaxis
Don't take this the wrong way.
-Please don't write stories, people who want to help you are not here for your prayers and to know how your day went. Just straight away describe your problem.
Your problem is very simple. When you reinstalled Windows, you overwrote your MBR, Assuming that your linux installation is still intact, do what mudasir suggested. Boot from a Live CD.
and then follow steps from the section titled
Alternative: Setting up GRUB using manual instructions
on
http://www.gentoo.org/doc/en/handbook/h ... #doc_chap2
I am not sure if grub-install as mentioned would be present in every linux distro, but the way i mentioned can be done from any system with grub.
Posted: Fri Nov 30, 2007 12:55 am
by x2oxen
your mbr overwritten when you re-installed windows so you need to reinstall grub boot loader just follow mudassir's instruction and restore your grub
Same case
Posted: Fri Feb 01, 2008 5:17 pm
by hamidabrar
Dear All
ihave same case, sorry to admin, by mistake i have started an other thred.
i did same as firends suggest me and Mr. Ahmad, but when i am trying to install grub, get failure.
i have installed linux again, but want to know how to recover/reinstall bootloader(grub). how can i practice for boot loader installation but dont want to destroy my linux box.
thanks all guys
Posted: Fri Feb 01, 2008 9:08 pm
by x2oxen
About other thread you can delete it.
And about your grub re-installation practice you can use vmware or virtual pc .
its working.
Posted: Sat Feb 02, 2008 1:13 pm
by hamidabrar
Dear All
i have reinstalled/recored my bootloader
using these commands/step one my Linux Guru suggest.
Step 1:
Boot from the same version Linux CD 1 i.e if you want to recover redhat 9 then redhat 9 CD 1 will be used.
At the time when we enter to start installation. Before enter type linux rescue. Then you will be booting in rescue mode. You will find your typing at the end of the screen like
Boot: linux rescue
Step 2:
Press OK for both keyboard and language configuration, if it ask to start network interface just skip it.
Step 3:
After configuring the keyboard and language it will then prompt you the message which summary is that resccue mode will going to find your linux what you want to do. Press CONTINUE
Step 4:
After pressing CONTINUE it will give you message that it finds your linux press OK. (Note if it says that it did'nt find your linux then you deleted your linux).
Step 5:
After pressing OK you will get prompt and enter the following commands to get back your bootloader
# chroot /mnt/sysimage
# /sbin/grub-install /dev/hda (note: there is a space between /sbin/grub-install and /dev/hda)
# exit
# exit
_________________
I want to be a Master not JAck
Posted: Sat Feb 02, 2008 2:29 pm
by mudasir
AOA,
Dear
I think this is what i suggested in my first post
Boot with Linux CD and go in to the LINUX RESCUE mode. Type the command.
/sbin/grub-install /dev/hda
(Replace HDA with you Master drive, dont enter any number like HDA1 or HDA2.)
Yaseen
Posted: Mon Oct 06, 2008 12:27 am
by ghulam yaseen
Hello
,
This means that you want the master boot record(hda) of your hard disk to fetch grub.conf instead of hda1 or hda2.
-----------------
/sbin/grub-install /dev/hda
(Replace HDA with you Master drive, dont enter any number like HDA1 or HDA2.)
-----------------
I hope that you understood the point.