All of a sudden I started getting the DRDY ERR with my laptop running linux..some messages look like..

    ata1:00: status: { DRDY ERR }
    ata1.00: error {UNC }
    ata1:00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
    ata1:00: BMDMA stat 0x25
    ata1:00: failed command: READ DMA

finally it drops me into a command prompt asking me to enter a run level and after that

    INIT: no more processes left in this runlevel

Suspecting a HDD crash, I took it out and used in another PC as an external USB HDD drive and I was able to mount & see all partitions and files within. So I assume Disc is OK.

[EDIT/UPDATE]

I'm also able to boot into the laptop from a USB pen drive with linux) and even able to see all the partitions on the disk and access them.

Also took out the HDD and put it in a external casing and tried booting into the same laptop but got following different errors

    end_request: critical target error, dev sda, sector 32839936
    EXT4_fs error: (device sda5): ext4_find_entry:935: inode #393217: comm init: reading directory lblock 0

    INIT: No inittab file found
    Enter runlevel:

So I guess, the HDD is accesible as a storage, but not bootable. The partitioning scheme on that HDD is as under if that'd help.. (GPT scheme)

    partition   FileSystem  size    flags
    ---------   ----------- ----    -----
    /dev/sda1   unknown     2.00MB  bios_grub
    /dev/sda2   ext2        128MB           # was supposed to be common boot partition for chain loading
    /dev/sda3   swap        1.5GB
    /dev/sda4   ext4        8GB         # Linux 1 (somehow, Grub does not show this in the menu, cannot boot into)
    /dev/sda5   ext4        8GB         # Linux 2 (I could only boot into this one from Grub.)
    /dev/sda6   ext4        94GB        # DATA
    unallocated _           1MB

I have installed linuxes one after another and actually wanted to install Grub in /dev/sda2 and chainload Linux 1 & 2, but before I could do it, I hit this snag!

Any ideas? Solutions?

[UPDATE 2]

  • Title of the problem is no longer applicable *

I booted from USB and did a 'fsck' on all partitions. All (except /sda5) were reported clean. /dev/sda5 reported many errors (probably around a couple of hundred), I only kept entering 'y' for all the prompts. Inbetween there were messages like 'linking 'lost+found' ....' After a runnning 2 passes on all partitions, when I re-booted from the HDD, here is the latest error...

    INIT: verision 2.88 booting
    INIT: No inittab file file found

    Enter runlevel:

Does it look like I'd be able to get back the OS instance and boot?

share|improve this question
    
Does the pen drive boot on another system? – Michael Kjörling Aug 13 '14 at 12:53
    
Hmmm...It did not! I tried on another laptop, that could not find MBR. I formatted it and made it bootable via another program ("Universal USB Installer" this time) which warned me during the process that an error occured and drive may not be bootable. So looks like the drive has developed someproblem (though data is accesible) and I need to find another pen drive and come back here with errors if any. – yogmk Aug 15 '14 at 6:09
1  
Note that the failed command: READ DMA points toward the HDD having problems. It could be something else as well, but I would definitely not assume that the HDD is OK. My recommendation would be to refresh your backup (ideally to some media other than your most recent back) before something happens to the drive and it outright refuses to work. – Michael Kjörling Aug 15 '14 at 8:08
    
Also, please see if you can focus this question. Right now it's about two problems (the HDD failing READ DMA, and the thumbdrive failing to boot). It's better if you split this into two separate questions that can be answered individually, as the problems are extremely unlikely to have the same cause. – Michael Kjörling Aug 15 '14 at 8:10
    
It turns out that the USB pen was not faulty after all. I was using unetbootin from my office provided laptop. Probably the disk encryption program and/or windows permissions (I never really understood them!) prevented copying some files. Unetbootin did not tell me that. 'Universal USB Installer'' however showed some errors and also told me that the USB may not be bootable! So created the USB again (this time from a barebones windows VM on the same laptop and using UUI) and it worked. Updated the post, now with other symptoms of what happened next! – yogmk Aug 16 '14 at 12:59
up vote 3 down vote accepted

The first error you reported:

