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 12-19-2005, 12:07 PM   #1
q.sa
LQ Newbie
 
Registered: Jun 2005
Posts: 11

Rep: Reputation: 0
Re-installing Grub


Hi,
Today i accidently deleted my both linux ext3 and SWP partitons (after running bad sectors recovery from HDD, luckily for me i was able to log to shell and restore both or my linux partitons and fat32 i had on same HDD, however, the MBR is lost.... i cannot boot to linux anymore - i can boot from DSL-KNOPPIX and mount the linux main partition and fat32 - all works great so far (read/write on my "lost part.")... i tried to mounting the partition from KNOPPIX and the using " chroot /mnt/hd" command chroot'ing to run "grub-install /dev/hda1" - unfortunately for me chroot returns "input/output error" and i cant run grub-install from cd .. So, i made floppy grub ("grub-floppy") booted from it to Grub runned "setup (hd0)" and got "cannot mount the target partition" sux... btw- "root (hd0,0)" command returns me unknown partition format 0x83 if i remember correctly -- its linux ext3....

oh.. and i already tried using RH9/fedora "linux rescue" boot but it cannot find linux installations... can mount the partition from there but same chroot problem as in Knoppix...

Reinstalling FC3 will solve the problem (i think) but i really dont want to loose my data and i dont want to backing it up from DSL mount reinstallign and restoring-- i ust want to rewrite MBR --- GRUB)

So if anyone have ideas how can i reinstall grub on my system... well write it

Last edited by q.sa; 12-19-2005 at 12:12 PM.
 
Old 12-20-2005, 10:50 AM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Using the grub boot floppy, what do these “find” commands return:

grub> find /grub/stage1
grub> find /boot/grub/stage1

You may have inadvertently changed the partition numbering when you recovered them.
 
Old 12-20-2005, 11:50 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The DSL uses Grub 0.91 but should be alright for re-installing Grub.

Grub always reports the partition ID type 83. The ext3 is reported by Linux only.

If your Fedora partition partition is in hda1 as claimed then in Grub prompt these two lines should your trouble

root (hd0,0)
setup (hd0)

You need to tell Grub where it can find the stage1 and stage2 files and that is usually in the root of the Linux or its /boot directory. Without this information Grub can't set it up for you.
 
  


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
Installing my own GRUB - HELP PLEASE!!! stevesk Linux - Software 2 12-17-2004 11:20 AM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM
installing grub amatin Linux - Software 5 12-04-2003 11:45 AM
Installing Grub Drogo Linux - Software 2 09-09-2003 12:21 AM
installing GRUB Interceptor Linux - Newbie 4 07-31-2003 11:20 AM

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

All times are GMT -5. The time now is 10:18 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