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
Comments (24)
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
about 12 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 :)
over 11 years ago
Menno to How to fix slow boot with ATA errors
It worked for me too. Thanks.
about 11 years ago
Rob to How to fix slow boot with ATA errors
Cheers mate, you saved me a ton of messing around!
about 11 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.
almost 11 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.
almost 10 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
almost 10 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.
almost 10 years ago
Fidel to How to fix slow boot with ATA errors
Great! Thank you for your solution.
over 9 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.
over 9 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. :)
about 9 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.
almost 9 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).
over 7 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.
about 7 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 !
almost 7 years ago
BrightOne to How to fix slow boot with ATA errors
Worked like a charm for me! 60s => 6s! Thanks!
over 6 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.
about 6 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. ;)
almost 6 years ago
Ken to How to fix slow boot with ATA errors
Still working, thanks a million.
over 5 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
over 5 years ago
Poldi123 to How to fix slow boot with ATA errors
Working, many Thanks!
almost 3 years ago
Prog to How to fix slow boot with ATA errors
Finally Fixed! I can't thank you enough!
almost 3 years ago
Poldi123 to How to fix slow boot with ATA errors
On Fedora34 mkinitrd (see Post from Fred) must be replaced by
sudo dracut "initramfs-$(uname -r).img" $(uname -r)
about 2 years ago
John Kay to How to fix slow boot with ATA errors
Thanks so much - reduced a 2 min boot to 25 seconds. Cheers buddy!
over 1 year ago
Click here to leave a comment