Paul Philippov

How to fix slow boot with ATA errors

If you happen to own a weird TSSTcorp CDDVDW SH-S223C DVDRW device then your Linux probably takes a long time to boot, and if you boot without a splash screen you see a couple of errors like if your drive is faulty (which is not true since it’s a disc drive, not a hard drive):

ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata4.00: failed command: IDENTIFY PACKET DEVICE
ata4.00: cmd a1/00:01:00:00:00/00:00:00:00:00/00 tag 0 pio 512 in
ata4.00: status: { DRDY }
ata4: hard resetting link
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata4.00: configured for PIO4

On the Internet I read a suggestion to mess with udev rules in order to fix the issue. I found that you need to comment-out the following rule:

# ATA/ATAPI devices (SPC-3 or later) using the "scsi" subsystem
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $tempnode"

Here’s the code to make it quick and painless:

$ sudo sed -i '/ATAPI/,+1s/^/#/' /lib/udev/rules.d/60-persistent-storage.rules
$ sudo update-initramfs -u
$ sudo reboot now

Published on July 29, 2011 (almost 9 years ago)

Article tags: libata, linux, udev

Comments (20)

Ed to How to fix slow boot with ATA errors

Can't thank you enough, I have spent almost a year putting up with this problem, for me it was stopping me booting 4 times out of 5. A couple of hours of google search I found this, Bingo all my dodgy booting gone!

Brilliant!

Thanks

almost 9 years ago

Thanks! to How to fix slow boot with ATA errors

It worked for me too - never had a problem with the DVD drive but after changing it to HDD in a caddy this error was killing me. Now it works like a charm :)

about 8 years ago

Menno to How to fix slow boot with ATA errors

It worked for me too. Thanks.

almost 8 years ago

Rob to How to fix slow boot with ATA errors

Cheers mate, you saved me a ton of messing around!

almost 8 years ago

Evgeniy to How to fix slow boot with ATA errors

Thank you a lot.
You've saved my weekend!
Got new motherboard for my Gentoo desktop, thought it is a kernel driver problem. Apparently it is, but still fixable, thanks to you.

over 7 years ago

Grunt to How to fix slow boot with ATA errors

Changing SATA port on motherboard can fix that, also. You just have to plug your DVD reader to another port.

over 6 years ago

Randy to How to fix slow boot with ATA errors

Awesome, Changed a 60 second boot time to about 5 seconds. Much appreciated

over 6 years ago

Ype to How to fix slow boot with ATA errors

This works here too, thanks.

The rule appears to be extended over three lines, so I commented the three lines after ATAPI.

over 6 years ago

Fidel to How to fix slow boot with ATA errors

Great! Thank you for your solution.

about 6 years ago

Jesse to How to fix slow boot with ATA errors

You are a scholar and a gentleman! This problem still plagues Ubuntu up to and including version 14.04

I suppose it's probably my fault for buying the cheap DVDR at Microcenter, but you have made my Linux dual-boot system a lot less dependent on the dark side. Thank you.

almost 6 years ago

James to How to fix slow boot with ATA errors

Thanks so much was about to give up on my Linux box but this really made a huge difference! I've added this script as an upstart script to execute on boot - that way the changes to UDev are manually rewritten by this clever patch. :)

almost 6 years ago

Markus to How to fix slow boot with ATA errors

I too have a TSSTcorp optical drive and the same symptoms. For me the reason actually was not in the drive. MSI motherboard I have has additional (crappy) sata-controller by Marvell which I use for the optical drive since all "real" ports are in use.

Modifying udev rules did not make any difference and in the end solution was to blacklist pata_marvell module in modprobe.conf and update initrd (to include that modprobe.conf). Apparently the marvell controller has both sata and pata though there is only physical connectors for sata, and the wrong module gets loaded which causes these errors and slow boot.

over 5 years ago

Jort to How to fix slow boot with ATA errors

Hi, thanks for this great workaround. While trying to get to a permanent solution, I've managed to update the drives firmware to SB07 (original SB04) which seems to have permanently fixed the whole problem for me. I would recommend trying it (and comment here if it does or doesnt work).

about 4 years ago

Mahmud to How to fix slow boot with ATA errors

Although it is an old post, can't thank you more for this.

over 3 years ago

french guy to How to fix slow boot with ATA errors

A huge thanks for this post ! It saved my parent's computer !

over 3 years ago

BrightOne to How to fix slow boot with ATA errors

Worked like a charm for me! 60s => 6s! Thanks!

over 3 years ago

Roy to How to fix slow boot with ATA errors

Thanks. These DVD drives live on and so does the cure! Nearly dumped the drive.

almost 3 years ago

macronom to How to fix slow boot with ATA errors

Very helpful, thanks.
I used this hit when I installed an Ubuntu system on my new computer some months ago. Now I needed it again, after a kernel update set back the old rule. Very annoying, but now this page is in my bookmarks. ;)

over 2 years ago

Ken to How to fix slow boot with ATA errors

Still working, thanks a million.

over 2 years ago

Fred to How to fix slow boot with ATA errors

Worked fine for me (Oracle Linux 7.4)!!!
Only update-initramfs doesn't exists in this OS.

After searching internet, I found the following substitute:
cd /boot
mv initramfs-$(uname -r).img initramfs-$(uname -r).img-backup
mkinitrd initramfs-$(uname -r).img $(uname -r)

and then reboot the system

about 2 years ago