LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
Password
MEPIS This forum is for the discussion of MEPIS Linux.

Notices


Reply
  Search this Thread
Old 05-16-2007, 07:41 AM   #1
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Rep: Reputation: 36
Question How to mount pendrive from terminal???


Hello.
As you can see in the subject field, I am asking how to mount my USB pendrive form a terminal? I know that Mepis has an automount feature for such devices, but I created a user profile for my mom, and I didn't give mount rights for her. To be clear, I don't want to give mount rights for her. This user profile also works as an internet browsing profile too, so this little restriction makes the system more secure (there are some personal data on other partitions). So: the automount function doesn't work any more. I tried the mount command, but it says there is no such device or it is not in the fstab. I tried the mount command of course as root. Some months ago I was given an advice not to add entries for pendrives into the fstab, so I didn't add anything. So, my question: how to mount my pendrive from console (using root mode), without adding mount permissions to user profile, without adding anything to fstab and without typing kilometer long commands? Thanks for reading, and trying to answer.
 
Old 05-16-2007, 08:21 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Assume the pendrive is /dev/sda1 and you want to mount it at /media/pendrive, then you should be able to mount it as a priveleged user with
Code:
mount /dev/sda1 /media/pendrive
There is a wrapper called pmount that, IIRC, the Debian folks created to allow non-priveleged users to mount things such as pendrives. This might be something you want to install for mom. If you use pmount, the command would be
Code:
pmount /dev/sda1 /media/pendrive
Additionally, you might want to create and alias so mom doesn't need to type so much
Code:
alias pen='mount /dev/sda1 /media/pendrive'
Then mom just executes the command pen to mount the pendrive.
 
Old 05-16-2007, 08:23 AM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Assuming the device is sda1 (which it should be if you are using IDE drives and it is a standard format flash drive) you would do:

Code:
sudo mount /dev/sda1 /mnt/mountpoint
Where mountpoint is the actual directory you want to mount it to. You can either use one of the existing ones, or just create a new directory.
 
Old 05-16-2007, 08:53 AM   #4
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Could write a udev rule.

Could read writing udev rules and allow her to mount that one particular pen drive . thats what i do for my wife and debian auto mounts it but she can't mount anything else (like my usb drive) and i can't mount hers. The beauty of this is limiting access but still allowing the automount features.

edit
Think mounting is something like:
sudo mount -t vfat /dev/sda1 /mnt/mountpoint

just make sure the mountpoint exist. this should work if you don't want a fstab entry.

Last edited by Hern_28; 05-16-2007 at 09:03 AM.
 
Old 05-16-2007, 11:55 AM   #5
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Original Poster
Rep: Reputation: 36
Cool Thanks!

Thanks Guys!
That method of Arow is extremely helpful. Thanks! I didn't know about that pmount prog, but now I do . Everything just works fine now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange. My pendrive won't mount anymore Thakowbbery Linux - Hardware 4 09-28-2006 06:14 AM
pendrive mount myuran Linux - Hardware 1 04-15-2006 01:27 AM
Mount the Pendrive(Thum stick) sudhasmyle Linux - Hardware 2 11-24-2004 12:25 AM
usb pendrive mount eg72 Linux - Hardware 1 05-16-2004 11:20 AM
mount hangs with USB pendrive dex7er Slackware 2 11-24-2003 06:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration