Re: Auto mounting a USB disc

worik <[email protected]> Sat, 11 Jul 2015 10:42:56 +1200
Newsgroups gmane.org.user-groups.linux.dunedin.general
Message-ID <[email protected]>
On 10/07/15 21:41, philip wrote:
> 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.
>

But what about the next USB disc?  Is there a way I can munt any old USB
disc without having to kn ow about dmesg and  the root password?
> 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/


-- 
Why is the legal status of chardonnay different to that of cannabis? 
                  [email protected] 021-1680650, (03) 4821804
                          Aotearoa (New Zealand)
                             I voted for love


_______________________________________________
DunLUG mailing list
[email protected]
http://lists.ethernal.org/listinfo/dunlug
DunLUG Wiki - http://dunlug.kallisti.net.nz/