I got a strange looking warning message in Windows Vista about a potential hard disk failure. I say strange because I have never in my life seen that type of warning in Windows. It suggested that I backup everything on this disk as soon as possible.

The hard disk in question is the one I use for Ubuntu Linux. I know Windows can't read Linux file systems, not natively anyway, so it's probably some SMART reading that caused Windows to warn me about this disk drive.

Ever since this happened I can't boot into Ubuntu Linux. I see several error lines passing by, something that indeed seems to be related to a disk failure. At the end it only presents the command prompt, the desktop doesn't load.

Is there a way I can recover from this error? How do I grab the error logs from command prompt? I would like to post it here.

Here's are a few screen shots:

screen1 screen2 screen3

  • possible duplicate: unix.stackexchange.com/questions/61020/…
    – slm
    Commented Jul 9, 2013 at 20:18
  • Log in using your regular user credentials, then sudo less /var/log/messages and sudo dmesg | less. (q to exit from less.) Use < to jump to the top, > to jump to the bottom, up/down arrow keys to scroll. Use paper and pencil to copy what looks relevant. (There might be an easier way, but since we don't know what state your system is in, it's best to try to play it safe. less is pretty safe.) Note that if you normally use a non-US keyboard layout, some keys may not produce the characters you expect; in that case, try it out (and use Ctrl+C to cancel any command line) first.
    – user
    Commented Jul 9, 2013 at 20:27
  • That's great that you were able to get some screenshots. (Is it really as garbled as in the first screenshot, or is it simply scrolling by faster than your camera took the picture?)
    – user
    Commented Jul 9, 2013 at 20:35
  • I've seen some of those errors before! Your disk or cable is dying. Try changing the cable first (cheap!)
    – Tim
    Commented Jul 9, 2013 at 20:44

2 Answers 2


Get a boot disk like SystemRescueCD or similar and run the S.M.A.R.T. tools. This will help you get to the bottom of a SMART error if that is what it really is.

smartctl --all /dev/{hd?,sd?}
  • +1 for checking SMART. It might be possible to do through the running system too. That said, given that fsck reports short reads and the kernel complains about I/O problems both in roughly the same area (around block 164,000) I would definitely suspect a physical disk problem (which might be reported by SMART). Logical errors generally don't cause short reads and I/O errors. Since Windows apparently is able to work fine, I doubt it's the data cable.
    – user
    Commented Jul 9, 2013 at 20:42
  • I'm pretty sure SMART is indicating failure, that's what the mysterious message from Vista is.
    – derobert
    Commented Jul 9, 2013 at 21:51
  • By "tools" do you mean the smartctl command? I burned systemrescuecd-x86-3.7.0.iso to a CD and then booted with option 2 (all files cached to memory). I get to root@sysresccd /root %. Here, I type smartctl --all /dev/{hd?,sd?} and hit Enter. zsh: no matches found: /dev/hd? So where do I go from here? Have I done something wrong?
    – Samir
    Commented Jul 10, 2013 at 8:23
  • @Sammy - he means you need to type smartctl --all /dev/sda for example if the drive that's failing is /dev/sda. The way @Tim wrote it it's a fancy regular expression telling you all the ways that you could specify the device name (/dev/hda or /dev/sda) for examples. The ?'s are placeholders, and the {hd?,sd?} is a list.
    – slm
    Commented Jul 10, 2013 at 8:39
  • Oh... I thought it meant "for any" hdd. So I have to specify it then? How do I know if it's /dev/sda then? How do I identify the disk drive from a command line? I mean I know what to look for, I know the label, the size of it, and the serial number. But what commands do I use to find if it's sda?
    – Samir
    Commented Jul 10, 2013 at 8:46

I would attempt to repair the disk with either HDAT (freeware) or possibly Spinrite (Commercial). I've used both of these tools to recover disks that were failing and they have both worked well in the past.

Once the drive is in a usable state I'd use Clonezilla to replicate it as quickly as you can to an alternate HDD.

  • Absolutely get the data off the drive as soon as you possibly can once you get the drive back to seemingly working condition. At the point the OP's drive sounds to be like, it tends to be living on borrowed time.
    – user
    Commented Jul 9, 2013 at 20:24
  • I burned hdat2_v493.iso to a DVD and booted. When I get to the command prompt I can't type in "hdat2" or anything else. I picked the option to load all the drivers at the first prompt (blue background). I have a wireless Logitech keyboard. Is there a way around this? I mean without getting a wired keyboard?... I'm not sure I even have one.
    – Samir
    Commented Jul 10, 2013 at 7:38
  • @Sammy - ha, it's always something isn't it? I found this thread, hdat2.getphpbb.com/hdat2-problems-f1/…, you might need to enable legacy USB device support in your computer's BIOS to get the keyboard working here. Remember to disable it when you're done.
    – slm
    Commented Jul 10, 2013 at 7:44
  • Yes, it's always something. In BIOS, I have USB Controller, USB 2.0 Controller, USB Keyboard Support, USB Mouse Support, Legacy USB storage detect, and they are all Enabled. So where do I go from here? Buy a wired keyboard? Ha!
    – Samir
    Commented Jul 10, 2013 at 8:41
  • @Sammy - yeah I think that might be your only other option. I didn't see anything else except trying to unplug and re-plug in the keyboard after hdat2 has started.
    – slm
    Commented Jul 10, 2013 at 8:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .