Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #168011

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

From Gene Heskett <gheskett@shentel.net>
Newsgroups linux.debian.user
Subject Re: Something never understood: see USB storage in CLI & mc
Date 2016-05-18 15:40 +0200
Message-ID <rA9RD-2KE-7@gated-at.bofh.it> (permalink)
References <rA67n-eQ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

> List, good morning,
>
> One aspect of Debian I've never managed to 'get', is how to 'see' any
> temporarily plugged-in USB storage device, from the command line or in
> mc.  The machines in question are using Wheezy.
>
> I often use a machine (with only cli) to download overnight - this
> works well.  But when I insert (say) a 2G or 4G USB storage, I cannot
> 'find' any mount referring to the USB storage.
>
> I assume that I have to mount the USB storage, but where should I find
> the reference for the physical device to mount?  Best of all would be
> to make this process 'automatic', if I could.
>
> Not all the devices are formatted with vfat; I think some use ext(x),
> and some are dd'd ISOs.  Because labelling these devices is not very
> practical, I'd like to be able to plug them in and check what they
> contain - before, perhaps, overwriting them with something new.
>
> 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.
>
> regards, Ron

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 
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.

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 
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.

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.

But I think you can see from the above what needs to be done by hand if 
your desktop isn't in use.

IHTH.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Something never understood: see USB storage in CLI & mc Ron Leach <ronleach@tesco.net> - 2016-05-18 11:40 +0200
  Re: Something never understood: see USB storage in CLI & mc <tomas@tuxteam.de> - 2016-05-18 11:50 +0200
  Re: Something never understood: see USB storage in CLI & mc Felix Miata <mrmazda@earthlink.net> - 2016-05-18 11:50 +0200
    Re: Something never understood: see USB storage in CLI & mc Ron Leach <ronleach@tesco.net> - 2016-05-18 13:20 +0200
      Re: Something never understood: see USB storage in CLI & mc Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-18 13:30 +0200
      Re: Something never understood: see USB storage in CLI & mc Brian <ad44@cityscape.co.uk> - 2016-05-18 13:50 +0200
        Re: Something never understood: see USB storage in CLI & mc Brian <ad44@cityscape.co.uk> - 2016-05-18 14:00 +0200
      Re: Something never understood: see USB storage in CLI & mc "Martin McCormick" <martin.m@suddenlink.net> - 2016-05-18 14:30 +0200
      Re: Something never understood: see USB storage in CLI & mc Felix Miata <mrmazda@earthlink.net> - 2016-05-18 15:00 +0200
    Re: Something never understood: see USB storage in CLI & mc Gene Heskett <gheskett@shentel.net> - 2016-05-18 15:40 +0200
  Re: Something never understood: see USB storage in CLI & mc Dominique Dumont <dod@debian.org> - 2016-05-18 12:00 +0200
  Re: Something never understood: see USB storage in CLI & mc Jonas Hedman <jonas.hedman@fripost.org> - 2016-05-18 12:00 +0200
  Re: Something never understood: see USB storage in CLI & mc Jude DaShiell <jdashiel@panix.com> - 2016-05-18 14:00 +0200
  Re: Something never understood: see USB storage in CLI & mc Gene Heskett <gheskett@shentel.net> - 2016-05-18 15:40 +0200
    Re: Something never understood: see USB storage in CLI & mc Brian <ad44@cityscape.co.uk> - 2016-05-18 18:30 +0200
      Re: Something never understood: see USB storage in CLI & mc Ron Leach <ronleach@tesco.net> - 2016-05-18 20:20 +0200
        Re: Something never understood: see USB storage in CLI & mc Jonas Hedman <jonas.hedman@fripost.org> - 2016-05-18 21:10 +0200

csiph-web