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 01-14-2005, 10:06 AM   #1
C++
LQ Newbie
 
Registered: Jan 2005
Location: Poland
Distribution: RH9
Posts: 9

Rep: Reputation: 0
/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?
 
Old 01-14-2005, 09:29 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,853

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Unless the usb controller module were compiled into the kernel they are not being loaded.
usb-uhci (or usb-ohci ) for USB 1.0
 
Old 01-14-2005, 10:29 PM   #3
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,752

Rep: Reputation: 189Reputation: 189
I think that should be
mount -t vfat /dev/sda1 /mnt/usb

USB drives mount like that on this Fedora machine.
 
Old 01-14-2005, 11:16 PM   #4
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
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
 
Old 01-15-2005, 10:01 AM   #5
C++
LQ Newbie
 
Registered: Jan 2005
Location: Poland
Distribution: RH9
Posts: 9

Original Poster
Rep: Reputation: 0
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
 
Old 01-16-2005, 02:42 AM   #6
faheyd
Member
 
Registered: Jun 2003
Location: Northern California (NorCal)
Distribution: Ubuntu 7.04 and DSL/Puppy etc
Posts: 342

Rep: Reputation: 30
"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.

Last edited by faheyd; 01-16-2005 at 02:43 AM.
 
Old 01-16-2005, 04:50 AM   #7
C++
LQ Newbie
 
Registered: Jan 2005
Location: Poland
Distribution: RH9
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 01-16-2005, 03:47 PM   #8
faheyd
Member
 
Registered: Jun 2003
Location: Northern California (NorCal)
Distribution: Ubuntu 7.04 and DSL/Puppy etc
Posts: 342

Rep: Reputation: 30
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


Last edited by faheyd; 01-16-2005 at 03:48 PM.
 
Old 01-16-2005, 06:13 PM   #9
C++
LQ Newbie
 
Registered: Jan 2005
Location: Poland
Distribution: RH9
Posts: 9

Original Poster
Rep: Reputation: 0
[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.
 
Old 01-17-2005, 12:12 AM   #10
faheyd
Member
 
Registered: Jun 2003
Location: Northern California (NorCal)
Distribution: Ubuntu 7.04 and DSL/Puppy etc
Posts: 342

Rep: Reputation: 30
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/

Last edited by faheyd; 01-17-2005 at 12:14 AM.
 
Old 01-17-2005, 12:27 AM   #11
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 01-17-2005, 01:42 AM   #12
faheyd
Member
 
Registered: Jun 2003
Location: Northern California (NorCal)
Distribution: Ubuntu 7.04 and DSL/Puppy etc
Posts: 342

Rep: Reputation: 30
Yeah, like I said....already.
 
Old 01-17-2005, 07:02 AM   #13
drenze
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Rep: Reputation: 0
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.
 
Old 01-17-2005, 01:09 PM   #14
faheyd
Member
 
Registered: Jun 2003
Location: Northern California (NorCal)
Distribution: Ubuntu 7.04 and DSL/Puppy etc
Posts: 342

Rep: Reputation: 30
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.
 
Old 01-17-2005, 03:19 PM   #15
C++
LQ Newbie
 
Registered: Jan 2005
Location: Poland
Distribution: RH9
Posts: 9

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


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
Block device /dev/sda3 is not a valid root device.. rincewind Linux - Hardware 7 06-09-2006 04:47 AM
/dev/fd0 is not a valid block device intmail Slackware 2 07-21-2005 06:52 AM
/dev/sda1 not valid block device pcpinkerton Linux - Hardware 19 02-29-2004 07:48 AM
sda is not a valid block device joesecone Linux - Hardware 7 07-29-2002 06:22 PM
/dev/sda1 is not a valid block device adenardo Linux - General 6 10-17-2001 10:07 PM


All times are GMT -5. The time now is 10:52 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