 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

23rd March 2011, 09:42 PM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 9

|
|
|
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
|

23rd March 2011, 10:02 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,110

|
|
|
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"...
|

23rd March 2011, 10:25 PM
|
 |
Registered User
|
|
Join Date: Jul 2006
Location: Montana
Posts: 731

|
|
|
Re: finding device for USB drive
You can list your devices via
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
|

26th March 2011, 01:31 AM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 9

|
|
|
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?
|

26th March 2011, 02:01 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,128

|
|
|
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.
|

26th March 2011, 08:31 AM
|
|
Registered User
|
|
Join Date: Nov 2010
Location: Carcès, France
Age: 58
Posts: 93

|
|
|
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
|
|

26th March 2011, 12:35 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,110

|
|
|
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.
|

26th March 2011, 03:12 PM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 9

|
|
|
Re: finding device for USB drive
Solved. thanks.
m.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 01:52 (Sunday, 26-05-2013)
|
|
 |
 |
 |
 |
|
|