LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-15-2007, 11:55 PM   #1
PETROSHP
LQ Newbie
 
Registered: Jan 2007
Posts: 24

Rep: Reputation: 15
Howto Move A File From My Pendrive To My Hd?


DEAR LINUXUSERS,

AFTER A MONTH USING SUSE 10.2 AND ALTHOUGH IT TOOK A WHILE TO INSTALL XGL, GDESKLETS, CODECS ETC AND GENERALLY TO MAKE IT ALMOST THE WAY I WANTED, YESTERDAY I DID A MAJOR UPGRADE (INCLUDED KERNEL UPDATE) AND NOW I CANNOT GET MY X SERVER TO START COZ MY SCREEN HAS BEEN FOUND BUT THE CONFIGURATION IS NOT CORRECT. NOW, I GUESS I HAVE TO INSTALL THE NVIDIA DRIVERS FROM THE BEGGINING AND THE PROBLEM IS THAT I HAVE THEM DOWNLOADED ON MY PENDRIVE BUT I DONīT KNOW HOW TO SEE THEM ON MY PENDRIVE.

I DONīT KNOW IF I AM CLEAR ENOUGH BUT ALL I WANT TO DO IS EITHER TO RUN THE COMMAND ĻSH NVIDIA.....RUN -KĻ FROM MY PENDRIVE OR MOVE THE COPY THE FILE SOMEWHERE ON MY HARD DIDK AND RUN IT FROM THERE.

VERY CONFUSED, AWAITING FOR YOUR HELP.

REGARDS,
PETROS
 
Old 04-15-2007, 11:59 PM   #2
Buto
Member
 
Registered: Sep 2004
Location: So Cal
Distribution: Slackware 12
Posts: 60

Rep: Reputation: 16
You may have to mount your pendrive. From my experience it's /dev/sda1, but I know for some drives it's on /dev/sda4.
 
Old 04-16-2007, 12:11 AM   #3
PETROSHP
LQ Newbie
 
Registered: Jan 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Buto
You may have to mount your pendrive. From my experience it's /dev/sda1, but I know for some drives it's on /dev/sda4.
I TRY TO MOUNT AS /DEV/SDB1 BUT I GET THE FOLLOWING:
MOUNT:CANīT FIND /DEV/SDB1 IN /ETC/FSTAB OR /ETC/MTAB

WHEN I GO TO /DEV/DISK/BY-LABEL/ I CAN SEE THE NAME OF MY PENDRIVE LISTED THERE
 
Old 04-16-2007, 12:27 AM   #4
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,832

Rep: Reputation: 259Reputation: 259Reputation: 259
Turn on the machine, let it boot, insert the USB drive, type:

dmesg | tail

and look where the drive is. I have found it is usually sdx, and some partition on that. You can also do:

cd /dev
ls sd*

plug in the drive

ls sd*

again and look what's different after the drive is plugged in.
 
Old 04-16-2007, 01:53 AM   #5
PETROSHP
LQ Newbie
 
Registered: Jan 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by AwesomeMachine
Turn on the machine, let it boot, insert the USB drive, type:

dmesg | tail

and look where the drive is. I have found it is usually sdx, and some partition on that. You can also do:

cd /dev
ls sd*

plug in the drive

ls sd*

again and look what's different after the drive is plugged in.
the difference, once i plugged my pendrive in, is that it appears to be sdb sdb1 sdc
the thing is that this is not a directory so i cannot enter and see the files included in it. And thatīs the Q???
Thanks for ur feedback anyway!!
 
Old 04-16-2007, 06:00 AM   #6
PETROSHP
LQ Newbie
 
Registered: Jan 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PETROSHP
the difference, once i plugged my pendrive in, is that it appears to be sdb sdb1 sdc
the thing is that this is not a directory so i cannot enter and see the files included in it. And thatīs the Q???
Thanks for ur feedback anyway!!
SO I GUESS, MY QUESTION IS SO STUPID THAT NO ONE BOTHERS TO REPLY OR THEREīS NO WAY I CAN SEE THE FILE I HAVE IN MY PENDRIVE AND USE IT EVEN THO MY X SERVER IS NOT RUNNING!!!
 
Old 04-16-2007, 06:38 AM   #7
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
Have patience! (also, your CAPS-LOCK key seems to be stuck )

sdb is the whole device. sdb1 is the first partition on it. While this may seem a little pointless for a pen drive with only one partition, it becomes relevant for hard drives with more than one partition. sdc is a different device.

To see what the device is, after plugging it in, type 'dmesg | tail'. This shows the last few lines output by the kernel. It should have some output saying something like
Code:
[17179721.452000] usb 3-1: new high speed USB device using ehci_hcd and address 5
[17179721.604000] usb 3-1: configuration #1 chosen from 1 choice
[17179721.604000] scsi1 : SCSI emulation for USB Mass Storage devices
[17179721.604000] usb-storage: device found at 5
[17179721.604000] usb-storage: waiting for device to settle before scanning
[17179726.604000] usb-storage: device scan complete
[17179726.608000]   Vendor:           Model: USB MEMORY BAR    Rev: 1000
[17179726.608000]   Type:   Direct-Access                      ANSI SCSI revision: 00
[17179726.612000] SCSI device sdc: 498688 512-byte hdwr sectors (255 MB)
[17179726.612000] sdc: Write Protect is off
[17179726.612000] sdc: Mode Sense: 43 00 00 00
[17179726.612000] sdc: assuming drive cache: write through
[17179726.616000] SCSI device sdc: 498688 512-byte hdwr sectors (255 MB)
[17179726.616000] sdc: Write Protect is off
[17179726.616000] sdc: Mode Sense: 43 00 00 00
[17179726.616000] sdc: assuming drive cache: write through
[17179726.616000]  sdc: sdc1
[17179726.852000] sd 1:0:0:0: Attached scsi removable disk sdc
[17179726.852000] sd 1:0:0:0: Attached scsi generic sg2 type 0
This tells you which device the drive has appeared as. Again, this is important when you have more than one device attached. Whichever one is plugged in first will get the first letter (say sdb for the sake of argument). The next one will get a different letter, e.g. sdc.

To mount a drive, try looking up the "mount" command. I usually use a command like this:
Code:
root@localhost:~ # mount -t vfat -o uid=username,gid=groupname,noexec,dmask=0022,fmask=0133,sync /dev/sdc1 /mnt/usbdisk
If you hunt around for information on the mount command (e.g. by using 'man mount' or searching this forum) you can find out what the options mean. I'm not going through it here because it's been asked many times before.

If you're running in graphical mode, most recent distros, probably including SuSE, will detect that you have connected a USB drive and offer to automount it for you.

Hope this helps.
 
Old 04-16-2007, 07:01 AM   #8
PETROSHP
LQ Newbie
 
Registered: Jan 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Gethyn
Have patience! (also, your CAPS-LOCK key seems to be stuck )

sdb is the whole device. sdb1 is the first partition on it. While this may seem a little pointless for a pen drive with only one partition, it becomes relevant for hard drives with more than one partition. sdc is a different device.

To see what the device is, after plugging it in, type 'dmesg | tail'. This shows the last few lines output by the kernel. It should have some output saying something like
Code:
[17179721.452000] usb 3-1: new high speed USB device using ehci_hcd and address 5
[17179721.604000] usb 3-1: configuration #1 chosen from 1 choice
[17179721.604000] scsi1 : SCSI emulation for USB Mass Storage devices
[17179721.604000] usb-storage: device found at 5
[17179721.604000] usb-storage: waiting for device to settle before scanning
[17179726.604000] usb-storage: device scan complete
[17179726.608000]   Vendor:           Model: USB MEMORY BAR    Rev: 1000
[17179726.608000]   Type:   Direct-Access                      ANSI SCSI revision: 00
[17179726.612000] SCSI device sdc: 498688 512-byte hdwr sectors (255 MB)
[17179726.612000] sdc: Write Protect is off
[17179726.612000] sdc: Mode Sense: 43 00 00 00
[17179726.612000] sdc: assuming drive cache: write through
[17179726.616000] SCSI device sdc: 498688 512-byte hdwr sectors (255 MB)
[17179726.616000] sdc: Write Protect is off
[17179726.616000] sdc: Mode Sense: 43 00 00 00
[17179726.616000] sdc: assuming drive cache: write through
[17179726.616000]  sdc: sdc1
[17179726.852000] sd 1:0:0:0: Attached scsi removable disk sdc
[17179726.852000] sd 1:0:0:0: Attached scsi generic sg2 type 0
This tells you which device the drive has appeared as. Again, this is important when you have more than one device attached. Whichever one is plugged in first will get the first letter (say sdb for the sake of argument). The next one will get a different letter, e.g. sdc.

