1

What can I do to make Ubuntu automatically mount an external drive when it is connected to an eSATA port?

Currently I must go to Home Folder ▸ Go ▸ Computer and click on the disk to mount it.

2 Answers 2

3

Previously, when HAL (Hardware Abstraction Layer) was handling the hardware devices, you would follow the instructions found at http://vstone.eu/2009/04/hal-and-auto-mounting-external-e-sata-devices/

However, current distributions use udev to handle hardware devices, which means that you have to do some work (I did not find instructions for udev and eSata).

So, what needs to be done is edit /lib/udev/rules.d/80-udisks.rules and the section that says

# Set eSATA port type for known eSATA CardBus adapters - first we want to ensure
# the device is on a cardbus controller (upper PCI device) - then we check
# vid/pid (lower PCI device)
#
SUBSYSTEM=="scsi_host", ATTRS{class}=="0x060700", GOTO="ata_port_cardbus"
GOTO="ata_port_cardbus_end"
LABEL="ata_port_cardbus"
# Mass storage controller: Silicon Image, Inc. SiI 3512 [SATALink/SATARaid] Serial ATA Controller (rev 01)
#
SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1095", ATTRS{device}=="0x3512", ENV{UDISKS_ATA_PORT_CONNECTOR_TYPE}="ata_sata_external"
LABEL="ata_port_cardbus_end"

You would probably need to add your Vendor/Device IDs (similar to 0x1095, 0x3512). That is, add a single line similar to

SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1095", ATTRS{device}=="0x3512", ENV{UDISKS_ATA_PORT_CONNECTOR_TYPE}="ata_sata_external"

You can find your Vendor/Device ID by using the command lspci.

1

This page lists all the methods available.

Note that one of them allows you to automount the drive at boot, for all users, without editing a single config file, through the 'pysdm' program.

Long story short: install pysdm, run it and click around.

1
  • On 12.10, when I try "sudo apt-get install pysdm", I get "E: Unable to locate package pysdm"
    – Phil Hord
    Nov 29, 2012 at 16:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .