LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-21-2012, 08:19 AM   #16
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 344

Rep: Reputation: 84

Ah. That is because you entered

Code:
mkdir /mnt/sdb
instead of

Code:
sudo mkdir /mnt/sdb
The command 'sudo' allows you to take superuser (or root) privileges for one command. After you enter this line of code, you will be prompted for your root password. You need to enter the password as directed and then proceed with the instructions.

This is necessary because only the superuser has the permissions necessary to create a directory there.

Or, of course, you could just switch to another Ubuntu.

Last edited by Kallaste; 09-21-2012 at 08:24 AM. Reason: clarity
 
Old 09-21-2012, 08:34 AM   #17
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,555

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
long n short of getting a flash drive set to mount.

as root

# mkdir /mnt/foo replace foo with something that you can remember ie: usb
# fdisk -l from that you are looking for the /dev/sdX and the file type of the flash drive
# fdisk /dev/sdX (if you wish to format it for ext3 to run native in Linux) Ignore this step if you want to leave it as FAT32
d (this will delete all partitions on the drive)
n (create new partitions)
p (for primary)
1 (you only need 1 partition atm)
hit enter until it is prompting again without quesitons
w (write the change to the drive)
# mkfs -t ext3 /dev/<partition>
# tune2fs -c 0 /dev/<partition> only if you do not want to have the system force a file check after roughly 120 mounts
# vi /etc/fstab
add the following entry:

/dev/<partition> /mnt/foo ext3 auto,users,rw 0 0

if you want user to be able to mount/umount the drive then you need to add the following to visudo

at the end of the user line:

, /bin/mount /mnt/foo, /bin/umount /mnt/foo

then mount the drive:

# mount /mnt/foo
# chmod 4777 /mnt/foo (this is really really lose, not safe unless you KNOW you are the ONLY one with acesss to your system) if not set the permissions chmod 755 /mnt/foo
# if you set 755, then you need to also chown -Rf user:users_group /mnt/foo
# umount /mnt/foo
# exit
$ sudo /bin/mount /mnt/foo (no trailing / just like you did in visudo)
$ touch /mnt/foo/test if this works without permissions issues you are set.

fin.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 04:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM
mount usb module then mount usb hard drive guanyu Linux - Hardware 1 10-08-2003 11:50 AM


All times are GMT -5. The time now is 05:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration