LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-21-2004, 01:26 PM   #1
Malacandra
Member
 
Registered: Jul 2004
Posts: 44

Rep: Reputation: 15
Can't re-install Grub


OK, here's the thing: Somehow or other I killed my MBR. I was able to recover Windows XP with no problem, but now my GRUB has been ruined and I can't load Linux.

I've searched and seen this problem posted a hundred times, but never with my particular circumstances.

Here's what I'm running:

Windows XP and Suse 9.1 dual-boot. (well, single now that the GRUB is gone).

Here's what I've tried.

(1) Runing with the Suse install CD, in rescue mode:
grub-install /dev/hda

That doesn't work: it says, can't find ?usr/lib/stage 1. Well, I found those files. I can even modify the path in the grub-install shell to point to those files. But then it says /dev/root is a block drive and can't do anything with it.

I've also tried this:
http://portal.suse.com/sdb/en/2004/0...nstall_91.html

That's the official fix, I guess but it doesn't work.


(2) I've tried running Suse Linux Live CD. When I open the home folder and chec the devices, I can see one device: Hard Disc. No mention of CDRoms or the varioous hard drives/parrtitions that exist.

When I use YAST to look at the partitions, they're all properly listed. But I can't seem to mount or access them.

I can also try going in to the Boot Loader configuration but it doesn't work since it won't find /dev/hda and it won't create a floppy for me either.

(3) Rescue System from Suse 9.1 Install CD

Here you can select (from the DOS looking prompts) to run the Installation/system

There are three options:
- Install
- Boot installed system
- Boot from flopp

When I select the second option (since I already have an installed system) it asks for the root partition, BUT it only lists /dev/hda2 (the Windows partition). Then it can't boot from that obviously; there's no way to select the proper partition.

(4) I've booted using Knoppix, but can't seem to access the Linux partitions (can see and read the Windows partitions and Windoes rescue partition).

SUMMARY:

- I can't boot Linux
- Linux in rescue mode doesn't seem to know where the linux partitions are
- Linux Live doesn't seem to know where Linux partitions are
- I can't in any way access those linux partitions (there's some data I'd like to save).


Someone please tell me I can do something other than an entire reinstall of linux. (which would erase my home folders, yes?)

I really don't want to reinstall linux if I can somehow get it booted. I'd even settle for Grub on the Linux parition if someone can show me how to put it there and configure the Windows Boot.ini to select that as an option.

Sorry for the long post and thanks from a frustrated guy missing his linux.

Mark
 
Old 08-21-2004, 02:03 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You need to run grub-install from within your installed filesystem. When you boot with the rescue cd what do you get from running:
fdisk -l
df -h
 
Old 08-21-2004, 02:03 PM   #3
pc-overkill
Member
 
Registered: Jun 2002
Location: Denmark
Distribution: opensuse 10.3/xandros 4.1
Posts: 63

Rep: Reputation: 15
You can boot the installed system instead, boot on cd 1 choose "installation"
when the installation starts, press "abort" in the bottom of the screen
at the new menu choose "start installation/system"
then choose "boot installed system"
When you're in your system reinstall grub from yast.
I'm sure there's an F-key to do this but i can't remember which one.
 
Old 08-21-2004, 02:45 PM   #4
Malacandra
Member
 
Registered: Jul 2004
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by pc-overkill
You can boot the installed system instead, boot on cd 1 choose "installation"
when the installation starts, press "abort" in the bottom of the screen
at the new menu choose "start installation/system"
then choose "boot installed system"
When you're in your system reinstall grub from yast.
I'm sure there's an F-key to do this but i can't remember which one.
Thank you but nope. Sorry. That didn't do it. When I selected to boot the system, same thing: it only gives a choice as hda2, which is the NTFS Windows partition.

But read on to my next post...perhaps that will shed some light...I hope it will cause it doesn't for me.
 
Old 08-21-2004, 02:53 PM   #5
Malacandra
Member
 
Registered: Jul 2004
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
You need to run grub-install from within your installed filesystem. When you boot with the rescue cd what do you get from running:
fdisk -l
df -h
OK...I hope this turns out so you can read it...( couldn't cut and paste it).

fdisk -l

Quote:

/dev/hda

Device Boot Start End Blocks Id System
/dev/hda1 1 886 6698128+ b W95 FAT32
/dev/hda2 * 887 14297 101387160 7 HPHS/NTFS
/dev/hda3 14298 15503 91117360 f W95 Ext'd (LBA)
/dev/hda5 14298 14433 1028128+ 82 Linux Swap

/dev/sda

(same headings as above)
/dev/sda1 * 1 489 31280 FAT16 <32M

df - h yields the following....

Quote:
Size Used Avail Use Mounted on
/dev/root 45M 40M 5.4M 89% /
tmpfs 253M 0 253M 0% /dev/shm

When I run grub-install to /dev/hda or even to /dev/sda/ I get the folllowing:

/dev/root: Not found or not a block device

I assume that the asterisks in the above data are showing which partition is the boot partition, but I'm trying to get grub to change it. I don't dare install Grub on hda2, do I? Will that screw things up? I dont' think Linux could write to that drive anyway, could it?

Still hoping there's a solution out there short of reinstalling!

Thanks for the help so far.

Mark
 
Old 08-21-2004, 03:02 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
To be honest it doesn't look like you have any partitions containing a linux installation.

You only have a fat partition, an ntfs partition and a swap partition.
 
Old 08-21-2004, 03:57 PM   #7
Malacandra
Member
 
Registered: Jul 2004
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
To be honest it doesn't look like you have any partitions containing a linux installation.

You only have a fat partition, an ntfs partition and a swap partition.
Well, I'd like to know what happend to them!

If hda3 isn't the linux partition, what is it? And if not, what could have happened to it?

hda3 is the Linux partition and hda5 is the Linux Swap partition.

If I open the Partition manager in Yast (using the Suse live CD) it lists them, though come to think of it, I can't ACCESS them.

The only thing I can think of that I did was to use Windows to format a very small disk space that was marked "Unallocated." (Yes, I was messing around with the windows disk manager). But it wasn't the linux drives. When things glitched, I wondered if that "unallocated" was actually the space where the MBR was located.But it was not formatted, so that couldn't be it, huh?

I dunno.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
fc3 install doesnt install grub properly onto sata drive sabo Linux - Newbie 4 02-03-2007 04:04 PM
[GRUB]how to install grub onto another partition Liquid_T<NL> Linux - Newbie 1 09-05-2005 09:46 AM
Accidental Install of Windows Second....Install GRUB? Brnzwngs Linux - Newbie 6 08-12-2005 01:10 PM
GRUB..where should be install..?????? avols143 Linux - General 1 10-24-2004 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:57 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
Open Source Consulting | Domain Registration