[SOLVED] libata / SATA Error Messages During Linux Boot Sequence (exception Emask, interface fatal error, hard resetting link, status DRDY)
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
libata / SATA Error Messages During Linux Boot Sequence (exception Emask, interface fatal error, hard resetting link, status DRDY)
I've been having troubles with my computer for the past few weeks. More than 70% of the time, when I attempt to boot into Linux, the console's boot screen "hangs" after having loaded initramfs and the Linux kernel. This is after about 4 seconds from being past the GRUB boot menu. The computer isn't actually hung, though, as it still shows keyboard output on the screen if I type something. However, the booting doesn't proceed. I figure that it is finally time I relent and seek some advice.
Sometimes I can get the computer to boot using the recovery mode entry from the GRUB boot menu; however, that's not a guarantee as sometimes the computer is frozen when choosing that path too.
I'm running the newest 64-bit Debian stable, FreeDOS, and Windows XP SP3. Things were running well until recently when all of these libATA errors began. The error messages showed up after upgrading from the previous Debian stable to the current stable with systemd. However, I do not believe that this is caused by the upgrade, as these error messages appear even when booting from CD-R or USB, and even when using other distros.
Strangely, Windows XP, FreeDOS, and the disk utility SpinRite don't report any troubles, yet I believe that's due to my belief that whatever these problems are, they are not problems directly with my HDD, but indirectly. Partly this belief is due to the facts that these troubles started while I was still using my 1 TB HDD; I've copied my files to a new 2 TB HDD and get the same problems even while the old drive is disconnected; when my DVD drive is disconnected, the problems are present; when both of the HDD's are disconnected from the controller card, the same problems are reported while I'm running from a live CD or live USB distro; when my USB devices with on-board storage are physically disconnected from the computer, I still get libATA errors and the other symptoms.
I wish I had another desktop PC to try these SATA drives (HDD1, HDD2, DVD drive) to see how they behave with it, yet I only have the one. However I believe that the problmes must originate with either the mainboard or the PCI-e SATA controller card, as at this time, they are the only things which I think could be the cause. I know that my mainboard was giving problems to me with my old SATA HDD due to what is probably a faulty SATA controller on the mainboard. That's when I installed the PCI-e SATA controller. Things have been well with that setup for a long time (1 - 2 years), but could the problem from the mainboard have encroached to the point where it is affecting the PCI-e ports or the SATA controller card?
Before I started using a SATA HDD, I was using a (P)ATA HDD, and I switched to a SATA drive due to the mainboard's ATA controller chip going bad. For a time, I used a PCI-e ATA controller card to replace the on-board ATA controller, but it seems that the two ATA DVD drives which were previously conncted to the mainboard's ATA controller had gone bad. The drives going bad might have been caused by the ATA controller being bad, yet I don't know for certain.
But I've swapped the cables. For this to be the case, both cables would have to be defective.
Quote:
Originally Posted by Keruskerfuerst
2. Drives defective
But that would require both the old drive and my recently purchased new drive to be defective. Plus the problem happens even when all the SATA drives are disconnected.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by Nz17
But I've swapped the cables. For this to be the case, both cables would have to be defective.
...
But that would require both the old drive and my recently purchased new drive to be defective. Plus the problem happens even when all the SATA drives are disconnected.
If the following is from your PCIe add-in SATA card, either that and/or the PCIe motherboard port maybe going bad;
Your motherboard doesn't sound too healthy, generally speaking, to me. And it's either your PCIe add-in SATA card and/or your motherboard that are, in all likelihood, failing you, in a nutshell.
If you can find another PC, you could try adding your PCIe SATA add-in card to that and testing it in that, and see if you have the same problems/messages. If so, it may just be the add-in card at fault, but that said, your integrated SATA/ATA ports don't sound healthy (on your motherboard).
Last edited by jsbjsb001; 10-14-2017 at 12:17 PM.
Reason: additions/re-worded post
A few questions:
1. Are all drives properly detected in your bios setup?
2. Can you consistently boot to windows and does it run without issues? It's not really clear from your post.
3. What is the make and model of your power supply(psu)?
4. Your hardware profile shows only one sata controller, an Asmedia 106x SATA Controller. Is your onboard sata controller disabled in your bios? If so what is it?
5. On those occasions when you can boot into linux, does it run properly without errors or issues?
6. Are you overclocking? If you are, set everything back to standard and see if you still have problems.
7. I assume this is not a home built system. Who is the manufacturer of your computer? Certain ones are known to use cheap components leading to erratic problems over time.
In my experience, erratic problems tend to be caused by either a bad or marginal psu or ram problems. Ram can be easily checked by running memtest overnight and see if it reports any errors. A psu can cause erratic problems if voltages are going out of spec at random times; it tends to show up most on bootup when the psu is under heavy load. Certain lower end computer manufacturers use cheap psus to cut costs; those manufactured by Bestec are notoriously bad. You can usually check your voltages in your bios setup. But even if it checks out, the psu may still be malfunctioning under load. Your sata controller could be having issues but even if that's the case, it's hard to see how that would effect your ability to boot from a usb flash drive. Also, the fact that you already lost your onboard sata controller may be an indication larger motherboard issues; check for bulging capacitors.
Thanks for the suggestions and advice. The mainboard probably needs to be replaced, however I'll try reseating the SATA card just to be sure. I'll post again when I've tried another PCI-e socket with my SATA expansion card and I've seen the results.
In addition to the good advice already offered, I would make a few points:
1. When people ask you questions, it's because they need the answers to help, and it's politeness on your part to address them. For numbered questions, give numbered replies.
2. From what's been said, I can't confirm or deny your diagnosis on the ATA controller, but let's take it as correct. Disk controllers are usually part of some major ASIC, and failure often causes localized heat distortions in the IC leading to further failure of the device. I'd start shopping if an ASIC starts failing. There's so many individual components in modern circuitry that frankly even electronics guys (like me) find it impossible to predict failure modes.
3. Things huff and puff especially at startup, but it's of little consequence unless we're talking about a mission-critical 24/7 server. A faulty asic on board multiplies this big time. In times past, I had a board with the infamous Via MPV3 complete with hardware fault (It was actually misconfigured to cope with crappy Creative soundblasters). It would declare a major crisis over the disk, and the crappy SiS 6326 video chip (Another Disaster area) on boot, but then would work away fine. Those messages don't look good, but I don't see the need to do much, except back up regularly.
4. Back then, there was a generic pci driver, and a driver each for various ropey chipsets. If the generic driver was present, it was used. That had to be absent, so that it would use the correct driver. That usually meant a kernel recompile. I'm not up to date enough to know if a similar situation exists today, but it might. You certainly don't want a kernel driver for your failed ata chip. Disk Drivers (often motherboard chipset drivers) have to be compiled into the kernel, not modules, as modules get caught in a Catch-22 situation: You need the driver to see the module :-/.
Don't compare Windows to Linux too closely. They are fussy about different things so that what you can get away with on one may not work on the other. Can't remember specific instances.
There is a further test you could try with the power supply:
Connect a multimeter to an ATA power connector and watch it closely during boot up. Any fluctuations should lead you to suspect the PSU. If possible use an older, moving coil meter. It will respond faster.
Is the PSU powerful enough for the PC. There are sites where you can calculate the required wattage. ASUS or AMD spring to mind.
Have you tried disconnecting the DVD drive and any other drives, leaving only the boot drive connected?
Also have you tried connecting the boot drive to another SATA port?
These are all "desperate" measures. FWIW I think you are looking at a new motherboard
[Solution] IDENTIFY PACKET DEVICE ASMedia 106x 1062 Debian Linux Kernel
I found the solution! After four months, it is finally solved!
The Problem
The ASMedia 106x SATA controller chipset is buggy. The command "lspci -nn" lists mine as a "03:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01)" though the description of yours might vary.
It appears that this is buggy hardware, and has been so since at least 2013-01-31. The ASMedia 106x series, for some odd reason, doesn't accept ATAPI commands. When the ASMedia 106x series is sent an ATAPI command (such as during boot), the defectively designed hardware causes the kernel, and thus the computer, to stall.
This hardware-based bug affects the ASMedia 1061 and 1062 and occurs with any ATAPI drive. (CD, DVD, Blu-Ray, etc.)
(My guess is that the driver for Microsoft Windows for the ASMedia 106x series has a work-around in the driver so that this kernel-freezing result isn't triggered with Windows.)
The Solution
Linux kernel boot parameter "libata.atapi_passthru16=0"
Implementation (for Debian Linux)
As root, or as a member of a group with read/write permissions, or using a form of "sudo," edit the file "/etc/grub.d/10_linux"
Change line 113 from
Code:
args="$4"
to
Code:
args="$4 libata.atapi_passthru16=0"
Save the file "/etc/grub.d/10_linux"
Run the command
Code:
update-grub
Reboot
If your computer won't boot in the first place, then edit the kernel options at the boot menu before Linux is loaded. For example, with the GRUB2 boot manager/loader, select the line for your Linux, press the "E" key, and use the Emacs-like editor to add the kernel option of "libata.atapi_passthru16=0" alongside other kernel options such as "ro" or "quiet". A boot disk might help with this if your existing installation won't work. Once you can boot, follow the numbered steps above to implement a permanent installation of the kernel option into your boot loader's boot menu.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.