[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Something never understood: see USB storage in CLI & mc



On Wed 18 May 2016 at 09:33:28 -0400, Gene Heskett wrote:

> On Wednesday 18 May 2016 05:30:34 Ron Leach wrote:
> 

[...Snip...]

> > I'd be interested in how other users organise this but, essentially,
> > I'd be grateful for any advice on where to find the physical device to
> > use in a mount command.  And, as a secondary question (there are two
> > points on offer for this one), how to mount it without knowing the
> > device's fs.
> 
> This detection and auto-mounting of plugged in media is generally part of 
> the desktop you run. I am using TDE, up to date version r14, and when I

It can be but there are enough people not running GNOME, Xfce, MATE etc
to question whether the generalisation is useful.
 
> plug in my junk cell phone when its turned off, it goes into charge mode 
> until it topped off, then a TDE Daemon finds it and mounts 
> to /media/somenumber automaticly, giving it access perms only from the 
> owner of the desktop.  Only 50 megs of ram so obviously its a fat-16 
> file system.
> 
> I doubt, if you are not running a desktop, that such an automount 
> facility is available or running on your system.

Doubt no longer:

  apt-cache show usbmount udevil | less

> One way to do it manually is to run 'blkid' from a shell, which will 
> output a unique identifier for each device it can find.  My phone for

'/sbin/blkid' is preferable for a user.

> instance, shows up in the list blkid outputs as
> 
> /dev/sdd: SEC_TYPE="msdos" UUID="2A21-0001" TYPE="vfat"
> 
> you could then construct a mount command, see mounts man page, useing 
> either the /dev/sdd (discouraged as it is not unique and yours may be a 
> different sd#) or the UUID=number, which will be different from mine, 
> using the vfat filesystem, mounted to /media/2A21-0001 in my case.  The 
> UUID method is much the preferred method, and that is the name its 
> mounted at too.

This is the second post in this thread which recommends becoming root to
carry out the simple user task of identifying and mounting a removeable
device. There are many Debian users who have a firm belief in only using
root privilege for the most essential of maintenance jobs and many
others who do not have that privilege. Isn't it about time to leverage
the benefits of the OS?

Ron Leach's requirement is met completely by dmesg, lsblk or even
lsscsi, pmount, udevil or udisksctl and usbmount or devmon.

> I am pretty sure such an auto function could be hacked up in a bash 
> script, I've done them critters for 2 or 3 things here, but not this 
> since my gui of choice handles it.

It probably could.


Reply to: