LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-28-2017, 05:54 PM   #16
designator
Member
 
Registered: Jun 2003
Location: California, USA
Distribution: OpenSUSE Tumbleweed
Posts: 219

Rep: Reputation: 37

Show us the output of
Code:
df --si
as well. I'm curious why you couldn't create a directory inside /tmp/.
 
Old 03-28-2017, 07:22 PM   #17
DDukes
LQ Newbie
 
Registered: Mar 2017
Posts: 12

Rep: Reputation: Disabled
@OP

Are you doing this as root or as a regular user?

If you're doing this as a regular user and the USB is a variation of FAT types like FAT16, FAT32, etc you can write to it since FAT requires no permissions. However, if the USB is formatted with one of linux filesystems types, you'd need to be the owner or part of the group to read/write to it as a regular user.

Quote:
Originally Posted by Chrisroot View Post
ok, mkdir /media/usb-drive, cannot create directory, No such file or directory
You got this error because you tried to create a folder in a non-existent parent directory called /media.

Use a -p with mkdir to correct this

Code:
mkdir -p /media/usb-drive
Here is what the -p does from the mkdir --help

-p, --parents no error if existing, make parent directories as needed

Last edited by DDukes; 03-28-2017 at 07:36 PM.
 
Old 03-28-2017, 07:29 PM   #18
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by DDukes View Post
@OP

Are you doing this as root or as a regular user?

If you're doing this as a regular user and the USB is a variation of FAT types like FAT16, FAT32, etc you can write to it since FAT requires no permissions. However, if the USB is formatted with one of linux filesystems types, you'd need to be part of the group to read/write to it as a regular user.
Hey DD ... the OP's USB is formatted FAT32 LBA - see one the previous posts ..

It's probably mounted somehow, we're just waiting for the OP to post the output of some commands to confirm that as well as the mount point.

Cheers :=)
 
Old 03-28-2017, 07:47 PM   #19
DDukes
LQ Newbie
 
Registered: Mar 2017
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
Hey DD ... the OP's USB is formatted FAT32 LBA - see one the previous posts ..

It's probably mounted somehow, we're just waiting for the OP to post the output of some commands to confirm that as well as the mount point.

Cheers :=)
OK.

Last edited by DDukes; 03-28-2017 at 07:51 PM.
 
Old 03-29-2017, 09:07 AM   #20
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
Hey everyone, yes the mount point is incorrect. Right now i typed the following command "mount /dev/sdc1 /media/usb-drive/". The mount point has been created but the output i get is saying that mount /dev/sdc1 /media/usb-drive/ does not exist, but it does.
 
Old 03-29-2017, 09:13 AM   #21
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Are you already root, or would you need to use the sudo command to be able to complete the mount. Normally you need root privileges to accomplish a mount.
 
Old 03-29-2017, 09:17 AM   #22
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
Currently I am logged in as root.
 
Old 03-29-2017, 09:19 AM   #23
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Chrisroot View Post
Currently I am logged in as root.
Hi Chrisroot,

Again, can you run and post the output of the command:

findmnt /dev/sdc1

Thanks.
 
Old 03-29-2017, 09:31 AM   #24
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
Comamnd - findmnt /dev/sdc1 command not found. So im guessing it isn't mounted at the moment.
 
Old 03-29-2017, 09:36 AM   #25
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Chrisroot View Post
Comamnd - findmnt /dev/sdc1 command not found. So im guessing it isn't mounted at the moment.
No, oddly, that means the command is not available on your Gentoo server .. This is the 2nd time a rather ubiquitous command has not been found (lsblk being the other one).

Just for clarity - you are currently logged in to the Gentoo server as root, right ? You are not using some kind of live ISO ?

I'm stumped as to why some of these commands aren't available ...
 
Old 03-29-2017, 09:39 AM   #26
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
No that means the findmnt command is not available, in your PATH, or on your system.

Let's back up for a second here:
  1. To be able to copy into or out of a drive, that drive needs to be mounted, and you need to have privileges to be able to read and write to it.
  2. Say the drive is /dev/sdc, and say further that the drive has a name string which was given when the filesystem was created, such as "12345". This drive if auto-mounted should show under /mnt or /media in a directory which matches the name "12345", or it will use a name matching some other attributes of the mounted file system, such as some long hex-ascii string.
  3. Things you can do when you plug in a disk are to:
    1. Issue the "mount" command to see if it is mounted, in fact you can do that before, then plug in the drive, then issue the mount command again, and see if you see the drive mounted
    2. You can look at your system log to see if /dev/sdc was recognized and some additional records to determine if it was auto-mounted
    3. If not auto-mounted, you can then try to manually mount it using the "mount" command, one possible example would be: "mount -t <file system type> /dev/sdc1 /mnt/<name>"
  4. If the drive is mounted, and you are root as you say you are, you should check the ownership of the /mnt or /media subdirectory, for instance if it is mounted at /mnt/drive_1 then check the ownership and group for the /mnt tree by going to there and doing "ls -l", it should be root and you should at least have rwx privileges for the directory.
  5. Same applies to the files or directories under that mounted directory, you should have privileges to access, read, and write there.
  6. Seeing as you're root, this would seem to be no problem, however it is worth checking
I feel that you need to understand first if this is mounted, and then diagnose how to get it mounted, if it is not mounted.
 
1 members found this post helpful.
Old 03-29-2017, 09:40 AM   #27
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
... worst case, just run the following command and post its output:

mount

... the ouput will be a little lengthy, but at least we'll see the information we need ...

Thx.
 
Old 03-29-2017, 09:41 AM   #28
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
Yes, i am logged in as root currently. And yes it is a a Gentoo server not a live ISO. Is there a way to install some of these simple commands? I know this shouldn't be this difficult.
 
Old 03-29-2017, 09:42 AM   #29
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by Chrisroot View Post
Yes, i am logged in as root currently. And yes it is a a Gentoo server not a live ISO. Is there a way to install some of these simple commands? I know this shouldn't be this difficult.
Please type "mount" and post the result of that command
 
Old 03-29-2017, 09:42 AM   #30
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by rtmistler View Post
No that means the findmnt command is not available, in your PATH, or on your system.

... I feel that you need to understand first if this is mounted, and then diagnose how to get it mounted, if it is not mounted.
... Absolutely agree. I again suggest posting the output of the mount command (no options, just mount).
 
  


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
[SOLVED] Cannot copy files to USB flash drive from internal HDD. erik2282 Linux - Desktop 8 10-04-2014 12:23 PM
Can I copy files from a ntfs drive on ubuntu server? Vodkaholic1983 Linux - Newbie 7 05-05-2013 06:03 AM
How to copy files from a usb pen drive to my linux box? HelpMe2877 Linux - Newbie 4 08-20-2008 02:54 AM
Copy Files From Lexar USB Drive In Slackware 12.1 OWA14 Linux - Newbie 3 05-27-2008 06:50 PM
copy files from your hard drive to usb key with Knoppix ziegen Linux - Distributions 1 08-09-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:23 PM.

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