LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Flash Drive Problems (https://www.linuxquestions.org/questions/slackware-14/flash-drive-problems-277098/)

Garibaldi3489 01-12-2005 07:30 PM

Flash Drive Problems
 
I have my Lexar USB Flash drive in fstab as:
/dev/sdb1 /mnt/usb vfat users,defaults,noauto 0 0
But the only time I can access it is when I have it in when I boot. Why is that? If I try just popping it in later once i have loaded linux already or using another flash drive it gives me this error:
root@Pavilion:/home/andrew# mount /dev/sdb1 /mnt/usb
mount: /dev/sdb1 is not a valid block device

Why is it not a valid block? Do I have to think to myself each time before i boot up linux if I want to use my flash or not? Is there a better way to do this?

JockVSJock 01-12-2005 08:05 PM

Not to steal the thread, but I'm having the same problems with my little thumbdrive. I could have swore that I've mounted this before in Slackware.


This is what /etc/fstab looks like

Code:


[cmmiller@phoenix-/mnt}$ cat /etc/fstab
/dev/hda1        /                ext3        defaults        1  1
/dev/cdrom      /mnt/cdrom      iso9660    noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
/dev/sda4        /mnt/zip        vfat        noauto,owner,ro  0  0
/dev/sdb1        /mnt/t          vfat        noauto,owner,ro  0  0


This is what the mount command tells me

Code:


[cmmiller@phoenix-/mnt}$ mount
/dev/hda1 on / type ext3 (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
proc on /proc type proc (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda4 on /mnt/zip type vfat (rw)

When pulling the thumbdrive in, it looks like it automatically gets detected, light comes on in the thumbdrive.

/var/log/messages tells this story

Code:


root@phoenix:~# cat /var/log/messages | grep usb
Jan  9 17:59:14 phoenix kernel: usb.c: registered new driver usbdevfs
Jan  9 17:59:14 phoenix kernel: usb.c: registered new driver hub
Jan  9 17:59:14 phoenix kernel: usb-uhci.c: $Revision: 1.275 $ time 18:40:47 Sep  2 2003
Jan  9 17:59:14 phoenix kernel: usb-uhci.c: High bandwidth mode enabled
Jan  9 17:59:14 phoenix kernel: usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
Jan  9 17:59:14 phoenix kernel: usb.c: deregistering driver usbdevfs
Jan  9 17:59:14 phoenix kernel: usb.c: deregistering driver hub
Jan  9 17:59:14 phoenix kernel: usb.c: registered new driver usbdevfs
Jan  9 17:59:14 phoenix kernel: usb.c: registered new driver hub
Jan  9 17:59:14 phoenix kernel: usb.c: registered new driver usb-storage
Jan  9 17:59:14 phoenix kernel: usb-ohci.c: USB OHCI at membase 0xcc247000, IRQ 3
Jan  9 17:59:14 phoenix kernel: usb-ohci.c: usb-00:01.2, Silicon Integrated Systems [SiS] USB 1.0 Controller
Jan  9 17:59:14 phoenix kernel: usb.c: new USB bus registered, assigned bus number 1
Jan  9 17:59:14 phoenix kernel: usb-ohci.c: USB OHCI at membase 0xcc249000, IRQ 3
Jan  9 17:59:14 phoenix kernel: usb-ohci.c: usb-00:01.3, Silicon Integrated Systems [SiS] USB 1.0 Controller (#2)
Jan  9 17:59:14 phoenix kernel: usb.c: new USB bus registered, assigned bus number 2
Jan  9 17:59:14 phoenix kernel: usb-uhci.c: $Revision: 1.275 $ time 18:40:47 Sep  2 2003
Jan  9 17:59:14 phoenix kernel: usb-uhci.c: High bandwidth mode enabled
Jan  9 17:59:14 phoenix kernel: usb-uhci.c: v1.275:USB Universal Host Controller Interface driver


Not sure what I'm doing wrong here.

thanks

Darklion 01-12-2005 08:14 PM

Generally speaking, I don't bother putting my flash drive into /etc/fstab. When I want to use it, I just type

mount -t vfat /dev/sda1 /mnt/usb

I suspect (not being a long-time Linux user, that's about as confident as I get) that the problem is that you aren't specifying the "-t vfat" when you try mounting it after booting. The reason it's recognized at boot time is probably because the fstab entry has the correct file system type.

Garibaldi3489 01-12-2005 08:30 PM

that sounds like a good idea, it makes sense. Unfortunally it didn't work:
Quote:

mount -t vfat /dev/sdb1 /mnt/usb
mount: /dev/sdb1 is not a valid block device
same problem.

Quote:

Not to steal the thread, but I'm having the same problems with my little thumbdrive. I could have swore that I've mounted this before in Slackware.
Don't worry about it, I'm happy to hear that someone else is having the same problem!

JrLz 01-12-2005 08:39 PM

My flash worked great, and I did something wrong until
I got the same problem with you guys.............
I reinstalled usbutility from slackware package disk
and it works well now.

JockVSJock 01-12-2005 09:06 PM

When trying to mount with the following command

Code:


mount -t vaft /dev/sdb1 /mn/t

I get the following output

Code:


root@phoenix:/mnt# mount -t vfat /dev/sdb1 /mnt/t
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so


Garibaldi3489 01-13-2005 09:33 PM

I've had that error too before. I wonder why?

brancalessio 01-14-2005 04:34 AM

/dev/sda1 /mnt/usbpen vfat rw,user,noauto 0 0

This is my line in fstab (probably you should drop the default in yours). The error may be caused by uncorrect hardware probing (did you try to remove it and then plug it again?).

Bye!

Garibaldi3489 01-14-2005 08:19 PM

Quote:

This is my line in fstab (probably you should drop the default in yours). The error may be caused by uncorrect hardware probing (did you try to remove it and then plug it again?).
Yeah I tried that, it still wouldn't work though.

gnashley 01-15-2005 12:01 AM

Plug it in, wait a few seconds and then run:
fdisk -l
to see if it is showing up.

JockVSJock 01-15-2005 08:22 AM

When running fdisk -l, this is the output

Code:


root@phoenix:~# fdisk -l

Disk /dev/sda: 250 MB, 250640384 bytes
64 heads, 32 sectors/track, 239 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda4  *          1        239      244720    6  FAT16

Disk /dev/sdb: 131 MB, 131072000 bytes
5 heads, 50 sectors/track, 1024 cylinders
Units = cylinders of 250 * 512 = 128000 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  ?    7479086    8153844    84344761  69  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
    phys=(68, 13, 10) logical=(7479085, 2, 16)
Partition 1 has different physical/logical endings:
    phys=(288, 115, 43) logical=(8153843, 2, 37)
Partition 1 does not end on cylinder boundary.
/dev/sdb2  ?    6806078    14285604  934940732+  73  Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
    phys=(371, 114, 37) logical=(6806077, 4, 32)
Partition 2 has different physical/logical endings:
    phys=(366, 32, 33) logical=(14285603, 3, 46)
Partition 2 does not end on cylinder boundary.
/dev/sdb3  ?          11          11          0  74  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
    phys=(371, 114, 37) logical=(10, 1, 24)
Partition 3 has different physical/logical endings:
    phys=(372, 97, 50) logical=(10, 1, 23)
Partition 3 does not end on cylinder boundary.
/dev/sdb4              1    13740454  1717556736    0  Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
    phys=(0, 0, 0) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
    phys=(0, 0, 0) logical=(13740453, 4, 22)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Disk /dev/sdb4: 1758.7 GB, 1758778097664 bytes
5 heads, 50 sectors/track, 13740453 cylinders
Units = cylinders of 250 * 512 = 128000 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

    Device Boot      Start        End      Blocks  Id  System
/dev/sdb4p1  ?    7479086    8153844    84344761  69  Unknown
Partition 1 does not end on cylinder boundary.
/dev/sdb4p2  ?    6806078    14285604  934940732+  73  Unknown
Partition 2 does not end on cylinder boundary.
/dev/sdb4p3  ?          11          11          0  74  Unknown
Partition 3 does not end on cylinder boundary.
/dev/sdb4p4              1    13740454  1717556736    0  Empty
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Disk /dev/hda: 20.4 GB, 20490559488 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        2310    18555043+  83  Linux
/dev/hda2            2311        2491    1453882+  82  Linux swap

sda4 has mounted a zip drive

sdb1 is where I try to mount my thumbdrive, it is ouputting some very odd errors about being non-linux...

gnashley 01-15-2005 11:18 PM

Looks like you need to run fdisk on sda and create some valid partitions. Then format them so they can be mounted.

JockVSJock 01-16-2005 07:36 AM

How could that be?

My Zip drive I never had to format, just create a mount point in /mnt, modify the kernel, and fstab and it was on.

My thumbdrive on my Knoppix laptop, I'll I have to do is put it in the usb drive, modify fstab and it works too.

Never had to use fdisk on either storage device, so that is very hard to believe.

gnashley 01-16-2005 08:56 AM

This very same drive? The reason I say it is because your partitions aren't valid according to fdisk. It shows 8 partitions, is this correct?
Some of these devices actually have an empty partition table, they are just formatted.

JockVSJock 01-16-2005 07:52 PM

Thanks for the replies...

But, if I fdisk my thumbdrive, I'll blow away any data on there that I need.

This is very odd, because again, I can mount it under Knoppix with no problems, and r/w too.


All times are GMT -5. The time now is 05:48 PM.