LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-02-2008, 12:42 AM   #1
mahi
LQ Newbie
 
Registered: Sep 2007
Location: mysore
Distribution: Debian
Posts: 16

Rep: Reputation: 0
unable to install grub..


hello people...
I've a problem installing grub..
I've two windows and debian.
each time i reinstall windows grub gets lost and attempts to install grub always fail..
I've tried both from "install grub menu" and grub-install command at command prompt....
this forces me to re-install whole linux again...
can anyone please guide how to install grub for debian.???
 
Old 11-02-2008, 01:02 AM   #2
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
Here is a tutorial for reinstalling grub in Debian:
http://wiki.debian.org/GrubRecover?highlight=%28grub%29

Here is another:
http://www.cyberciti.biz/tips/restor...ot-loader.html
To mount your Debian partition, you can just mount it as explained in this tutorial, instead of the way it says in the Nix-Craft article:
http://www.linuxquestions.org/questi...rge-cd-265867/

You can also try the Super Grub Disk to recover grub. It works well:
http://www.supergrubdisk.org/

And for everything you would ever want to know about grub:
http://users.bigpond.net.au/hermanzone/p15.htm

Last edited by tommcd; 11-02-2008 at 01:26 AM.
 
Old 11-02-2008, 06:56 AM   #3
hulk321
Member
 
Registered: Jul 2007
Posts: 137

Rep: Reputation: 15
Quote:
Originally Posted by tommcd View Post
Here is a tutorial for reinstalling grub in Debian:
http://wiki.debian.org/GrubRecover?highlight=%28grub%29
I was using F9 and have installed vista and have lost the grub. would this link work for F9 too? if not please recommend me step by step method.

Last edited by hulk321; 11-02-2008 at 07:01 AM.
 
Old 11-02-2008, 07:11 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
Installing GRUB is pretty much the same for any Linux distro. The main thing to remember is that the boot code in the MBR (GRUB Stage1) gets "hard-coded" to point to the partition containing the GRUB files (in /boot/grub). You can install GRUB from any Linux, including from a live CD, but you have to be sure that the "/boot/grub" partition is correctly identified.

I have alwasy followed the recommendation in the GRUB manual and installed from the GRUB shell (not grub-install).
First, run fdisk -l to be sure how the drives and partitions are seen from the Linux you are running to install GRUB. In the example below, the desired /boot/grub partition is the 2nd partition on the first drive (eg sda2), and the MBR boot code will go into the first drive (eg sda).
Also note that GRUB counts from 0 (drive 1 is hd0)

To install GRUB:
Code:
grub    #starts the GRUB shell
root (hd0,1)   #sets up the pointer to /boot/grub
setup (hd0)   #installs GRUB to the MBR of drive 1
finally, edit the config file (/boot/grub/menu.lst) as required.

The "booting" link in my sig below may help also.
 
Old 11-02-2008, 09:09 PM   #5
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
Here is another tutorial for installing grub to the MBR using the Ubuntu live CD. This tutorial explains the process a bit more. As Pixellany said, you should be able to do this from any live CD:
http://ubuntuforums.org/showthread.p...highlight=fsck
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Unable to install GRUB stage_1 to MBR andyuser Linux - Newbie 5 12-17-2007 09:27 PM
unable to install grub when installing Mint 3.0 holyct Ubuntu 1 08-29-2007 05:30 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Unable to Boot Linux after Grub install jspsandhu Linux - Software 5 06-11-2006 08:03 AM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:38 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration