LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-09-2005, 10:47 AM   #1
erraticassassin
Member
 
Registered: Feb 2004
Distribution: Slackware 13.1
Posts: 127

Rep: Reputation: 18
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!
 
Old 02-09-2005, 11:20 AM   #2
Valhalla
Member
 
Registered: Nov 2004
Location: Atlanta
Distribution: Gentoo 2005.1, Ubuntu 5.10
Posts: 267

Rep: Reputation: 30
Make sure you have scsi support compiled into your kernel.
 
Old 02-09-2005, 01:13 PM   #3
erraticassassin
Member
 
Registered: Feb 2004
Distribution: Slackware 13.1
Posts: 127

Original Poster
Rep: Reputation: 18
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.
 
Old 02-09-2005, 03:57 PM   #4
erraticassassin
Member
 
Registered: Feb 2004
Distribution: Slackware 13.1
Posts: 127

Original Poster
Rep: Reputation: 18
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:

Code:
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?
 
Old 02-09-2005, 04:24 PM   #5
Valhalla
Member
 
Registered: Nov 2004
Location: Atlanta
Distribution: Gentoo 2005.1, Ubuntu 5.10
Posts: 267

Rep: Reputation: 30
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.
 
Old 02-10-2005, 09:23 AM   #6
erraticassassin
Member
 
Registered: Feb 2004
Distribution: Slackware 13.1
Posts: 127

Original Poster
Rep: Reputation: 18
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.


Last edited by erraticassassin; 02-10-2005 at 09:44 AM.
 
Old 02-14-2005, 01:23 PM   #7
Valhalla
Member
 
Registered: Nov 2004
Location: Atlanta
Distribution: Gentoo 2005.1, Ubuntu 5.10
Posts: 267

Rep: Reputation: 30
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
then
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.
 
Old 02-15-2005, 02:52 AM   #8
erraticassassin
Member
 
Registered: Feb 2004
Distribution: Slackware 13.1
Posts: 127

Original Poster
Rep: Reputation: 18
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.
 
Old 02-15-2005, 08:59 AM   #9
Valhalla
Member
 
Registered: Nov 2004
Location: Atlanta
Distribution: Gentoo 2005.1, Ubuntu 5.10
Posts: 267

Rep: Reputation: 30
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 . Good luck then.

Last edited by Valhalla; 02-15-2005 at 09:01 AM.
 
Old 02-15-2005, 12:28 PM   #10
alose
Member
 
Registered: Dec 2004
Location: Fort Myers, FL
Distribution: Mandrake
Posts: 32

Rep: Reputation: 15
While a little late now, it often works to mount it as just /dev/sda note that there is no partition number there.
 
Old 02-16-2005, 02:36 AM   #11
erraticassassin
Member
 
Registered: Feb 2004
Distribution: Slackware 13.1
Posts: 127

Original Poster
Rep: Reputation: 18
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.,

Last edited by erraticassassin; 02-16-2005 at 02:39 AM.
 
  


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
can't mount usb pen drive with hotplug dori Slackware 8 03-02-2007 02:22 AM
unable to mount usb pen drive in redhat 9.0 zero79 Linux - Hardware 9 01-25-2007 09:07 PM
mount/umount usb pen - woody 2.4.21 rohr Debian 5 02-10-2005 07:06 AM
cannot mount usb pen uizzy76 Linux - Hardware 3 12-27-2004 01:11 AM
Can't mount USB FLASH (Pen driver) vador Linux - Software 5 10-09-2004 01:49 PM


All times are GMT -5. The time now is 08:32 PM.

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