LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SATA Drive Issue (https://www.linuxquestions.org/questions/linux-newbie-8/sata-drive-issue-642123/)

John-in-France 05-14-2008 08:29 AM

SATA Drive Issue
 
I'm looking for inspiration. Please bear with me whilst I describe the picture.

For the last few months I've been running a dual boot from a SATA drive with Windows XP on SDA1 and Fedora 9 on SDB2. Grub running on MBR of SDA.

The other day I left my machine booting into XP but when I returned it was displaying a blank (green) screen. So I rebooted and got to the point where the Grub menu should have appeared. All I got was "GRUB" on bottom of the screen and no menu.

I then tried to get into Fedora by booting using a Grub CD and stepped through booting by hand. When I entered the initrd line (correctly - there weren't any typos!), grub complained that it had an "inconsistent file format" and wouldn't boot. I also tried to re-install Grub on the MBR and although it seemed to work without error, on re-boot I just got the same lock up on "GRUB"

So I decided to try for Windows. This required me to restore the MBR - something I've done many times using FIXMBR. Windows then booted but to my blank green screen. Trying safe mode or command prompt didn't help. I booted on the Windows CD to recovery mode and ran CHKDSK. It did find some errors - for instance the Volume label wasn't displayed on the first pass but was on the second. Windows still wouldn't boot.

I then tried to let the Windows CD recover my installation which it found on my C drive. Three quarters of an hour later it finished but Windows was now reported as being on the D drive and of course it had shuffled all the other drives round too! Worse still, nothing would install from the CD or the net - not even IE7.

In the end I decided that I had no choice but to re-install Windows completely and overwrite the existing partition. This worked fairly painlessly although I still have the fun of re-installing a lot of software to come.

That was Windows - what about Fedora? I downloaded and burned a DVD with the freshly released Fedora 9 and installed reformatting my /boot partition and my / partition but leaving /home not formatted so I could keep my data. Again Fedora was told to put Grub on the MBR of SDA. All went well until I hit the key to reboot - Straight into Windows.

I've had a look and in /boot/grub/grub.conf is exactly what I'd expect to find but it looks like grub itself has failed somehow to hook itself into the MBR. Other than trying again to install it by hand any suggestions as to what has gone wrong or how I can fix it?

JOhn

kilgoretrout 05-14-2008 01:40 PM

Things to try:

1. Check your bios setup and see if both your sata drives are being properly detected;

2. Get the hard drive manufacturer's diagnostic utilities from the manufacturer's website; all the majors have them. They are available in the form of a bootable iso that that you burn to a cd-r and run the diagnostics off the cd from boot. Run the thorough version on each or your hard drives and see if any errors are reported;

3. Get a linux livecd like knoppix, sidux, slax, etc. Boot with the livecd and see if it can properly see both hard drives and all partitions on those hard drives. You can check how linux sees your drives by running as root from a terminal: fdisk -l. Note any errors;

4. Download the current version of memtest(I think it might be on the sidux live cd) and run memtest for several hours to thoroughly test your ram.

What you describe sounds like a hardware problem, bad hard drive or corrupted mbr, bad ram or possibly a bad power supply. The above steps will help you diagnose the cause of your problem and limit things down a bit. Yours sounds more hard drive related, possibly some corruption of the mbr/partition table.

If all else fails and the above diagnostic steps don't uncover anything unusual, you can back up your /home from fedora to some external media and zero fill both drives using the manufacturer's diagnostic utilities. This will completely wipe all data from both drives so be sure to backup first. A zero fill will write zeros to every sector of the hard drive and leave the hard drive in the same condition as when it left the factory. Sometimes when mbrs get really messed up, particularly when you use both windows and linux partitioning utilities like you have, a zero fill is the only way to get things working again.

John-in-France 05-14-2008 03:10 PM

Thanks for the thoughts.

1: I've got one (500gb) SATA, three IDE (120GB, 80GB and 17GB) drives and an IDE DVD drive. All are correctly found and identified by the BIOS, Windows and Fedora. It's also the configuration that Fedora had no issues with up until this week.

2: I hadn't thought of that - I'll go have a hunt on Western Digital's site. My current thought puts the blame on the big drive as I've just spent another fruitless ten minutes re-installing GRUB on its MBR to no effect. Again Grub seemed to make all the right noises but...

I confess I don't relish the notion of having to completely wipe the big drive and re-install yet again but we'll have to see what the Western Digital diagnostic comes up with.

John

onebuck 05-14-2008 03:57 PM

Hi,

You could use 'Partition Manager' which is Ranish boot manager & HD partition tool. You can use this to repair your 'IPL' or 'SPL' or just edit the disk data. It will allow you to repair the 'MBR' completely. Just follow the help and menu directives.

This link and others are available from 'Slackware-Links'. More than just SlackwareŽ links!

John-in-France 05-15-2008 03:40 PM

The mystery continues but the problem is solved.

The useful advice received from both of you has taught me quite a lot about managing dual booting and hard drives but unfortunately hasn't allowed me to explain exactly what went wrong.

However it's now fixed.

I used the Western Digital tools to check all of my hard drives (overall that took about four hours!) Absolutely no errors but I did discover that first my SATA drive warranty doesn't expire until this time next year and that the Western Digital tools seem to work fine with Maxtor drives (the little one).

Then I explored the Ranish information and toyed with using Boot.ini to boot until I spotted that for that to work the \boot partition had to be on the same drive as the MBR for Windows.

So I had another try to boot into Fedora by hand using a SuperGrub CD and this time it worked. I also managed to persuade GRUB to install on SDA and everything seems to be back together. I'm prepared to accept "User error" for my previous manual attempt failures but that doesn't really account for why Fedora's automatic install failed on its first attempt.

I'm not totally happy about leaving the issue as "one of life's great unsolved mysteries" but we can't have everything.

Thank you both for your prompt and helpful guidance.

John

onebuck 05-15-2008 06:47 PM

Hi,

Your welcome!

I just don't like too leave things unsolved. It may come back to bite you.


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