[lug] USB flash drive mounting
Gary Hodges - NOAA Affiliate
gary.hodges at noaa.gov
Mon Apr 6 15:27:48 MDT 2015
Yes, I left out some details. I see that now after a couple responses.
Thanks for both, BTW.
1. Only one USB drive will be in any computer at the same time.
2. Running Debian Wheezy
3. Others?
All may be moot now though. I started playing around with your script
idea. Trying different things, etc, and at some point I realized I
could do what I wanted all along. Not quite sure how the path to
resolution came about, but it's working now.
Gary
On 04/06/2015 01:40 PM, Quentin Hartman wrote:
> I would expect some mount by uuid or mount by volume name would be the
> ticket. There are a fair number of potentially important details you
> leave out, but roughly something like:
>
> device="/dev/sdb1"
> label=$(use fdisk to check the label of partition on the $device)
> if [ "$label" == "FLASH" ]; then
> Â mount $device /mnt/FLASH
> Â cp $data
> Â umount /mnt/FLASH
> fi
>
> As for the label checking, this conversation has lots of ideas:Â
> http://unix.stackexchange.com/questions/14165/list-partition-labels-from-the-command-line
>
>
> On Mon, Apr 6, 2015 at 1:20 PM, Gary Hodges - NOAA Affiliate
> <gary.hodges at noaa.gov <mailto:gary.hodges at noaa.gov>> wrote:
>
> Hi,
>
> The scenario...
>
> I have multiple USB storage drives and multiple computers. I want
> to be able to mount from within a script any USB drive on any
> computer. I'd like all the USB drives to be identified the same
> way, e.g, FLASH.
>
> Is that clear? All the computers are configured identically. I
> want to be able to set up a computer and expect that all my USB
> drives will be treated the same. I'd like to write a script that
> checks if a drive is mounted, mount if it isn't, write some data to
> it, then unmount.
>
> Consulting the google has provided some leads, but I haven't been
> able to make any work.
>
> Gary
> _________________________________________________
> Web Page:Â http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.__us/mailman/listinfo/lug
> <http://lists.lug.boulder.co.us/mailman/listinfo/lug>
> Join us on IRC: irc.hackingsociety.org
> <http://irc.hackingsociety.org> port=6667 channel=#hackingsociety
>
>
>
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
More information about the LUG
mailing list