LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   /dev/sda is not a valid block device (https://www.linuxquestions.org/questions/linux-hardware-18/dev-sda-is-not-a-valid-block-device-277719/)

C++ 01-14-2005 10:06 AM

/dev/sda is not a valid block device
 
Help,
I wanted to use my pendrive under my RH9. But I can't. When I tried to mount it as sda i get: "mount: /dev/sda is not a valid block device". I am mounting it like this:

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

So, i wrote simple script, that tried to mount ALL of my /dev/sd* devices. But it didn't mount anything. I found some solutions in the internet, but none of them worked. I think the best way to describe my problem will be pasting all messages that I know.

First lsmod
Module Size Used by
sd_mod 12936 -
via82cxxx_audio 26672 -
ac97_codec 16680 -
usb_storage 32552 -

So, the proper usb and scsi modules are loaded.
Then I tried fdisk -l /dev/sda*, but there was not foud disks.

I also did lsusb and it found the device:
lsusb

Bus 001 Device 003: ID 0ea0:2168
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 Interface
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0ea0
idProduct 0x2168
bcdDevice 2.00
iManufacturer 1 USB
iProduct 2 Flash Disk
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type none
wMaxPacketSize 64
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type none
wMaxPacketSize 64
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 2
bInterval 1
Language IDs: (length=4)
0409 English(US)


In /var/log/messages is:
Jan 14 16:11:17 localhost kernel: usb 1-2: USB disconnect, address 2
Jan 14 16:11:23 localhost kernel: usb 1-1: new full speed USB device using address 3

So system does see the device.
Also:
tail -n 100 /var/log/dmesg | grep usb
prints:
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
usb 1-2: new full speed USB device using address 2
usbcore: registered new driver usb-storage

But when I do:
cat /proc/scsi/scsi
I get just:
Attached devices:

And that's all i know. I can't mount any of /dev/sda* devices Anyone suspects what's happening?

michaelk 01-14-2005 09:29 PM

Unless the usb controller module were compiled into the kernel they are not being loaded.
usb-uhci (or usb-ohci ) for USB 1.0

teckk 01-14-2005 10:29 PM

I think that should be
mount -t vfat /dev/sda1 /mnt/usb

USB drives mount like that on this Fedora machine.

student04 01-14-2005 11:16 PM

http://www.linuxquestions.org/questi...hreadid=277493

http://www.linuxquestions.org/questi...hreadid=277098

Try those two threads; maybe they have an answer.

Good luck

C++ 01-15-2005 10:01 AM

Like I said I wrote a script that tries to mount ALL /dev/sd* devices and it is unable to mount anything. Also fdisk -l /dev/sd* does not print anything. So, the problem lies deeper I think :(

faheyd 01-16-2005 02:42 AM

"Like I said I wrote a script that tries to mount ALL /dev/sd* devices and it is unable to mount anything. Also fdisk -l /dev/sd* does not print anything. So, the problem lies deeper I think :("

What do you mean when you state "/dev/sd*", do you mean you wrote a script that mounts /dev/sda, /dev/sdb, /dev/ etc. I don't think you are going to mount a device named "/dev/sd*", as that device doesn't exist. Try 'fdisk /dev/sda' without the tic marks and tell us what happens.

C++ 01-16-2005 04:50 AM

fdisk /dev/sda prints "Unable to open /dev/sda"
fdisk -l /dev/sd* means "list all disks that names begins with sd". Of course the device /dev/sd* (tic mark) does not exist. My script tries to mount ALL of sd* devices (sda, sda1, sda2, ..., sdb etc.), because I'm not sure, which letter it really has. But no device was mounted.

faheyd 01-16-2005 03:47 PM

Your device 0x2168 shows up at http://www.qbik.ch/usb/devices/searc...pattern=0x2168 as a perfectly working device. Try 'fdisk -l' and see what happens. Sounds like you are only a step or two away from getting it working.

or try fdisk -l /dev/sdb or fdisk -l /dev/sdc


C++ 01-16-2005 06:13 PM

[root@Iwan mafiu]# fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2318 18619303+ 7 HPFS/NTFS
/dev/hda2 2319 3886 12594960 c Win95 FAT32 (LBA)
/dev/hda3 3887 4795 7301542+ 83 Linux
/dev/hda4 4796 4865 562275 82 Linux swap

Disk /dev/hdc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 4096 32901088+ 83 Linux
/dev/hdc2 * 4097 8100 32162130 a5 FreeBSD
/dev/hdc3 8101 9500 11245500 83 Linux
/dev/hdc4 9501 14593 40909522+ 5 Extended
/dev/hdc5 9501 9800 2409718+ 83 Linux
[root@Iwan mafiu]#

fdisk -l /dev/sda (the same for sdb, sdc) prints nothing. I also think that it's pretty close to made it to work. Actually it SHOULD already work. But it doesn't.

faheyd 01-17-2005 12:12 AM

Well, i thought you were close, but after seeing the output of fdisk -l, not really. I'm pretty sure that your usb drive is being recognized by the usb system as per your lsusb output. But it is not being picked up by the scsi stuff. I would say that at this moment there is a missing scsi module, one that hasn't been installed yet, but since I don't use RH9...

However, look at the results of 'lsmod' and look for your scsi stuff.
If your scsi stuff is not loading, I'd probably do, 'modprobe scsi_mod' and 'modprobe sd_mod'
reinsert your usb stick
then fdisk -l and you should now see the /dev/sda or something similar.


ref: http://www.faqs.org/docs/Linux-HOWTO...tml#appendix_b
and
http://www.simonf.com/usb/

Electro 01-17-2005 12:27 AM

You need usb modules (uhci, usb-uhci, ohci, or usb-ohci), sd_mod, scsi modules, usb-storage.

You can not mount /dev/sda because it is a raw partition. You have to mount /dev/sda1. For now revert back to the orginal setup because your script is probably has a bug. Also it could be hotplug not telling devfsd or udev to make the major device node for /dev/sda and its minor device node /dev/sda1.....10.

Sometimes running cdrecord -scanbus may help Linux look at it some more.

You can post what /sbin/lsusb and /sbin/lsmod after you connect the usb flash disk.

faheyd 01-17-2005 01:42 AM

Yeah, like I said....already.

drenze 01-17-2005 07:02 AM

OK...I just resolved this IDENTICAL issue this weekend.

What I found out was this...I was using the stock kernel that shipped with RH9.0. Some research I did indicated that this kernel had issues handling USB correctly...which made sense, because I was also trying to get my PDA to sync and no joy.

What I did was upgrade to FC3, then run up2date and pull down the 2.6.10-1.741_FC3. Issue resolved with the flash drive, stay tuned for the PDA.

faheyd 01-17-2005 01:09 PM

Gee, I wish I came up with that. Sounds like the MS answer, "you got a problem, reinstall". That works sometimes, but that is not the case here. Up to this point, it looks like the scsi modules are not loading. Don't know why yet, but we'll see soon. Let's stay focused on the problem at hand. The OP has given us all the clues we need to fix this problem as far as I can tell.

C++ 01-17-2005 03:19 PM

Well, I had scsi modules compiled into kernel. But I recompiled the kernel to have both usb and scsi as modules, and the situation hasn't changed.
The modules usb_storage, usbcore, uhci_hcd, scsi_mod and sd_mod are loaded now (by modprobe) and the outputs of "fdisk -l" and "lsusb" are identical. What more can I try?


All times are GMT -5. The time now is 10:42 PM.