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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-28-2017, 05:54 PM
|
#16
|
Member
Registered: Jun 2003
Location: California, USA
Distribution: OpenSUSE Tumbleweed
Posts: 219
Rep:
|
Show us the output of
as well. I'm curious why you couldn't create a directory inside /tmp/.
|
|
|
03-28-2017, 07:22 PM
|
#17
|
LQ Newbie
Registered: Mar 2017
Posts: 12
Rep: 
|
@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
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.
|
|
|
03-28-2017, 07:29 PM
|
#18
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by DDukes
@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 :=)
|
|
|
03-28-2017, 07:47 PM
|
#19
|
LQ Newbie
Registered: Mar 2017
Posts: 12
Rep: 
|
Quote:
Originally Posted by Rickkkk
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.
|
|
|
03-29-2017, 09:07 AM
|
#20
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep: 
|
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.
|
|
|
03-29-2017, 09:13 AM
|
#21
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,963
|
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.
|
|
|
03-29-2017, 09:17 AM
|
#22
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep: 
|
Currently I am logged in as root.
|
|
|
03-29-2017, 09:19 AM
|
#23
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Chrisroot
Currently I am logged in as root.
|
Hi Chrisroot,
Again, can you run and post the output of the command:
findmnt /dev/sdc1
Thanks.
|
|
|
03-29-2017, 09:31 AM
|
#24
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep: 
|
Comamnd - findmnt /dev/sdc1 command not found. So im guessing it isn't mounted at the moment.
|
|
|
03-29-2017, 09:36 AM
|
#25
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Chrisroot
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 ...
|
|
|
03-29-2017, 09:39 AM
|
#26
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,963
|
No that means the findmnt command is not available, in your PATH, or on your system.
Let's back up for a second here: - 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.
- 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.
- Things you can do when you plug in a disk are to:
- 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
- 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
- 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>"
- 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.
- Same applies to the files or directories under that mounted directory, you should have privileges to access, read, and write there.
- 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.
|
03-29-2017, 09:40 AM
|
#27
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
... 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.
|
|
|
03-29-2017, 09:41 AM
|
#28
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep: 
|
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.
|
|
|
03-29-2017, 09:42 AM
|
#29
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,963
|
Quote:
Originally Posted by Chrisroot
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
|
|
|
03-29-2017, 09:42 AM
|
#30
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by rtmistler
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).
|
|
|
All times are GMT -5. The time now is 10:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|