FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-12-2010, 07:52 AM
vishnu vardhan
 
Default how to umount a usb flash drive through cli as a normal user

i have installed debian 5.0.5 on virtualbox. i am learning about how to live without a desktop environment. i have installed fluxbox and trying to familiarise with it. i use usb flash drive almost on daily basis, plugging in and out atleast four times. i did not installed any GUI file manager. i am using mc and so far it is damn excellent.


i have installed pmount to minimise use of root account. upon reading the man page of pmount, i have installed ntfs-3g.

to mount the usb flash drive :

[a] start mc and search for jet under /dev/disk/by-id folder and note down the name, for e.g. sdb1


[b] $ pmount /dev/sdb1

the above command is mounting the usb flash drive properly. to umount the flash drive :
# umount /dev/sdb1

i hope the above command is correct. but there is an issue.

in /media/ folder there are folders of my previous mounts, today i have mounted flash drive 2 times. there are two folders /sdb1 and /sdc1. even after rebooting the system they are present.


so i have basically the following inquiries :

[1] how to umount a usb flash drive without leaving any trace ?
[2] how can i automatically mount a usb flash drive ?
[3] how do i umount a flash drive as a normal user ?


thank you.
 
Old 10-12-2010, 07:59 AM
Jason Heeris
 
Default how to umount a usb flash drive through cli as a normal user

On 11 October 2010 23:52, vishnu vardhan <vishnuvardhan.linux@gmail.com> wrote:
> to mount the usb flash drive :
>
> [a] start mc and search for jet under /dev/disk/by-id folder and note down
> the name, for e.g. sdb1

This is a bit tangential, but do you know about the "pmount-hal"
command? It basically uses HAL to work out a name for the mount point
(eg. /media/My USB Drive instead of /media/usb0), and automatically
works out some other mount flags for you. Keep in mind I use Squeeze,
not Lenny, so if it's not there, that's why.

Cheers,
Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikaMaxAGtFeHDpErALFt-2AwbMwbiVj090hJ=eF@mail.gmail.com">http://lists.debian.org/AANLkTikaMaxAGtFeHDpErALFt-2AwbMwbiVj090hJ=eF@mail.gmail.com
 
Old 10-13-2010, 02:13 AM
"s. keeling"
 
Default how to umount a usb flash drive through cli as a normal user

Jason Heeris <jason.heeris@gmail.com>:
> On 11 October 2010 23:52, vishnu vardhan <vishnuvardhan.linux@gmail.com> wrote:
> >
> > [a] start mc and search for jet under /dev/disk/by-id folder and note down
> > the name, for e.g. sdb1
>
> This is a bit tangential, but do you know about the "pmount-hal"
> [...]
> works out some other mount flags for you. Keep in mind I use Squeeze,
> not Lenny, so if it's not there, that's why.

Yes, it's also in lenny.

I would think that you can do "aptitude/apt-get search -v $blah" where $blah
== {lenny,squeeze,sid,stable,...} or sumfin, but looking at the
manpage's his problem, not yours or mine. :-)


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i934ke$9n7$1@speranza.aioe.org">http://lists.debian.org/i934ke$9n7$1@speranza.aioe.org
 
Old 10-13-2010, 04:54 AM
vishnu vardhan
 
Default how to umount a usb flash drive through cli as a normal user

On Tue, Oct 12, 2010 at 1:29 PM, Jason Heeris <jason.heeris@gmail.com> wrote:

On 11 October 2010 23:52, vishnu vardhan <vishnuvardhan.linux@gmail.com> wrote:

> to mount the usb flash drive :

>

> [a] start mc and search for jet under /dev/disk/by-id folder and note down

> the name, for e.g. sdb1



This is a bit tangential, but do you know about the "pmount-hal"

command? It basically uses HAL to work out a name for the mount point

(eg. /media/My USB Drive instead of /media/usb0), and automatically

works out some other mount flags for you. Keep in mind I use Squeeze,

not Lenny, so if it's not there, that's why.



Cheers,

Jason



strangely, there is no usb entry in /media/. there are only entries of cdrom, cdrom0, sdb1 & sdc1. both sdb1 & sdc1 are directories and they have a file created by pmount. if i try with only sdb it is showing error of wrong fs type.


today only i re-read your reply. it seems i have missed pmount-hal command. i will let you know my experience with command in another 24 hours.
 
Old 10-19-2010, 09:01 AM
Jörg-Volker Peetz
 
Default how to umount a usb flash drive through cli as a normal user

In the pmount package there is also a "pumount" command.
The new device name can be found in the file /proc/partitions.
So the whole procedure could be like this, using the symbolic name "udisk":

cat /proc/partitions
pmount /dev/sdb1 udisk
# now the device can be accessed via /media/udisk
pumount udisk
# this removes also the mount point /media/udisk

--
Best regards,
Jörg-Volker.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i9jmno$blq$1@dough.gmane.org">http://lists.debian.org/i9jmno$blq$1@dough.gmane.org
 

Thread Tools




All times are GMT. The time now is 12:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org