-   Linux - Hardware (
-   -   Unable to mount new USB pen (

erraticassassin 02-09-2005 10:47 AM

Unable to mount new USB pen
Hi all,

I've just bought a new 512Mb USB pen drive off Ebay. It works fine in Windows XP, but attempting to mount the drive in Linux brings up a message saying that it is not a valid block device. On one occasion, I also received a message about being unable to verify the partition table or something similar - apologies for the inexactitude, but that message only appeared once and I lost it before I could write it down.

I should probably add that when plugging the damn thing in under Windows, a light flashes on the end once it has been recognised; if I plug it in under Linux, no light.

I'm running a basic Slackware 9.1 installation with the stock 2.4.* kernel. My /etc/fstab entry is :

/dev/sda1 /mnt/flashdrive auto noauto,users

I already have a 128Mb pen drive which works perfectly with the above settings. Checking the Disk Management doodad in XP shows that the drive is formatted as a FAT* partition, not NTFS.

I am officially puzzled. If anyone can offer any suggestions, I'd be most grateful!

Valhalla 02-09-2005 11:20 AM

Make sure you have scsi support compiled into your kernel.

erraticassassin 02-09-2005 01:13 PM

Hmmm. Seems strange that the first response comes from a Gentoo user, and is about checking whether your kernel's compiled correctly... ;)

The stock Slackware kernel has SCSI support compiled in - it's needed in order for me to use my CDRW, for example. Also, as shown in that line from my /etc/fstab, my current USB drive is treated as a SCSI device, and that works just fine.

erraticassassin 02-09-2005 03:57 PM

Following my previous posts, I've tried using the USB device on another machine also loaded with Slackware 9.1, with the same problem. I've tried running fdisk -l as root, which normally shows removable USB memory as /dev/sda1; results are as follows:


Disk /dev/sdb: 524 MB, 524025856 bytes
17 heads, 59 sectors/track, 1020 cylinders
Units = cylinders of 1003 * 512 = 513536 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  ?      775809    1913904  570754815+  72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
    phys=(357, 116, 40) logical=(775808, 8, 13)
Partition 1 has different physical/logical endings:
    phys=(357, 32, 45) logical=(1913903, 14, 4)
Partition 1 does not end on cylinder boundary.
/dev/sdb2  ?      168185    2098423  968014120  65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
    phys=(288, 115, 43) logical=(168184, 16, 27)
Partition 2 has different physical/logical endings:
    phys=(367, 114, 50) logical=(2098422, 8, 24)
Partition 2 does not end on cylinder boundary.
/dev/sdb3  ?    1864289    3794527  968014096  79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
    phys=(366, 32, 33) logical=(1864288, 10, 12)
Partition 3 has different physical/logical endings:
    phys=(357, 32, 43) logical=(3794526, 1, 20)
Partition 3 does not end on cylinder boundary.
/dev/sdb4  ?          1    3626348  1818613248    d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
    phys=(372, 97, 50) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
    phys=(0, 10, 0) logical=(3626347, 7, 42)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Disk /dev/hda: 4327 MB, 4327464960 bytes
255 heads, 63 sectors/track, 526 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1              1          49      393561  82  Linux swap
/dev/hda2  *          50        475    3421845  83  Linux

This begs a few questions:

1) Why is this particular device recognised as /dev/sdb, whereas my older 128Mb doodad is recognised as /dev/sda? They were both used in the same USB port.
2) In Windows XP, both devices are recognised as single partitions; so why are four partitions listed for the 512Mb device?
3) Would reformatting the 512Mb device have any beneficial effect?

Valhalla 02-09-2005 04:24 PM

Do you use udev. That may be why, I'm not sure. If your sees case then try mounting the new one as /dev/sdb1 if your computer is reconizing the device as /dev/sdb. As for multiple partitions, I don't know why you have that many, but if I'm reading that output correct you have 1 extended partition and 3 logical partitions. Maybe you want to reformat it to have only one. Just a thought...

good luck.

erraticassassin 02-10-2005 09:23 AM

I have no idea whether Slackware uses udev! As you say, I could put another entry in my /etc/fstab for sdb1, but I'm puzzled as to why it's not recognised as sda1 as my current doodad is...

First things first: I'm going to try reformatting it as a single FAT32 partition (needs to be FAT so I can transfer files from my Windows partition too), then see if it will mount as sda1.

Fingers crossed, and all that.

* * FOLLOW UP * *

Having reformatted the new 512Mb device with a FAT32 partition, running fdisk -l now shows it as /dev/sda, but it is still split into four partitions... and although /dev/sda1 is listed in my /etc/fstab, attempting to mount it still brings up the message about it not being a valid block device.

Valhalla 02-14-2005 01:23 PM

I just realize what happened. For some reason, some jumpdrives come are formatted by windows don't actually have any patitions on them at all. That is why the partition table on your jumpdrive is so messed up. If you have something on it you should back it up. Then fdisk the device and delete all the partitions, i.e.
fdisk /dev/sda
d 1
d 2
d 3
d 4

Then you should create a single new patition, or multiples, w/e works for you. You should then do mkfs.vfat /dev/sda1. I think it should work then.

erraticassassin 02-15-2005 02:52 AM

This is a bit more promising - after removing the initial partitions with fdisk and creating a new one, it is indeed shown as a single device under /dev/sda1. However, for some reason, Slackware doesn't appear to recognise mkfs.vfat, either as root or non-root user. I will try formatting in Windows; if that fails, or reintroduces the multiple broken partitions, might it be worth trying Knoppix?

Thanks anyway. This appears to be on the right track.

Valhalla 02-15-2005 08:59 AM

Oh, you maybe be able to format it as mkfs -t vfat or mkfs -t msdos. I think those both work out to fat32. Windows shou ld just format the only partition it sees. The only reason it dos that weird garbage partition table is that windows is too stupid to check if there is or is not a partition on a disk when formating :confused: . Good luck then.

alose 02-15-2005 12:28 PM

While a little late now, it often works to mount it as just /dev/sda note that there is no partition number there.

erraticassassin 02-16-2005 02:36 AM

Huzzah! We have a winner!

mkfs -t msdos /dev/sda1 did the trick. The memory doodad is now fully functional. (For some reason slackware doesn't seem to support the vfat option - replacing msdos with vfat produces an error saying the file vfat can't be found, which would suggest that the command to make a vfat filesystem is missing.) I have tried transferring files to and from both WinXP and Slackware, and all is right with the world.

Interestingly, or maybe not depending on point of view, once I had put the new partition structure in place with fdisk, I had a look at it in disk management in WinXP with a view to formatting it from there if I couldn't get mkfs to work, and it would only recognise it as a 256Mb device. So Windows works just fine with a broken partition table, but has a fit when you show it a working one. *sigh* So many MS bashing comments, so little time.

For anyone else tinkering with these USB devices, you might find that copying files from an MSDOS/FAT* formatted drive marks them all as executable. Please don't do as I did last night and type chmod -x * to be lazy, as you might find it difficult to access the contents of any folders you apply it to afterwards...

Alose - better late than never! I'm not going to criticise anyone who wants to pitch in and help. I just wish I was in a position to help others out sometimes as well...

Many thanks, all.,

All times are GMT -5. The time now is 06:57 PM.