I have a hard disk with an unfortunate unrecoverable sector in either the partition table or a superblock, which causes the disk firmware to lock up when that LBA is accessed. I'm interested in recovering data that's far away from the physically bad sectors, which I think I have a good chance of doing if I can instruct Linux to do absolutely nothing with the drive, unless it corresponds to me reading /dev/sdX
with a tool I run explicitly such as sg_read_long
, sg_write_long
, and ddrescue
.
Currently, my Linux installation (Ubuntu) attempts to read the partition table and automatically mount; I don't want any of this to occur when the drive is attached by USB after the machine boots. In addition to the all the user-mode stuff like mtab, Nautilus, etc, is there a kernel configuration option I need to set in order to stop all automatic reads to the drive?