LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-27-2015, 02:44 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post PenDrive Can't Mount.


Hello.
I have a PenDrive that when Plugged it to the system, Linux can't open it and show it as "Generic".

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 046d:c05a Logitech, Inc. Optical Mouse M90
Bus 003 Device 002: ID 8087:8008 Intel Corp.
Bus 004 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 008: ID 058f:1234 Alcor Micro Corp. Flash Drive

$ sudo mkfs.vfat /dev/sdc
mkfs.vfat 3.0.13 (30 Jun 2012)
/dev/sdc: No medium found

I guess my Pendrive Corrupted but can I have any hope?

Tnx.
 
Old 12-27-2015, 03:26 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Okay,
Let's explore, enter this:
Code:
fdisk -l
in the console, as root...
Paste back what it shows
Melissa
 
Old 12-27-2015, 04:08 AM   #3
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
from http://mirrors1.kernel.org/slackware...README_USB.TXT
Code:
    Take care about which device actually is your USB stick !!! The next 
command will render all data on /dev/sdx inaccessible !!!

(1) First, wipe the bootsector of the USB stick:

      dd if=/dev/zero of=/dev/sdx bs=512 count=1

(2) Then, create a new FAT32 partition on the stick and write a FAT32 
    filesystem on it (vfat or type b in fdisk terminology):

fdisk /dev/sdx <<EOF
n
p
1


t
b
w
EOF
mkdosfs -F32 /dev/sdx1

    The 10 lines starting with 'fdisk /dev/sdx <<EOF' and ending with the 
    single word 'EOF' is actually one single command spread over ten lines,
    including the two empty lines in the middle.  This format is called a
    'here-document'.  It allows you to use a command which expects interactive
    input in a non-interactive way.  If you're uncomfortable with the above
    command you can just run

      fdisk /dev/sdx

    and create a partition interactively :-)

==========================================================
Author:   Eric Hameleers <alien@slackware.com> 17-feb-2011
Blog post: http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/
Wiki URL: http://www.slackware.com/~alien/dokuwiki/doku.php?id=slackware:usbboot
 
Old 12-27-2015, 09:02 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Before you do the above, with the attendant dangers, try running dmesg as root and seeing whether it sees the pen drive.

Dmesg outputs a lot of data, so you may want to pipe it to a file and then examine the file in a text editor. Here are some examples.

Code:
bash-4.3# dmesg | grep sd   <---This would show all the drives, as "hd" is deprecated.  Grep will only catch the lines including the string, "sd."
bash-4.3# dmesg > dmesg.txt   <---This pipes the entire output of dmesg to a file named "dmesg.txt"
bash-4.3# vim dmesg.txt   <---This opens it in vim.  Use the text editor of your choice.
Here's a portion of the second command relating to an external USB drive on this here computer; it's not a pen drive, but the principle is the same:

Code:
[    6.992929] usb 1-5: Product: FANTOM DRIVE    
[    6.993389] usb 1-5: Manufacturer: MICRONET
[    6.993845] usb 1-5: SerialNumber: 533248474A39465A39303134

Last edited by frankbell; 12-27-2015 at 09:05 PM.
 
Old 01-16-2016, 03:27 AM   #5
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by Thor_2.0 View Post
Okay,
Let's explore, enter this:
Code:
fdisk -l
in the console, as root...
Paste back what it shows
Melissa

~$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 1 976773167 488386583+ ee GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00d600d6

Device Boot Start End Blocks Id System
/dev/sdb1 63 419425019 209712478+ 7 HPFS/NTFS/exFAT
Partition 1 does not start on physical sector boundary.
/dev/sdb2 419425020 976773167 278674074 7 HPFS/NTFS/exFAT
Partition 2 does not start on physical sector boundary.
 
Old 01-16-2016, 03:31 AM   #6
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by frankbell View Post
Before you do the above, with the attendant dangers, try running dmesg as root and seeing whether it sees the pen drive.

Dmesg outputs a lot of data, so you may want to pipe it to a file and then examine the file in a text editor. Here are some examples.

Code:
bash-4.3# dmesg | grep sd   <---This would show all the drives, as "hd" is deprecated.  Grep will only catch the lines including the string, "sd."
bash-4.3# dmesg > dmesg.txt   <---This pipes the entire output of dmesg to a file named "dmesg.txt"
bash-4.3# vim dmesg.txt   <---This opens it in vim.  Use the text editor of your choice.
Here's a portion of the second command relating to an external USB drive on this here computer; it's not a pen drive, but the principle is the same:

Code:
[    6.992929] usb 1-5: Product: FANTOM DRIVE    
[    6.993389] usb 1-5: Manufacturer: MICRONET
[    6.993845] usb 1-5: SerialNumber: 533248474A39465A39303134


$ sudo dmesg | grep sd
[ 3727.121665] sd 6:0:0:0: Attached scsi generic sg3 type 0
[ 3727.121953] sd 6:0:0:0: [sdc] 31703040 512-byte logical blocks: (16.2 GB/15.1 GiB)
[ 3727.122588] sd 6:0:0:0: [sdc] Write Protect is off
[ 3727.122596] sd 6:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 3727.123244] sd 6:0:0:0: [sdc] No Caching mode page found
[ 3727.123250] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[ 3727.125581] sd 6:0:0:0: [sdc] No Caching mode page found
[ 3727.125591] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[ 3727.126562] sdc: sdc1
[ 3727.128604] sd 6:0:0:0: [sdc] No Caching mode page found
[ 3727.128613] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[ 3727.128620] sd 6:0:0:0: [sdc] Attached SCSI removable disk
[ 3733.025632] FAT-fs (sdc1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 3847.075170] sdc: detected capacity change from 16231956480 to 0
[ 6204.812250] sd 7:0:0:0: Attached scsi generic sg3 type 0
[ 6204.812506] sd 7:0:0:0: [sdc] 1953394095 512-byte logical blocks: (1.00 TB/931 GiB)
[ 6204.813092] sd 7:0:0:0: [sdc] Write Protect is off
[ 6204.813099] sd 7:0:0:0: [sdc] Mode Sense: 1f 00 10 08
[ 6204.813695] sd 7:0:0:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA
[ 6204.842490] sdc: sdc1
[ 6204.844271] sd 7:0:0:0: [sdc] Attached SCSI disk
[11686.493120] sd 8:0:0:0: Attached scsi generic sg3 type 0
[11686.493787] sd 8:0:0:0: [sdc] Attached SCSI removable disk
 
Old 01-16-2016, 03:36 AM   #7
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by Drakeo View Post
from http://mirrors1.kernel.org/slackware...README_USB.TXT
Code:
    Take care about which device actually is your USB stick !!! The next 
command will render all data on /dev/sdx inaccessible !!!

(1) First, wipe the bootsector of the USB stick:

      dd if=/dev/zero of=/dev/sdx bs=512 count=1

(2) Then, create a new FAT32 partition on the stick and write a FAT32 
    filesystem on it (vfat or type b in fdisk terminology):

fdisk /dev/sdx <<EOF
n
p
1


t
b
w
EOF
mkdosfs -F32 /dev/sdx1

    The 10 lines starting with 'fdisk /dev/sdx <<EOF' and ending with the 
    single word 'EOF' is actually one single command spread over ten lines,
    including the two empty lines in the middle.  This format is called a
    'here-document'.  It allows you to use a command which expects interactive
    input in a non-interactive way.  If you're uncomfortable with the above
    command you can just run

      fdisk /dev/sdx

    and create a partition interactively :-)

==========================================================
Author:   Eric Hameleers <alien@slackware.com> 17-feb-2011
Blog post: http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/
Wiki URL: http://www.slackware.com/~alien/dokuwiki/doku.php?id=slackware:usbboot

~$ sudo dd if=/dev/zero of=/dev/sdc bs=512 count=1
dd: opening `/dev/sdc': No medium found

~$ sudo dd if=/dev/zero of=/dev/sdc1 bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.6831e-05 s, 19.1 MB/s

~$ sudo fdisk /dev/sdc1
fdisk: unable to read /dev/sdc1: Inappropriate ioctl for device

$ sudo mkdosfs -F32 /dev/sdc1
mkdosfs 3.0.13 (30 Jun 2012)
mkdosfs: Too few blocks for viable file system
 
Old 01-16-2016, 03:39 AM   #8
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
I did also :


$ sudo mkfs.ext3 /dev/sdc1
mke2fs 1.42.5 (29-Jul-2012)
/dev/sdc1 is not a block special device.
Proceed anyway? (y,n) y
mkfs.ext3: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.

$ sudo fsck.vfat -a /dev/sdc1
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
Logical sector size is zero.

$ sudo dumpe2fs /dev/sdc | grep superblock
dumpe2fs 1.42.5 (29-Jul-2012)
dumpe2fs: No medium found while trying to open /dev/sdc
Couldn't find valid filesystem superblock.

Last edited by hack3rcon; 01-16-2016 at 03:59 AM.
 
Old 01-16-2016, 12:16 PM   #9
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Ehm...I'm thinking...is that stick even alive? It seems like a hardware fault...
Melissa
 
Old 01-16-2016, 02:53 PM   #10
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
How about Firmware upgrade? Is it possible?
Can I find anyway for format it?
 
Old 01-16-2016, 02:53 PM   #11
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
How about Firmware upgrade? Is it possible?
Can I find anyway for format it?
 
Old 01-16-2016, 03:39 PM   #12
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
I doubt firmware upgrade for a pendrive exists...
Did you try a reformat at an other PC (library, school, work)?
Melissa
 
  


Reply



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
a mount point for a pendrive Holden Caulfield Linux - Newbie 13 11-02-2014 06:50 AM
can't mount pendrive vamsireloaded Linux - Newbie 10 02-13-2012 01:14 AM
Unable to mount pendrive nanns Linux - Newbie 3 05-27-2010 06:16 AM
pendrive mount myuran Linux - Hardware 1 04-15-2006 01:27 AM
usb pendrive mount eg72 Linux - Hardware 1 05-16-2004 11:20 AM

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

All times are GMT -5. The time now is 07:17 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