2

I want to make an old (to use the correct term, ancient) laptop work with Ubuntu 14.04. The hard drive installed doesn't function correctly, and therefore Ubuntu has LOTS to complain about. Here is the error:

ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.00: BMDMA stat 0x25
ata1.00: failed command: READ DMA
ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
     res 51/40:08:00:00:00/00:00:00:00:00/e0 Emask 0x9 (media error)
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
end_request: I/O error, dev sda, sector x
Buffer I/O error on device sda, logical block x

I have tried:

  • adding "nobootwait" to the /dev/sda line in /etc/fstab
  • inserting "options libata noacpi=1" into /etc/modprobe.d/options

Before I added "options libata noacpi=1", it actually got to the shell. Now, it just hangs after a few minutes.

I don't want to use or replace the hard drive, because I am using a flash drive to boot from. So, what I need to know is how to get rid of these errors, or tell Ubuntu to stop generating the errors.

Braiam
  • 67,791
  • 32
  • 179
  • 269
  • Would disconnecting the hard drive be an acceptable solution, since you don't want to use it? It sounds like it's dying to me (I wouldn't trust it to hold my data.) – Azendale May 25 '14 at 02:29

3 Answers3

1

You could also try modifying the entry in /etc/fstab. The default for devices in there is rw,suid,dev,exec,auto,nouser,async which means that if your device /dev/sda has an entry in /etc/fstab to mount /dev/sda1 then you should override the default behavior by putting noauto and maybe ro (read only) for the mount options and 0 for dump and 0 for fsck (file system check). Might look something like this:

/dev/sda1     /mnt/windows     noauto,ro     0     0

Hope that helps.

hmayag
  • 2,246
  • 5
  • 21
  • 23
ConceptRat
  • 11
  • 1
0

Does deleting the /etc/fstab entry for /dev/sda not work or something? IIRC, mountall (utility to mount filesystems at boot) will still try to mount the filesystem at boot even if you have nobootwait.

CameronNemo
  • 1,675
  • I added a line to /etc/fstab that says to mount the old /dev/sda to none with nobootwait. Even with this in the file, after adding the boot param, it still works, probably because it uses the flash drive's UUID. – Joseph Havens May 25 '14 at 11:56
0

Yes, it is possible to tell Linux to ignore a failing drive(1) without physically disconnecting it (2).

Look at this question: How can I tell linux kernel to completely ignore a disk as if it was not even connected?

The kernel patch commented there is included in kernel 3.13 and up, so in 14.04 you should be able to add the command line option to your kernel:

 libata.force=1.00:disable

And the disk will be completely ignored(3). If you need help on adding kernel boot parameters, see How do I add a kernel boot parameter?


Footnotes:

(1) it was not possible ten months ago. Then I posted the linked question because I had a failing on board SDD, a kind kernel developer noticed it, added a patch to the kernel, and now I have a working system. This is the real power of Linux.

(2) Although if you can, the best strategy is to physically get rid of it. No power drain, no noise...

(3) note that, obviously, this means that the disk will not be accessible at all after the boot. It will be as if it does not exist (and it means that for example, in your case, the disk that was /dev/sdb it will be now /dev/sda and so on). You may need to take this into account for the boot configuration.

Rmano
  • 31,947