Setting GRUB after re-installing windows

Discussion regarding the installation and configuration of Linux distributions.

Setting GRUB after re-installing windows

Postby Ahmad ullah » Thu Nov 29, 2007 10:43 am

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.
What is not possible is not impossible!

Ahmad achakzai BUITEMS
03342430905
Ahmad ullah
Lance Naik
 
Posts: 28
Joined: Fri Sep 28, 2007 12:29 pm
WLM: khoban@hotmail.com
Yahoo Messenger: khoban3@yahoo.com
Location: Quetta

Postby mudasir » Thu Nov 29, 2007 12:51 pm

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.)
Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com
mudasir
Captain
 
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Website: http://www.crystalnetworks.org
Location: Dubai

further explaination

Postby Ahmad ullah » Thu Nov 29, 2007 3:45 pm

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?
What is not possible is not impossible!



Ahmad achakzai BUITEMS

03342430905
Ahmad ullah
Lance Naik
 
Posts: 28
Joined: Fri Sep 28, 2007 12:29 pm
WLM: khoban@hotmail.com
Yahoo Messenger: khoban3@yahoo.com
Location: Quetta

How to reinstall grub on MBR

Postby geoaxis » Thu Nov 29, 2007 5:23 pm

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.
geoaxis
Cadet
 
Posts: 1
Joined: Wed Dec 29, 2004 10:33 am
Website: http://hatimonline.com
Location: Islamabad

Postby x2oxen » Fri Nov 30, 2007 12:55 am

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
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
x2oxen
Major General
 
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Website: http://usmanpk.com
WLM: x2oxen@hotmail.com
Yahoo Messenger: x2oxen
Location: Faisalabad

Same case

Postby hamidabrar » Fri Feb 01, 2008 5:17 pm

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
I want to be a Master not JAck
hamidabrar
Lance Naik
 
Posts: 31
Joined: Thu May 10, 2007 2:29 pm
Website: http://www.acs.com.sa
Yahoo Messenger: taizy35
Location: Saudi Arabia (Dammam)

Postby x2oxen » Fri Feb 01, 2008 9:08 pm

About other thread you can delete it.

And about your grub re-installation practice you can use vmware or virtual pc .
Muhammad Usman

+92-321-6640501

Chemonics International

http://usmanpk.com
x2oxen
Major General
 
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Website: http://usmanpk.com
WLM: x2oxen@hotmail.com
Yahoo Messenger: x2oxen
Location: Faisalabad

its working.

Postby hamidabrar » Sat Feb 02, 2008 1:13 pm

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
I want to be a Master not JAck
hamidabrar
Lance Naik
 
Posts: 31
Joined: Thu May 10, 2007 2:29 pm
Website: http://www.acs.com.sa
Yahoo Messenger: taizy35
Location: Saudi Arabia (Dammam)

Postby mudasir » Sat Feb 02, 2008 2:29 pm

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.)
Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com
mudasir
Captain
 
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Website: http://www.crystalnetworks.org
Location: Dubai

Yaseen

Postby ghulam yaseen » Mon Oct 06, 2008 12:27 am

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.
8)
ghulam yaseen
Naik
 
Posts: 68
Joined: Thu Aug 07, 2008 6:09 pm
Location: karachi


Return to “%s” Installation

Who is online

Users browsing this forum: No registered users and 3 guests

cron