LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2015, 06:50 AM   #1
esraam
Member
 
Registered: Apr 2015
Posts: 110

Rep: Reputation: Disabled
Usb flash memory can't work


I am using scientific linux 6 .
I needed to use a USB flash memory but I am unable to open the flash folder .
Also plugging the flash into the cpu doen't open a folder to start the flash .
How can I use the flash ?
Can some body help ?
thanks all
 
Old 06-08-2015, 07:37 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
When you plug the flash drive into your system, check your system log to determine if the drive is seen by your system at all. You likely have to manually mount the file system to use it, and in order to do that you'll need to know what device it has been discovered as. Typically if you type "dmesg" you'll get a dump of your system log, so I do that before and after inserting a drive. This way I see the log before I put the drive in, and then I see the updates after I put the drive in. You should see that the drive was detected as something like /dev/sdb, /dev/sdc, /dev/sdd, one of those letters or a further along letter in the alphabet, but probably not sda. And then you mount that drive based on the information you know about the file system on that drive.
 
Old 06-08-2015, 07:46 AM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Yes, the trailing lines of dmesg show if usb drive has been detected and allotted which block device as said in above post. And if you have a partition in it then the block device for that partition would also be shown along.

Do you have a filesystem in it like FAT, NTFS, EXT2 and ...?
 
Old 06-08-2015, 05:18 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,973

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Could be user permissions too.
 
Old 06-09-2015, 04:51 AM   #5
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
When you plug the flash drive into your system, check your system log to determine if the drive is seen by your system at all. You likely have to manually mount the file system to use it, and in order to do that you'll need to know what device it has been discovered as. Typically if you type "dmesg" you'll get a dump of your system log, so I do that before and after inserting a drive. This way I see the log before I put the drive in, and then I see the updates after I put the drive in. You should see that the drive was detected as something like /dev/sdb, /dev/sdc, /dev/sdd, one of those letters or a further along letter in the alphabet, but probably not sda. And then you mount that drive based on the information you know about the file system on that drive.
the difference between before and after is this part :

[
usb 3-8: new high speed USB device number 16 using xhci_hcd
usb 3-8: new USB device found, idvendor= 0951, id product=1613
usb 3-8: New USB device strings: Mfr=1. Product=2, SerialNumber=3
usb 3-8: ProductT101
usb 3-8: Manf .
usb 3-8: serial
usb 3-8: configuration #1 chosen from one choice
sci17: SCI emulation for USB Mass storage devices
usb-storage: device found at 16
usb-storage:waiting for device to settle before scanning
usb-storage: device scan complete
sci 17:0:0:0 Direct_Access
sd 17:0:0:0: Attached scsi generic sg4 type 0
sd 17:0:0:0: [sdd] 1566720 512-byte logical blocks
sd 17:0:0:0: [sdd] Write protect is off
sd 17:0:0:0: [sdd] Mode Sense : 23 00 00 00
sd 17:0:0:0: [sdd] Assuming drive cache : write through
sd 17:0:0:0: [sdd] Assuming drive cache : write through
sdd: sddl
sd 17:0:0:0: [sdd] Assuming drive cache : write through
sd 17:0:0:0: [sdd] Attached SCSI removable disk

]


So , What command line shall I write to mount the drive and be able to use the flash ?
Thanks for your help
 
Old 06-09-2015, 04:53 AM   #6
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
Yes, the trailing lines of dmesg show if usb drive has been detected and allotted which block device as said in above post. And if you have a partition in it then the block device for that partition would also be shown along.

Do you have a filesystem in it like FAT, NTFS, EXT2 and ...?
How can I find the File system type ?
I attached the part added in the log file after inserting the drive .
What do you think I shall do then ?
thanks for your help
 
Old 06-09-2015, 04:55 AM   #7
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Could be user permissions too.
I am working as root .
The root always have all permissions , right ?
If not , how can I change the permission of the usb flash drive ?
thanks
 
Old 06-09-2015, 05:00 AM   #8
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Each time the usb drive is plugged the block file may be different. In this case it is 'sdd' or '/dev/sdd'. If the device has a partition then it would be listed like 'sdd1' or 'sdd2' ...

Reasons if only 'sdd' and not 'sdd1' is no partition present or luks device or a LVM device or no valid data or other causes.

If it shows 'sdd1' then to mount you have to run:

Code:
mount /dev/sdd1 /mnt
Otherwise you have to partition with 'fdisk' or 'parted' or some other tool.

And then make a filesystem on the partition/s.
 
Old 06-09-2015, 05:01 AM   #9
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
First poke as root and afterwards niceties can be had.
 
Old 06-09-2015, 05:09 AM   #10
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
#fdisk -l

gives the following output :

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units= cylinders of 16065* 512
Sector size
I/O size (....
Disk identifier : 0x0eb40eb4

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units= cylinders of 16065* 512
Sector size
I/O size (....
Disk identifier : 0x0eb40eb4

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units= cylinders of 16065* 512
Sector size
I/O size (....
Disk identifier : 0x000a5077

Device Boot Start End Blocks Id Sys
/dev/sdc1 * 1 64 512000 83 linux
partition 1 doesn't end on cylinder boundary
/dev/sdc2 64 121602 976248832 8e linux LVM


Disk /dev/mapper/vg_master-lv_root: 53.7 GB
255 heads, 63 sectors/track, 6527 cylinders
Units= cylinders of 16065* 512
Sector size
I/O size (....
Disk identifier : 0x00000000

Disk /dev/mapper/vg_master-lv_swap: 16.9 GB
255 heads, 63 sectors/track, 6527 cylinders
Units= cylinders of 16065* 512
Sector size
I/O size (....
Disk identifier : 0x00000000

Disk /dev/md126: 1000.2 GB
2 heads, 4 sectors/track, 244187136 cylinders
Units= cylinders of 16065* 512
Sector size
I/O size (....
Disk identifier : 0x0eb40eb4

Disk /dev/mapper/vg_master-lv_home: 929.1 GB
255 heads, 63 sectors/track, 6527 cylinders
Units= cylinders of 16065* 512
Sector size
I/O size (....
Disk identifier : 0x00000000

Disk /dev/sde: 8021 MB
5 heads, 32 sectors/track, 97920 cylinders
Units= cylinders of 160* 512
Sector size
I/O size (....
Disk identifier : 0x00000000

Device Boot Start End Blocks Id Sys
/dev/sde1 * 51 97920 7829568 b W95 FAT32



Still can't know what commands to use to mount the usb ?
Can somebody help ?
thanks

Last edited by esraam; 06-09-2015 at 06:06 AM.
 
Old 06-09-2015, 05:14 AM   #11
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
Each time the usb drive is plugged the block file may be different. In this case it is 'sdd' or '/dev/sdd'. If the device has a partition then it would be listed like 'sdd1' or 'sdd2' ...

Reasons if only 'sdd' and not 'sdd1' is no partition present or luks device or a LVM device or no valid data or other causes.

If it shows 'sdd1' then to mount you have to run:

Code:
mount /dev/sdd1 /mnt
Otherwise you have to partition with 'fdisk' or 'parted' or some other tool.

And then make a filesystem on the partition/s.
I posted the output of using fdisk -l

Still can't recognize what is the name of my device ?
sorry for my misunderstanding and many thanks for your help
 
Old 06-09-2015, 05:15 AM   #12
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
First poke as root and afterwards niceties can be had.
sorry ?
I couldn't understand
 
Old 06-09-2015, 05:35 AM   #13
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Code:
Disk /dev/sdd: 8021 MB
W95 FAT32
That disk is FAT32.

I would recommend you have a directory such as /mnt owned by root and then issue a mount command such as:
Code:
$ sudo mount -t vfat /dev/sdd1 /mnt
And this will stand to mount that disk under the /mnt directory. To later un-mount it you would issue something like:
Code:
$ sudo umount /mnt

Last edited by rtmistler; 06-09-2015 at 05:36 AM.
 
Old 06-09-2015, 06:14 AM   #14
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Code:
Disk /dev/sdd: 8021 MB
W95 FAT32
That disk is FAT32.

I would recommend you have a directory such as /mnt owned by root and then issue a mount command such as:
Code:
$ sudo mount -t vfat /dev/sdd1 /mnt
And this will stand to mount that disk under the /mnt directory. To later un-mount it you would issue something like:
Code:
$ sudo umount /mnt
well , I wrote the above command line ,
# mount -t vfat /dev/sdd1 /mnt
and then opened the /mnt directory but it was empty
how can I open the flash drive now ?
 
Old 06-09-2015, 06:25 AM   #15
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by esraam View Post
well , I wrote the above command line ,
# mount -t vfat /dev/sdd1 /mnt
and then opened the /mnt directory but it was empty
how can I open the flash drive now ?
After the point where you issued that command, you can then re-issue just "mount" and that will show you a list of what is mounted versus not. The presumption is that you'll see something similar to:
Code:
/dev/sdd1 on /mnt type vfat (bunch of other stuff)
If you do not, then the mount command did not succeed. If you do see that it is mounted on /mnt and when you perform an "ls" command there's nothing shown in /mnt, then it may be that the USB drive is empty. Do you know that there are any files on that USB drive? Note you can also use the "df" command to ascertain how much data is on a particular drive and partition:
Code:
df /dev/sdd
df /dev/sdd1
You can also use the "du" command to determine how large the information is on a given mounted drive:
Code:
du -S /dev/sdd1
If that shows as zero, then there are simply no files there. The first thing to do is verify that the mount succeeded. I'm assuming there was no error report after the mount command?
 
  


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
USB flash memory godfather9112 Linux - Hardware 2 10-20-2014 08:24 PM
USB flash memory laryy Slackware 8 07-17-2007 07:35 PM
USB memory, Compact Flash, Memory Stick energiza Linux - Hardware 2 08-22-2006 09:29 PM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 05:39 PM
Yet another USB/Flash Memory can't get to work problem maddogdelta Linux - Hardware 7 05-15-2004 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:48 PM.

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
Open Source Consulting | Domain Registration