Auto mounting a USB disc
philip <[email protected]> Fri, 10 Jul 2015 21:41:53 +1200
| Newsgroups | gmane.org.user-groups.linux.dunedin.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2015-07-10 at 18:32 +1200, worik wrote: I have a 1.6TB disc that is normally plugged into my TV. For all sorts of reasons I have plugged it into my computer (ubuntu 14.04.2) and it did not automagically mount, as I expected. Looking at dmesg -T I can see: [Fri Jul 10 18:34:27 2015] sd 6:0:0:0: [sdb] Attached SCSI disk So guessing I mounted /dev/sdb1, all good. But how do I explain to the poor wee computer that this should be done automatically? This taken from the automount system for my MAXI Debian stick. Use blkid to find the UUID of the partition you are using on your drive. Add UUID=whatever the uuid is /media/cdrom0 auto defaults,auto,user,ro,nofail 0 0 to fstab Create file 99-mount.rules Add line SUBSYSTEM=="block", RUN+="/bin/mount UUID=whatever the uuid is" to 99-mount.rules Copy 99-mount.rules to /etc/udev/rules.d This should automagicly mount your disc (and only this disc) on /media/cdrom0 Ubuntu 14.04 does use udev? Phil. -- Philip Charles; 39a Paterson Street, Abbotsford, Dunedin, New Zealand +64 3 488 2818 Fax +64 3 488 2875 Mobile 027 663 4453 [email protected] - personal. [email protected] - business _______________________________________________ DunLUG mailing list [email protected] http://lists.ethernal.org/listinfo/dunlug DunLUG Wiki - http://dunlug.kallisti.net.nz/