LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-20-2005, 06:30 AM   #1
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Rep: Reputation: 15
Grub loader corrupted


Hai All,
I have dual os system one is win2000 and Linux3ES.O n this system Windows is corrupted so i installed windows again.After installation of windows linux is not booting
and startup message also not showing.................
Next i want to restore the Grub i Follow these Steps:
Linux Rescue
it will ask u mount all partitions (Say yes)
chroot /mnt/sysimage
grub-install /dev/hda
exit

This procedure i followed but still it's not booting........
pls tell me what type of mistakes i done............
 
Old 09-20-2005, 08:43 AM   #2
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Does the Grub bootloader appear now?
Can you boot Windows but not Linux?
 
Old 09-20-2005, 04:43 PM   #3
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Probably better suited in Software.

Cheers,

Finegan
 
Old 09-20-2005, 05:07 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
What happened when you installed windows is that windows wrote the windows bootloader to the MBR (Master Boot Record) of the hard disk, where you had grub's first stage. Now you need to re-write grub first state to the MBR.

Question: How do you have your Linux partitioned? Do you have /boot in a seperate partition? If so, try: # grub-install --root-directory=/boot /dev/hda

If not, you could try the older (pre grub-install) set of commands:

1) grub> find /boot/grub/stage1

This will search for the file name `/boot/grub/stage1' and show the
devices which contain the file.

2) grub> root (hd0,0)

NOTE: This is the partition where stage2, menu.lst, and vmlinuz are installed (the location returned by the find command given above).
Stage1 will be installed either in the MBR, or in the boot sector of the OS
partition (see setup instructions 3 paragraphs down).

3) grub> setup (hd0)

This command will install GRUB on the MBR in the first drive. If you
want to install GRUB into the "boot sector" of a partition instead of
the MBR, specify a partition into which you want to install GRUB:

grub> setup (hd0,0)

If you install GRUB into a partition or a drive other than the first
one, you must chain-load GRUB from another boot loader. Refer to the
manual for the boot loader to know how to chain-load GRUB.

4) Grub should now prompt you for the next entriy. Something like:
Run "embed /boot/grub/e2fs_stage1_5 (hd0)"
16 sectors are embedded.
Run "install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2"

grub>
This will have successfully loaded grub, although it does have a problem. It will not have installed GRUB to use your menu.lst file. The solution to this is simple. Since GRUB has now provided you with all the necessary options for the stage1, 1.5 and 2 installation, simply duplicate the following portion of the last line:
install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
and add (hd0,0)/boot/grub/menu.lst to the end so that the line would read:

install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 (hd0,0)/boot/grub/menu.lst

This will install GRUB so that it uses the /boot/grub/menu.lst file for your boot options. Note that the install lines shown above are all on one line, although they may wrap due to length as they did in the formatting of this document.
Once this is completed, type quit to exit the GRUB menu, and restart your system.


Sources: Grub Manual and Zen and the Art of Using Grub.

Last edited by bigrigdriver; 09-20-2005 at 05:11 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB loader glenn69 Linux - Newbie 10 08-31-2003 12:32 PM
Windows XP corrupted after RH-Linux9 Grub install sajkumar Linux - Software 4 08-29-2003 01:30 PM
grub loader derekandjac Linux - Newbie 2 02-26-2003 03:06 PM
GRUB loader tszhim Linux - General 4 02-09-2003 01:00 PM
Help! Grub Loader! djsktbrd Linux - Newbie 5 12-27-2002 01:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration