LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-18-2004, 11:33 PM   #1
sundancebt
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Rep: Reputation: 0
How to make a corrupted USB stick work?


I have a USB memory stick that was mounting/unmounting just fine under
RH 9.0, which suddenly went corrupt. It wouldn't mount under Linux, and
when I plugged it into a windows XP box it said the stick wasn't formatted.

So I reformatted it under windows, as a FAT32 filesystem, which I believe
is the same as vfat, and now it works okay under windows, but still won't
mount under Linux. I tried it on a several different machines, with the same
result, so it's definitely a problem with the USB stick.

I'd like to try reformatting the stick under Linux instead of windows, but
considering that it won't mount at the moment, is there any way I can achieve
this?

Can anyone else think of anything I could try (other than taking the USB stick
back to the shop and complaining) ?

Cheers,
Sundance
 
Old 03-19-2004, 12:42 AM   #2
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Rep: Reputation: 30
Hi

What commands are you using to mount the stick or program.

cheers
heave you tried

mount -t msdos /dev/sda1 /mnt/usb as root

cheers
 
Old 03-19-2004, 04:50 AM   #3
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Rep: Reputation: 30
What does it say when you try and mount it.
 
Old 03-20-2004, 07:01 PM   #4
sundancebt
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Original Poster
Rep: Reputation: 0
G'day again,

I originally set it up to work with the line
/dev/sda1 /mnt/usbstick vfat user,noauto.umask=0 0 0
in my /etc/fstab file, and mounting it with the command;
mount /mnt/usbstick
(which worked even when I wasn't root).
As suggested above I tried using the
mount -t msdos /dev/sda1 /dev/usbstick
command as root, but it didn't work :-(

Using either command I'm getting the error message
mount: wrong fs type, bad option, bad superblock on /dev/sda1
or too many mounted filesystems

Thanks for any help,
 
Old 03-20-2004, 07:22 PM   #5
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Rep: Reputation: 30
try mount -t auto /dev/sda1 /dev/usbstick
 
Old 03-22-2004, 10:00 PM   #6
sundancebt
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi there,

beejayzed, I tried setting the filesystem type to auto and it complained about an I/O error and said I had to specify the fs type manually.
With any other option (eg vfat) it complains about `wrong option, too many mounted filesystems' etc.

The command `mount /mnt/usbstick' is working fine with other usb sticks,
so I know there's not a software/command problem. The real issue is whether I can forcibly create a valid Linux filesystem on this particular USB stick, or whether I just have to take it back to the shop and complain.

Thanks again for any help,
Sundance
 
Old 03-23-2004, 03:05 AM   #7
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Rep: Reputation: 30
Post your /etc/fstab file, I'll see if I can see anything out of order. Else just take it back to teh shop and complain.
 
Old 03-23-2004, 10:37 PM   #8
sundancebt
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi there again,

here's the /etc/fstab in all its glory

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults,noauto 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/sda1 /mnt/usbstick vfat user,noauto,umask=0 0 0
/dev/hda2 /osshare vfat umask=000 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom2 /mnt/cdrom2 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom3 /mnt/cdrom3 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom4 /mnt/cdrom4 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom5 /mnt/cdrom5 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom6 /mnt/cdrom6 udf,iso9660 noauto,owner,kudzu,ro 0 0

Does this mean that linux can't find a device and format it, if it can't mount an unformatted device? It must be possible because windows can do it. I'd hate to think there's something
useful that windows can do and linux (or at least RH) can't.

Thanks for the help,
Sundance

Last edited by sundancebt; 03-23-2004 at 10:39 PM.
 
Old 03-23-2004, 10:45 PM   #9
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
CAn you post the messsage from "tail -f /var/log/messages" when you plug in the usb drive?
 
Old 03-23-2004, 11:19 PM   #10
sundancebt
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi there,

# tail -f /var/log/messages
Mar 24 15:45:19 cssm-96 kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
Mar 24 15:45:19 cssm-96 kernel: Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 1
Mar 24 15:45:20 cssm-96 kernel: SCSI device sda: 123904 512-byte hdwr sectors (63 MB)
Mar 24 15:45:20 cssm-96 kernel: sda: Write Protect is off
Mar 24 15:45:20 cssm-96 kernel: sda: sda1 sda2 sda3 sda4
Mar 24 15:45:20 cssm-96 kernel: SCSI device sdb: 2880 512-byte hdwr sectors (1 MB)
Mar 24 15:45:20 cssm-96 kernel: sdb: Write Protect is off
Mar 24 15:45:20 cssm-96 kernel: sdb: sdb1 sdb2 sdb3 sdb4
Mar 24 15:45:23 cssm-96 /etc/hotplug/usb.agent: ... no modules for USB product 8
ec/812/100

Cheers,
Sundance
 
Old 03-24-2004, 03:45 AM   #11
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Rep: Reputation: 30
I dunno, maybe someone else has some suggestions. I'm more comfortable in Mandrake coz I've neve used Redhat. From the messages file, it seems as if it hins thare's a missing module or something.
Could you post your /etc/mtab file to see if has anything about it.
 
Old 03-25-2004, 12:10 AM   #12
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
I would try 'mount -t vfat /dev/sda4 /mnt/usbstick'. Also try sda2 and sda3.

Why there was sdb? Did you mount some other usb drive at the same time?
 
Old 03-25-2004, 04:37 AM   #13
sundancebt
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Okay, the /etc/mtab file looks like this;

/dev/hda6 / ext3 rw 0 0
none /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs rw 0 0
/dev/hda2 /osshare vfat rw,umask=000 0 0

As for trying /dev/sda2. sda3, sda4, I'm still just getting the usual error message. As for the sdb, the USB stick I have is an ASUS model which was pre-formatted into a 63Mb sector and a 1.44Mb sector. I'd say the 64Mb sector is sda, and the 1.44Mb sector is sdb.

All the best,
Sundance
 
Old 03-25-2004, 04:49 PM   #14
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Rep: Reputation: 30
Does anyone here know how to detect devices in order to see their /dev/device entry.
sundancebt,
Maybe the third entry has something to do with it. Try unmounting that device with the umount command and see what happens.
 
Old 03-25-2004, 06:38 PM   #15
sundancebt
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Hi beejayzed,

it looks like the answer is "nothing much" when I unmount usbdevfs,
although I'm not entirely sure what I should be looking for.

Cheers,
Sundance
 
  


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 stick doesn't work jenny_psion Linux - Hardware 1 11-26-2005 05:29 AM
usb-stick doesn't work any more(after reinstalling sqlite) laurentwahl Linux - Hardware 1 08-03-2005 08:11 AM
Large (512mb) USB stick doesn't work with SuSE Personal 9.1 Napalm Llama Linux - Hardware 3 12-12-2004 05:31 PM
How can I make my memory stick work KiwiPingu Linux - Newbie 18 07-24-2004 07:04 AM
How do I get my USB memory stick to work in SuSE 8.2? Paul_Lee Linux - Hardware 13 02-13-2004 08:14 AM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration