LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cant copy files from Gentoo server to USB drive. (https://www.linuxquestions.org/questions/linux-newbie-8/cant-copy-files-from-gentoo-server-to-usb-drive-4175602729/)

Chrisroot 03-29-2017 09:47 AM

Hey Rikkkk,

Here is the output from mount-

/dec/sda3 om / type ext3 )rw,noatime)
none on /rpoc type proc (rw)
none on /sys type sysfs (rw)
none on /dev type ramfs (rw)
none on /dev/pts type devpts (rw)
/dev/sda1 on /boot type ext3 )rw,noatime)
/dev/sdb1 on /data type ext3 (rw,noatime)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)

Rickkkk 03-29-2017 09:49 AM

Quote:

Originally Posted by Chrisroot (Post 5689800)
Hey Rikkkk,

Here is the output from mount-

/dec/sda3 om / type ext3 )rw,noatime)
none on /rpoc type proc (rw)
none on /sys type sysfs (rw)
none on /dev type ramfs (rw)
none on /dev/pts type devpts (rw)
/dev/sda1 on /boot type ext3 )rw,noatime)
/dev/sdb1 on /data type ext3 (rw,noatime)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)

OK so your USB drive at /dev/sdc1 is not currently mounted anywhere. Can you confirm that it is plugged in by running fdisk -l again please and posting the results ?

Thx.

rtmistler 03-29-2017 09:53 AM

Quote:

Originally Posted by Rickkkk (Post 5689802)
OK so your USB drive at /dev/sdc1 is not currently mounted anywhere. Can you confirm that it is plugged in by running fdisk -l again please and posting the results ?

Thx.

Recommend that the assumption is that Chrisroot has this drive still in there and it is of type 'c' which is a fat32. Therefore it is best to work towards performing the mount.

Code:

# cd /mnt
# mkdir -p drive_c
# mount -t vfat /dev/sdc1 /mnt/drive_c
# mount


Chrisroot 03-29-2017 09:59 AM

Sure thing.

fdisk-l- Output

device boot Start end Blocks ID System
/dev/sda1 1 11 88326 83 Linux
/dev/sda2 12 384 2996122 83 Linux
/dev/sda3 385 4425 32459332 83 Linux

Disk /dev/sdc: 31.1 GB-----My device

Device boot Start end Blocks ID System
/dev/sdc1 1 3793 30464639 c W95 FAT32 (LBA)

Rickkkk 03-29-2017 10:01 AM

Quote:

Originally Posted by Chrisroot (Post 5689807)
Sure thing.

fdisk-l- Output

device boot Start end Blocks ID System
/dev/sda1 1 11 88326 83 Linux
/dev/sda2 12 384 2996122 83 Linux
/dev/sda3 385 4425 32459332 83 Linux

Disk /dev/sdc: 31.1 GB-----My device

Device boot Start end Blocks ID System
/dev/sdc1 1 3793 30464639 c W95 FAT32 (LBA)


Excellent - please follow rtmistler's (post #33) instructions next ...

Chrisroot 03-29-2017 10:09 AM

Alright, that command worked at the usb is mounted.

/dev/sdc1 on /mnt/drive_c type vfat (rw).

Rickkkk 03-29-2017 10:12 AM

Quote:

Originally Posted by Chrisroot (Post 5689815)
Alright, that command worked at the usb is mounted.

/dev/sdc1 on /mnt/drive_c type vfat (rw).

There you go.

That's where you copy your files to ... : /mnt/drive_c/

Emerson 03-29-2017 10:13 AM

May I remind everybody this is Gentoo, nothing is installed unless administrator decided to install it. Also, there is no automount of any kind unless administrator has chosen to set it up.
For installing software check out emerge command.

rtmistler 03-29-2017 10:14 AM

Quote:

Originally Posted by Chrisroot (Post 5689815)
Alright, that command worked at the usb is mounted.

/dev/sdc1 on /mnt/drive_c type vfat (rw).

Great. Confirm that you are now able to copy files. REMEMBER WHEN YOU ARE DONE TO:
Code:

# umount /mnt/drive_c
BECAUSE THIS RESOLVES ANY OPEN FILE HANDLES AND ENSURES YOU WON'T HAVE CORRUPTION. Same as "eject" on Windows.

If all is finally resolved, recommend you mark the thread as Solved, using the Thread tools in the top of the LQ page form. Then please remember the important things here, because they pretty much always apply moving forwards regarding mounting drives.

Glad you are very close and sounds as if the problem is now fixed.

EDIT:
Quote:

Originally Posted by Emerson (Post 5689818)
May I remind everybody this is Gentoo, nothing is installed unless administrator decided to install it. Also, there is no automount of any kind unless administrator has chosen to set it up.
For installing software check out emerge command.

Thank you for clarifying. Not everyone knows every distribution, I clearly do not know Gentoo, so it is an important point for Chrisroot to understand.

Rickkkk 03-29-2017 10:14 AM

... and when you're done, you can unmount the USB drive before removing it, with:

umount /mnt/drive_c

Chrisroot 03-29-2017 10:17 AM

Just a really dumb question, then what is the destination file for which i am copying files to? /dev/sdc1?

Rickkkk 03-29-2017 10:19 AM

Quote:

Originally Posted by Chrisroot (Post 5689825)
Just a really dumb question, then what is the destination file for which i am copying files to? /dev/sdc1?

No - the destination directory is /mnt/drive_c/

You always use the mount point, not the block device.

*EDIT* ... and by the way, there are no dumb questions. Linux works along the principle of "everything is a file", similarly to unix. So you "mount" devices to files to make them available to users for reading and writing operations. The file becomes an alias for the device while it is mounted - kind of like assigning a drive letter to a drive or a partition in Windows, if you're familiar with that ...

Cheers :-)

Chrisroot 03-29-2017 10:24 AM

Thank you all for your help.

Rickkkk 03-29-2017 10:28 AM

Quote:

Originally Posted by Chrisroot (Post 5689840)
Thank you all for your help.

You're very welcome - feel free anytime.

Cheers,

Chrisroot 03-29-2017 10:31 AM

Sorry to bother you all again,

command typed- cp -r /opt/biweb/app/ /mnt/drive_c/ -------Output- cannot create symbolic link- Operation not permitted.


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