LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-19-2007, 11:53 PM   #1
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Rep: Reputation: 31
grub error 5


The GRUB error stemmed from an attempt to wipe the MBR on /dev/sda1), which I had assumed was the device assigned to my usb stick. The filesystem under fdisk showed up as W95 so I thought there was no way it contained the MBR. After staring at the dreadful 'error 5' for awhile, I decided to try to use a hard drive tool included with UBCD to try to restore the MBR somehow. That didn't help and probably only served to make things worse. Now there is no GRUB and it just says 'unable to boot OS' or something to that effect. I tried using a GRUB bootdisk but the only available root partitions are hdx and fd0 whereas my root drive was sdx. This is probably due to the fact I setup the bootdisk on a different machine a few years back.

I tried 'fdisk -lu' on a live cd but and it shows information about my primary and secondary sata drives but the partitions on the hard drive containing the MBR are greatly reduced for some reason and all but /dev/sda1 and sda2 are mounted. Also, fdisk doesn't even cleanly exit without Ctrl+C.


Am I at a complete loss or is there still hope?


Thanks
 
Old 07-20-2007, 09:46 AM   #2
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
Can anyone offer me any assistance?

This might be a stupid question, but would it work if I were to replace my MBR with one from a different machine?


Also, I've tried UBCD hard drive tools and many live cds--none of them are able to detect my primary drive. At the very least, I would like to backup my important data. The only partition I wiped was the one containing the MBR, so it certainly seems like I'd still be able to mount the drive.

Last edited by verbose; 07-20-2007 at 12:31 PM.
 
Old 07-20-2007, 10:28 PM   #3
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
Update: I was switching in and out hard drives and--all of a sudden--my primary drive showed up in the BIOS. I have no idea how I did it or what I did to fix the problem, but I was pleasantly surprised to say the least.

Now, when I run fdisk, I see an LBA extended and Linux filesystem--/dev/sda1 & 2; respectively. Even more encouraging... when I run testdisk, it's able pick up all partitions with correct sizes, etc. Now it's just a matter of figuring out how to mount the darn things so I can use 'grub-install' to reinstall GRUB and hopefully get my MBR back to normal.

I tried writing new MBR testdisk code to zero sector, but that did nothing.


Any help in regards to where I go from here is much appreciated.
Thanks
 
Old 07-22-2007, 07:19 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
GRUB errors are easily looked up here:
http://www.gnu.org/software/grub/manual/grub.html
in particular here:
http://www.gnu.org/software/grub/man...roubleshooting
 
  


Reply

Tags
grub


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
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Error Grub stage2 loading error (using FC6) on seperate hdd Anifield Linux - Newbie 7 03-20-2007 01:14 PM
GRUB Error 26: Disk Read Error (using grub4dos and ubuntu) Dark_Master Linux - Software 11 02-25-2007 07:42 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM


All times are GMT -5. The time now is 12:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration