Fedora Linux Support Community & Resources Center
  #1  
Old 23rd March 2011, 09:42 PM
365matias Offline
Registered User
 
Join Date: Mar 2011
Posts: 9
linuxfedorafirefox
finding device for USB drive

I'm still learning about fedora so I have to ask a basic question.

How can I find the device (e.g., sda1, sda2 ...) to use so I can use a USB drive?
I do not have access to the fedora gui.

thanks,
M
Reply With Quote
  #2  
Old 23rd March 2011, 10:02 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,820
linuxfedorafirefox
Re: finding device for USB drive

The problem is that the sd names are generated in order of identification.

To see what partitions you can mount you can look in /proc/partitions.

If you give the filesystem a label, you won't have to hunt up the "new" device name, but can mount by label -- "mount LABEL=name /mnt".
This can simplify things a bit, because you can name filesystem for the function it serves - "backup", or "backup1" "backup2", "music"...
Reply With Quote
  #3  
Old 23rd March 2011, 10:25 PM
bodhi.zazen Offline
Registered User
 
Join Date: Jul 2006
Location: Montana
Posts: 731
unknownunknown
Re: finding device for USB drive

You can list your devices via

Code:
fdisk -l
You can use other tools as well, blkid will give you the uuid.

Assuming you do not have multiple usb devices , should be fairly easy to identify.
__________________
If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p
Reply With Quote
  #4  
Old 26th March 2011, 01:31 AM
365matias Offline
Registered User
 
Join Date: Mar 2011
Posts: 9
linuxfedorafirefox
Re: finding device for USB drive

fdisk -l yields:
/dev/sda1 ... Dell Utility
/dev/sda2 ... HPFS/NTFS
/dev/sda3 ... HPFS/NTFS
/dev/sda4 ... Extended
/dev/sda5 ... Linux
/dev/sda6 ... Linux LVM

I was not sure how to identify which one of these is the USB.
I tried: mount -t vfat /dev/sda1 /mnt/usb
I did ls /mnt/usb and this gave me:
autoexec.bat
autoexec.up
command.com
config.sys
config.up
...
But, none of the files from the usb-drive were listed. So, what's going on with this?
Reply With Quote
  #5  
Old 26th March 2011, 02:01 AM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,103
linuxfirefox
Re: finding device for USB drive

The output from fdisk -l that you showed is your hard disk drive, /dev/sda. You are showing no USB storage device. It would have been better if you had copied and pasted the entire output from your fdisk command. If you plugged a USB storage device into a USB port, such as USB thumb drive, it should should show in the output of fdisk -l as /dev/sdb.

Here is the output, excerpted, from fdisk -l after I plug in a USB 1GB thumb drive.
Code:
Disk /dev/sdb: 1031 MB, 1031798272 bytes
255 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x91f72d24

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         126     1007584    6  FAT16
Partition 1 has different physical/logical endings:
     phys=(124, 254, 63) logical=(125, 112, 50)
To mount that on mount point /mnt/usb, I would:
Code:
mount -t vfat /dev/sdb1 /mnt/usb -o rw,uid=500,gid=500
Each storage device will be identified in order /dev/sda, /dev/sdb, /dev/sdc, etc. The number at the end indicates the partition number on that device.

Last edited by PabloTwo; 26th March 2011 at 02:07 AM.
Reply With Quote
  #6  
Old 26th March 2011, 08:31 AM
didier83 Offline
Registered User
 
Join Date: Nov 2010
Location: Carcès, France
Age: 60
Posts: 96
linuxfedorachrome
Re: finding device for USB drive

First you have to detect if your drive has been correctly detected.

1-connect your drive
2- use dmesg command

you should get something like:

Quote:
[24726.254020] usb 1-4: new high speed USB device using ehci_hcd and address 10
[24726.369883] usb 1-4: New USB device found, idVendor=10d6, idProduct=1101
[24726.369889] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24726.369892] usb 1-4: Product: HS USB FlashDisk
[24726.369895] usb 1-4: Manufacturer: ACTIONS
[24726.369898] usb 1-4: SerialNumber: 4512482adf0fe
[24726.373777] scsi16 : usb-storage 1-4:1.0
[24727.374892] scsi 16:0:0:0: Direct-Access ACTIONS HS USB FlashDisk 2.00 PQ: 0 ANSI: 0 CCS
[24727.376305] sd 16:0:0:0: Attached scsi generic sg1 type 0
[24727.377899] sd 16:0:0:0: [sdb] 16733105 512-byte logical blocks: (8.56 GB/7.97 GiB)
[24727.378692] sd 16:0:0:0: [sdb] Write Protect is off
[24727.378701] sd 16:0:0:0: [sdb] Mode Sense: 00 c0 00 00
[24727.378706] sd 16:0:0:0: [sdb] Assuming drive cache: write through
[24727.384033] sd 16:0:0:0: [sdb] Assuming drive cache: write through
[24727.384046] sd[24726.254020] usb 1-4: new high speed USB device using ehci_hcd and address 10
[24726.369883] usb 1-4: New USB device found, idVendor=10d6, idProduct=1101
[24726.369889] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24726.369892] usb 1-4: Product: HS USB FlashDisk
[24726.369895] usb 1-4: Manufacturer: ACTIONS
[24726.369898] usb 1-4: SerialNumber: 4512482adf0fe
[24726.373777] scsi16 : usb-storage 1-4:1.0
[24727.374892] scsi 16:0:0:0: Direct-Access ACTIONS HS USB FlashDisk 2.00 PQ: 0 ANSI: 0 CCS
[24727.376305] sd 16:0:0:0: Attached scsi generic sg1 type 0
[24727.377899] sd 16:0:0:0: [sdb] 16733105 512-byte logical blocks: (8.56 GB/7.97 GiB)
[24727.378692] sd 16:0:0:0: [sdb] Write Protect is off
[24727.378701] sd 16:0:0:0: [sdb] Mode Sense: 00 c0 00 00
[24727.378706] sd 16:0:0:0: [sdb] Assuming drive cache: write through
[24727.384033] sd 16:0:0:0: [sdb] Assuming drive cache: write through
[24727.384046] sdb:
[24727.400059] sd 16:0:0:0: [sdb] Assuming drive cache: write through
[24727.400072] sd 16:0:0:0: [sdb] Attached SCSI removable disk
b:
[24727.400059] sd 16:0:0:0: [sdb] Assuming drive cache: write through
[24727.400072] sd 16:0:0:0: [sdb] Attached SCSI removable disk
Reply With Quote
  #7  
Old 26th March 2011, 12:35 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,820
linuxfedorafirefox
Re: finding device for USB drive

Possibly the easiest way is to "cat /proc/partitions" before you plug the disk in.

Plug the disk in.

cat /proc/partitions again.

The last entry is normally the new disk.

If you need to you can save the /proc/partitions file first, then diff that against the /proc/partitions after you plug it in. The new entry is the only thing that will be printed.
Reply With Quote
  #8  
Old 26th March 2011, 03:12 PM
365matias Offline
Registered User
 
Join Date: Mar 2011
Posts: 9
linuxfedorafirefox
Re: finding device for USB drive

Solved. thanks.
m.
Reply With Quote
Reply

Tags
device, drive, finding, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
F8 not finding device eth0, no network connection, new user... juanzo007 Servers & Networking 29 23rd January 2008 04:16 PM
Finding a Share drive on a Windows Box Coyote_Tech Servers & Networking 1 4th December 2007 08:48 PM
Not finding second hard drive tschiska Hardware & Laptops 5 22nd August 2007 08:29 PM
Problem finding USB device (pen drive) pluster Hardware & Laptops 7 17th November 2004 10:28 PM


Current GMT-time: 01:16 (Friday, 29-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat