How to tell Linux Kernel > 3.0 to completely ignore a failing disk?
libata does not have a noprobe option at all; that was a legacy IDE option...
But I went and wrote a kernel patch for you that implements it. It Should apply to many kernels very easily (the line above it was added 2013-05-21/v3.10-rc1*, but can be safely applied manually without that line).
Update The patch is now upstream (at least in 3.12.7 stable kernel). It is in the standard kernel distributed with Ubuntu 14.04 (which is based on 3.13-stable).
Once the patch is installed, adding
to the kernel boot parameters will hide the disk from the Linux kernel. Double check that the number is correct; searching for the device name can help (obviously, you have to check the kernel messages before adding the boot parameters):
(0)samsung-romano:~% dmesg | grep iSSD [ 1.493279] ata2.00: ATA-8: SanDisk iSSD P4 8GB, SSD 9.14, max UDMA/133 [ 1.494236] scsi 1:0:0:0: Direct-Access ATA SanDisk iSSD P4 SSD PQ: 0 ANSI: 5
The important number is the
ata2.00 in the first line above.
Hardware problems have physical hardware solution. Did you consider to unsolder or cut the power supply of the drive ?
EDIT: Ok if thats not an option people are using this before to hot-plug a hard drive. You could use that to disable your drive.
echo 1 > /sys/block/sdb/device/delete
Note that any other process can force a scan of the SATA bus, and then makes it to be back. Try to do that just before hibernating the laptop.
Edited by OP: it worked. I added the following file :
-rwxr-xr-x 1 root root 204 Dec 6 16:03 99_delete_sdb
#!/bin/sh # Tell grub that resume was successful case "$1" in suspend|hibernate) if [ -d /sys/block/sdb ]; then echo Deleting device sdb echo 1 > /sys/block/sdb/device/delete fi ;; esac
...and now the system suspends (and resume) correctly.
Does this device not show up in any type of way via your BIOS?
Often times HDDs are configured in an "auto" mode, I would go through and make sure that these devices are in a disabled state and even go to the extent of explicitly enabling only the one HDD and disabling everything else.
Kernel Boot Options
Often times you can disable various subsystems from being auto-detected by the booting Linux Kernel through the use of different boot options that can be passed to it as switches.
Most if not all of the options are listed here:
Linux in a Nutshell book
You might want to skim through the O'Reilly book, Linux Kernel in a Nutshell, specifically, Chapter 7: Customizing a Kernel.
This book is made available for free by its author, Greg Kroah-Hartman, on his personal website. The entire book can be downloaded as well.