To mount a drive, try looking up the "mount" command. I usually use a command like this:
Code:
root@localhost:~ # mount -t vfat -o uid=username,gid=groupname,noexec,dmask=0022,fmask=0133,sync /dev/sdc1 /mnt/usbdisk
If you hunt around for information on the mount command (e.g. by using 'man mount' or searching this forum) you can find out what the options mean. I'm not going through it here because it's been asked many times before.

If you're running in graphical mode, most recent distros, probably including SuSE, will detect that you have connected a USB drive and offer to automount it for you.

Hope this helps.
Sorry for my CAPS LOCK that is because I am working at the same time and we only use capitals >>> the problem is not to mount it, becoz I see it is mounted if I go to /dev/by-label/ and i see it there!!! The thing is how to copy the file tha it has there on my /home/petros/ so I can run the file (NVIDIA drivers) and get my X server back and running again!!!

thanks for ur time anyway
 
Old 04-16-2007, 03:03 PM   #9
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
/dev/sdc1 is not a mount point. It's a device node. To access a drive, you must mount it to a pre-existing directory. The /dev/sdc1 in the example mount command I posted tells the system which drive it's supposed to mount, based on the drive's device node. The /mnt/usbdisk is the directory I chose to mount it to. The other options specify a variety of things, including the filesystem on the drive. While all partitions will have device nodes and appear in /dev, the system doesn't know what filesystems are on them, and so on, so it needs to be told.

To see what drives you currently have mounted, use the mount command without any arguments. You should get an output something like this:
Code:
user@localhost:~$ mount
/dev/sda9 on / type reiserfs (rw,noatime,notail)
/dev/sdc1 on /mnt/usbdisk type vfat (rw,dmask=0022,fmask=0133,noexec,sync)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.17-11-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
As you can see in the first line of output, I have a partition at /dev/sda9, which is mounted as the root folder. The next line down is the USB drive, mounted as mentioned earlier. Unless your USB drive appears in this list, you will not be able to access it. The rest of the entries are system virtual filesystems of various kinds, and should be left alone!

Once the drive is mounted, you can copy files using the "cp" command.

Last edited by Gethyn; 04-16-2007 at 03:06 PM.
 
Old 04-16-2007, 11:39 PM   #10
PETROSHP
LQ Newbie
 
Registered: Jan 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Gethyn
/dev/sdc1 is not a mount point. It's a device node. To access a drive, you must mount it to a pre-existing directory. The /dev/sdc1 in the example mount command I posted tells the system which drive it's supposed to mount, based on the drive's device node. The /mnt/usbdisk is the directory I chose to mount it to. The other options specify a variety of things, including the filesystem on the drive. While all partitions will have device nodes and appear in /dev, the system doesn't know what filesystems are on them, and so on, so it needs to be told.

To see what drives you currently have mounted, use the mount command without any arguments. You should get an output something like this:
Code:
user@localhost:~$ mount
/dev/sda9 on / type reiserfs (rw,noatime,notail)
/dev/sdc1 on /mnt/usbdisk type vfat (rw,dmask=0022,fmask=0133,noexec,sync)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.17-11-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
As you can see in the first line of output, I have a partition at /dev/sda9, which is mounted as the root folder. The next line down is the USB drive, mounted as mentioned earlier. Unless your USB drive appears in this list, you will not be able to access it. The rest of the entries are system virtual filesystems of various kinds, and should be left alone!

Once the drive is mounted, you can copy files using the "cp" command.
GETHYN THANKS A LOT... UīVE BEEN A VERY GOOD GUIDE.

I FINALLY MOUNT IT WITH THE LABEL NAME ONLY.
HAVE X-SERVER BACK ON LINE AGAIN..

TAKE CARE

TILL THE NEXT Q

PETROS
 
  


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
Howto move entire directories ? coolcargo Linux - Newbie 18 03-04-2007 12:30 AM
How to copy file to pendrive ? LinuxNewbie999 Linux - Newbie 1 11-18-2006 06:32 PM
How to install and configure grub on pendrive while os' are on the same pendrive? CeremCem DamnSmallLinux 0 11-07-2006 12:10 PM
"cannot change file permissions" error when moving data to and from pendrive Whiskers Mandriva 4 01-02-2005 03:49 AM
Howto move borderless Eterm/aterm rmanocha Linux - Software 3 03-31-2004 01:02 PM


All times are GMT -5. The time now is 10:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration