Question: I have samsung laptop with 30GB ExpressCache SanDisk SSD soldered on mainbord. SSD died (gives tons of errors when i try to access it somehow), but it is still probed on kernel boot, i see it’s partition, ubuntu’s unity shows unmounted drive icon in app drawer, and worst of all I can’t suspend laptop, because sending suspend command to ssd device fails.I tried to pass sdb=noprobe kernel parameter, but it looks like it is obsoleted long ago in 3.8.0 kernel (Ubuntu 13.04).How can I disable sata device in recent kernels?
Answer: Two solutions here: one is fast to apply, although solves the problem only partially, the other one is the complete one but requires you to compile your own kernel.
The correct answer is a kernel patch.
Robin H. Johnson wrote a patch for the SATA kernel driver (find it in Unix/Linux stack exchange site) which hides completely the drive.
Update The patch is now upstream (at least in 3.12.7 stable kernel), see ?the git repository. I asked for backport in the Ubuntu launchpad.
Once the patch is installed, adding
libata.force=2.00:disable
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:
(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
Workaround
Answered by Unix StackExchange user Emmanuel in https://unix.stackexchange.com/a/103742/52205
You can at least solve the suspend problem by issuing the command
echo 1 > /sys/block/sdb/device/delete
before suspend.
To automate it, I added the following file: (note the flags, it must be executable)
-rwxr-xr-x 1 root root 204 Dec ?6 16:03 99_delete_sdb
in the directory /etc/pm/sleep.d/
#!/bin/sh# Tell grub that resume was successfulcase “$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. I added the snippet
if [ -d /sys/block/sdb ]; then ?echo Deleting device sdb ?echo 1 > /sys/block/sdb/device/delete ?fi
to /etc/rc.local too, for good measure.