• 3 min read
  • So... Here's what I have been doing during the past 5 hours:

    I was noticing some odd behavior from my PC, which runs Fedora Linux as its primary OS but it also has Windows Vista installed for gaming. The machine would boot without any indication of trouble, but once it had been up & running for about 5 minutes, the system would hang and the hard disk activity light on the case would stay permanently on. A soft reboot wouldn't fix the problem either - a complete shutdown was required. At first I thought it was an OS problem, so I rebooted into Vista but found it was affected too. I immediately thought, "hardware". I tried leaving the computer alone for an hour to see if it it would eventually come out of the freeze, but it clearly wasn't doing anything with the disk because the system remained frozen and I could not hear the disk heads moving (and on a 10K RPM drive, those are pretty loud). I ran memtest86+ and did a 3 minute S.M.A.R.T self-test on /dev/sda in Fedora, but oddly enough both came up clean.

    Since my hardware seemed OK, I powered down the PC, opened the case and made sure there were no loose cables. Sure enough, the problem was the SATA cable which connected my motherboard to my hard disk. After disconnecting it, blowing off some excess dust and reconnecting it, everything was fine. But that's not where the story ends.

    By the time I had reproduced the problem, tested the RAM & hard disk and reconnected the SATA cable, I had done about 15 power cycles. Linux handled the whole situation pretty gracefully - it logged the specific SATA errors (Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK) and put the root filesystem into read-only mode. After reconnecting the cable, Fedora was up and running as if nothing had happened (it did do an automatic fsck upon booting, but the check came up clean). Vista, on the other hand, didn't take it so well - it informed me that I need to run CHKDISK upon starting up, so I let it repair C:\ and it orphans thousands and thousands of files... After CHKDISK completed I was (surprisingly) able to boot up, but many programs - including explorer.exe - were crashing. Judging by the amount of orphaned files, I'm guessing that quite a few system files were missing or corrupted.

    So, long story short, if you have any SATA problems and Vista starts orphaning a tons of files during CHKDISK, save yourself some time by canceling the CHKDISK and make sure you have your Vista installation DVD handy.