You are not logged in.

#1 2015-07-16 05:38:48

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

[SOLVED]Unable to mount flash drive.

I have three flash drives, but one of them won't mount unless it is completely blank, as in no partitions, or any format other than dos. If I make any partitions with a gpt table using cfdisk, it throws

mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

but it is only on that specific flash drive, which has worked in the past. I do believe it is worth noting that I did recently have Arch and Grub installed in hopes of making a portable Arch installation, which worked. I don't know why I formatted it and removed the install, but not for whatever reason I can't use a gpt partition table and mount it. I would really like to be able to use this flash drive, so any help is greatly appreciated!

Last edited by 3p1k5auc3 (2015-07-19 19:28:43)


Real programmers use a magnet and a steady hand.

Offline

#2 2015-07-16 06:59:14

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,672
Website

Re: [SOLVED]Unable to mount flash drive.

# sgdisk --zap-all /dev/sdX

Para todos todo, para nosotros nada

Offline

#3 2015-07-17 04:27:58

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

Re: [SOLVED]Unable to mount flash drive.

After running sgdisk, the output was

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Warning! One or more CRCs don't match. You should repair the disk!

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.

After running it again, I get

Creating new GPT entries.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.

However, after creating a GPT table, I still get the same error when trying to mount.


Real programmers use a magnet and a steady hand.

Offline

#4 2015-07-17 07:11:03

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,672
Website

Re: [SOLVED]Unable to mount flash drive.

Sounds like the flash drive may be dying -- is it old?


Para todos todo, para nosotros nada

Offline

#5 2015-07-17 07:27:55

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

Re: [SOLVED]Unable to mount flash drive.

No, not really. Probably a few months. Would wiping an Arch/Grub install off of it with mkfs have anything to do with it?


Real programmers use a magnet and a steady hand.

Offline

#6 2015-07-17 21:20:44

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,672
Website

Re: [SOLVED]Unable to mount flash drive.

3p1k5auc3 wrote:

Would wiping an Arch/Grub install off of it with mkfs have anything to do with it?

What command did you use, exactly?

Have you tried:

# dd if=/dev/zero of=/dev/sdX bs=1M counts=$LOTS

Para todos todo, para nosotros nada

Offline

#7 2015-07-17 23:32:32

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

Re: [SOLVED]Unable to mount flash drive.

I used sudo mkfs.ext4 /dev/sdb I believe.
When I run your command I get

dd: unrecognized operand 'counts='
Try 'dd --help' for more information.

and after running dd --help, I saw that there was a command called count. After changing counts to count, I get

dd: invalid number ''

which I assume means that my variable $LOTS is blank. Any other suggestions?


Real programmers use a magnet and a steady hand.

Offline

#8 2015-07-17 23:34:55

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,672
Website

Re: [SOLVED]Unable to mount flash drive.

Sorry, typo...

# dd if=/dev/zero of=/dev/sdX bs=1M count=$LOTS

Replace "X" with the drive letter assigned to your flash drive and replace "$LOTS" with a number.


Para todos todo, para nosotros nada

Offline

#9 2015-07-17 23:46:02

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

Re: [SOLVED]Unable to mount flash drive.

After running

dd if=/dev/zero of=/dev/sdb bs=1M count=5

I get

5+0 records in
5+0 records out
5242880 bytes (5.2 MB) copied, 0.130432 s, 40.2 MB/s

after running

mount /dev/sdb /mnt

I get

mount: /dev/sdb is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

Real programmers use a magnet and a steady hand.

Offline

#10 2015-07-17 23:49:50

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,672
Website

Re: [SOLVED]Unable to mount flash drive.

Can you now create a new partition table with gdisk (or similar)?

What does `dmesg|tail` say?


Para todos todo, para nosotros nada

Offline

#11 2015-07-17 23:54:47

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

Re: [SOLVED]Unable to mount flash drive.

dmesg|tail

[24863.615338] usb 2-1: USB disconnect, device number 5
[24919.072851] usb 3-1.3: new high-speed USB device number 9 using ehci-pci
[24919.160109] usb-storage 3-1.3:1.0: USB Mass Storage device detected
[24919.160186] scsi host9: usb-storage 3-1.3:1.0
[24920.392531] scsi 9:0:0:0: Direct-Access     PNY      USB 3.0 FD       1100 PQ: 0 ANSI: 6
[24920.394575] sd 9:0:0:0: [sdb] 124999680 512-byte logical blocks: (63.9 GB/59.6 GiB)
[24920.395707] sd 9:0:0:0: [sdb] Write Protect is off
[24920.395713] sd 9:0:0:0: [sdb] Mode Sense: 22 00 00 00
[24920.396865] sd 9:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[24920.408970] sd 9:0:0:0: [sdb] Attached SCSI removable disk

And yes, I use Cfdisk to make my partitions. I am able to make partition tables. I used to be able to mount it without any partition tables, right after mkfs, but now I can't mount it at all. I am going to leave for about 6 hours soon, so I won't be able to respond with any output, but I will have my phone and will be able to answer basic questions. Feel free to ask though, and I will respond with any additional information when I get back.


Real programmers use a magnet and a steady hand.

Offline

#12 2015-07-18 15:07:12

tsaber
Member
Registered: 2015-04-10
Posts: 27

Re: [SOLVED]Unable to mount flash drive.

so you dd it and immediately thereafter you try to mount?

I think you should dd it, then create a new partition table and then when everything is set up you can mount it.

Offline

#13 2015-07-18 19:32:33

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

Re: [SOLVED]Unable to mount flash drive.

I have tried both, neither worked.


Real programmers use a magnet and a steady hand.

Offline

#14 2015-07-18 22:08:00

gsgleason
Member
Registered: 2012-10-08
Posts: 71

Re: [SOLVED]Unable to mount flash drive.

It sounds like he's trying to mount after zeroing the beginning of the device.

Offline

#15 2015-07-19 19:28:25

3p1k5auc3
Member
Registered: 2015-05-01
Posts: 30

Re: [SOLVED]Unable to mount flash drive.

Alright, I fixed my problem. After running verify with sgdisk, it said that I needed to repair my flash drive. After a quick google search, I found an Arch forum post that points to this wiki link: https://wiki.archlinux.org/index.php/US … _USB_drive.
My problem was after creating a partition (e.g. sdb1, sdb2, etc) I was trying to mount sdb, not the partitions. The exact commands I used were

 dd count=1 bs=512 if=/dev/zero of=/dev/sdx && sync
cfdisk /dev/sdx
mkfs.ext4 /dev/sdb1
mount /dev/sdb1 /mnt/flash

If you are interested in the forum post I found, go here: https://bbs.archlinux.org/viewtopic.php?id=175496

Also, Head_on_a_Stick, thank you once again for your help. My first post on the Arch forums was about trying to get Chromium to launch, and you were the one who helped me with that. Keep up the good work!
P.S. That thread can be found here: https://bbs.archlinux.org/viewtopic.php?id=197110


Real programmers use a magnet and a steady hand.

Offline

Board footer

Powered by FluxBB