ata1:00: status: { DRDY ERR }
ata1.00: error {UNC }
ata1:00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1:00: BMDMA stat 0x25
ata1:00: failed command: READ DMA

says that a READ DMA ATA command to a disk on ATA port 1 failed (status includes ERR for error). That port is most likely the hard disk, and the error points toward the drive having problems. The DMA part can likely be ignored; DMA is Direct Memory Access which is the dominant transfer mode these days, and if you were having RAM or RAM bus problems to the degree that you were hitting something like that repeatedly, you'd likely be seeing a ton more errors if the system was able to function at all.

The second error:

end_request: critical target error, dev sda, sector 32839936
EXT4_fs error: (device sda5): ext4_find_entry:935: inode #393217: comm init: reading directory lblock 0
INIT: No inittab file found

says there is some problem on /dev/sda, sector 32839936, which with 512-byte sectors puts us physically toward the end of the /dev/sda5 partition, which adds up with device sda5 as reported by the file system driver. The error reported by init together with the file system driver's error details points toward a problem with the file system causing /etc/inittab to be unavailable or (less likely) unreadable. This would mean that either the root directory, the /etc directory, or the /etc/inittab file entry are somehow involved in the corruption. Given the inode number, I'd take a shot at /etc/inittab specifically being the culprit, until proven wrong.

You write (my emphasis):

Suspecting a HDD crash, I took it out and used in another PC as an external USB HDD drive and I was able to mount & see all partitions and files within. So I assume Disc is OK.

I would say that your assumption is unfounded. The disk is obviously having some problem; with any luck, it'll be easy to fix.

The first thing I would do in your situation is to refresh my backup of everything that is on that disk. Make sure that you do not overwrite or delete anything from your most recent backup, as there is certainly a possibility that you will need it. Perhaps the best option is to make a fresh backup onto a new (or at least not previously used for your own backups) drive of everything that you are able to access. Expect some I/O errors on the source while making that copy.

Second comes attempting recovery. With any luck, given the errors, this is a single-sector or few-sectors problem which has caused a small amount of file system corruption, in which case e2fsck should be able to repair most of the damage. Some of your files are likely gone, but with some luck, you might be able to find them in /lost+found under the file system's mount root (meaning for example /data/lost+found if you mount /dev/sda5 on /data) after having e2fsck do what it can. Otherwise, do a comparison against your most recent backup from before the problems started, and restore relevant files from the backup. (Did I mention backups are useful if bad things ever happen, as they inevitably do?)

Third comes the question of whether you can trust the drive for future use. A few bad sectors doesn't have to be catastrophic from the drive's point of view, but rotational drives about 100 GB in size practically cannot be sourced new today in most form factors, which points to this being a relatively old drive. Personally, I'd probably just accept that the drive has outlived its useful life at this point and get a replacement, but then again I am rather paranoid when it comes to my data; your mileage may vary. You will have to weigh the cost of a replacement drive against the risk of total failure of the drive and subsequent total loss of all the data on the drive.

share|improve this answer
    
[I did this before I saw your reply, but did not get a chance to update the question] – yogmk Aug 18 '14 at 16:58
    
..cont'd Please see [UPDATE 2] to the question above. Thanks for your detailed response. Anyway the laptop is old and it is now my 'educational toy', but it is handy and I'd like to keep it running as much as I can. It hsa a 1.8-inch 111GB HDD. I might replace it if it comes to that. And I have important things on it backed up. (/DATA partition has all data (photos, music) which even now is clean/accessible). – yogmk Aug 18 '14 at 17:15
    
@yogmk I don't see how your edit invalidates my answer? Running e2fsck was the first part of my "second" point, attempting recovery. Now that the file system is likely OK, you need to get back the files that are missing because the metadata for them was corrupted or unreadable. – Michael Kjörling Aug 18 '14 at 19:14
    
I'm not countering your answer, I'm accepting it. Now in my case the entire /etc directory is empty post fsck and there are around 300 file fragments dumped in /lost+found :( . I've decided to reload the OS as manually getting everything back is not worth the effort. Thanks. – yogmk Aug 23 '14 at 5:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.