LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   USB Flash drive stopped working after Windows exposure (https://www.linuxquestions.org/questions/linux-general-1/usb-flash-drive-stopped-working-after-windows-exposure-164682/)

oot 03-31-2004 04:32 PM

USB Flash drive stopped working after Windows exposure
 
I recently got an Apacer HT202 USB Flash drive. I followed the setup instructions for Linux in the manual (fdisk /dev/sda, delete all partitions, create one primary dos partition, save, exit, mkfs.vfat /dev/sda1 (at least, that's what the manual said to do... I didn't have a mkfs.vfat so I used mkfs.msdos instead)) and it worked beautifully. I could mount and unmount /dev/sda1 just like any other device.

Today, I took it to school with me, and used it with a Windows 98 computer there. The Windows computer insisted that it was not formatted, and (since I didn't have any important data on it) I allowed it to format it for me. Everything went fine, and it worked at school. When I got back home to my Linux machine, it didn't work anymore.

I can see it if I type in "cat /proc/scsi/scsi", but I can't mount /dev/sda1. If I just try "mount /dev/sda1 /flashdrive", the way I used to, I now get the error:
/dev/sda1: Input/output error
mount: you must specify the filesystem type

If I try "mount -t vfat /dev/sda1 /flashdrive" "mount -t msdos /dev/sda1 /flashdrive" or "mount -t umsdos /dev/sda1 /flashdrive", I get the error:
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
or too many mounted file systems

I tried to take a peek at the partition situation on the drive with fdisk (although I only formatted with the Windows computer, not partitioned). Unfortunately, "fdisk /dev/sda" now gives me the error:
Unable to read /dev/sda

I have tried the same mount commands with /dev/sda* /dev/sdb* /dev/sdc* and /dev/sdd* and had no success with any of them (with the exception of /dev/sda[1-4], which gave the error already mentioned above, they all were "not a valid block device"). I have also tried to fdisk /dev/sda /dev/sdb /dev/sdc and /dev/sdd, with /dev/sda saying "unable to read" and the others saying "unable to open".

The drive still works with my parents' Windows 98 machine. How can I get it working with my Linux box again? Is it possible to use it for both Windows and Linux (and how)?

oot 03-31-2004 09:18 PM

Nevermind, got it fixed.

In case anyone else finds this post while searching for a solution to the same problem, the problem was that when I partitioned the drive with fdisk, I left it as type 83 (Linux partition), and then Windows formatted it. I couldn't get fdisk to even look at the drive on Slackware, but on a RedHat machine I got fdisk to open it and have a peek to figure this out. Windows had created four partitions on the drive, with all sorts of pretty errors that I didn't copy down (sorry). I deleted all four partitions, created a single DOS partition table, created a single primary partition in it, set it from type "83" (Linux) to type "c" (Win95 FAT 32) and used mkfs.vfat on it, and everything is fine now.


All times are GMT -5. The time now is 01:41 PM.