Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


  Search this Thread
Old 07-20-2007, 12:53 AM   #1
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?

Old 07-20-2007, 10:46 AM   #2
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 01:31 PM.
Old 07-20-2007, 11:28 PM   #3
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.
Old 07-22-2007, 08:19 PM   #4
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
GRUB errors are easily looked up here:
in particular here:



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

All times are GMT -5. The time now is 08:04 AM.

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