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 (over 8 years ago)

Article tags: libata, linux, udev

Comments (20)


over 8 years ago

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!




almost 8 years ago

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 :)


over 7 years ago

It worked for me too. Thanks.


over 7 years ago

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


over 7 years ago

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 6 years ago

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


over 6 years ago

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


over 6 years ago

This works here too, thanks.

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


about 6 years ago

Great! Thank you for your solution.


almost 6 years ago

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.


over 5 years ago

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. :)


over 5 years ago

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.


about 4 years ago

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).


over 3 years ago

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

french guy

over 3 years ago

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


about 3 years ago

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


over 2 years ago

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


over 2 years ago

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. ;)


about 2 years ago

Still working, thanks a million.


about 2 years ago

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