Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-10-2010, 05:33 PM   #1
LQ Newbie
Registered: Apr 2010
Distribution: Fedora 13
Posts: 20

Rep: Reputation: 1
USB and Hard Drive listed in /proc but not /dev

First off I'm working in CentOS 5.4 with the default 2.6.18-164 kernel (which I will be editing but have reverted back to in order to solve this problem.)

Near the end of the init script I have thrown a /bin/sh to get into a busybox bash shell in order to test some scripts. Ive attached the init below.

While in this shell I can see my usb drive in /proc/bus/usb/devices and my hard drive in /proc/scsi/device_info however I cannot mount them as they are not in /dev.

I have scsi emulation set in the kernel. When I plug in a USB stick it finds the address but still no sign of it in /dev. There are other modules listed in /sys/module such as usbcore that dont show up in lsmod, is that possibly the problem?

Is there any obvious reason this could happen?

Thanks in advance,

Init Script

mount -t proc /proc /proc
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/urandom c 1 9
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/rtc c 10 135
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
echo Setting up hotplug.
echo Creating block device nodes.
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
echo "Loading ohci-hcd.ko module"
insmod /lib/ohci-hcd.ko
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
mount -t usbfs /proc/bus/usb /proc/bus/usb
echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
echo "Loading scsi_mod.ko module"
insmod /lib/scsi_mod.ko
echo "Loading sd_mod.ko module"
insmod /lib/sd_mod.ko
echo "Loading libata.ko module"
insmod /lib/libata.ko
echo "Loading sata_nv.ko module"
insmod /lib/sata_nv.ko
echo "Loading dm-mod.ko module"
insmod /lib/dm-mod.ko
echo "Loading dm-log.ko module"
insmod /lib/dm-log.ko
echo "Loading dm-mirror.ko module"
insmod /lib/dm-mirror.ko
echo "Loading dm-zero.ko module"
insmod /lib/dm-zero.ko
echo "Loading dm-snapshot.ko module"
insmod /lib/dm-snapshot.ko
echo "Loading dm-mem-cache.ko module"
insmod /lib/dm-mem-cache.ko
echo "Loading dm-region_hash.ko module"
insmod /lib/dm-region_hash.ko
echo "Loading dm-message.ko module"
insmod /lib/dm-message.ko
echo "Loading dm-raid45.ko module"
insmod /lib/dm-raid45.ko
echo Waiting for driver initialization.
stabilized --hash --interval 1000 /proc/scsi/scsi
echo Scanning and configuring dmraid supported devices
echo Scanning logical volumes
lvm vgscan --ignorelockingfailure
echo Activating logical volumes
lvm vgchange -ay --ignorelockingfailure VolGroup01
resume /dev/VolGroup01/LogVol01
echo Creating root device.
mkrootdev -t ext3 -o defaults,ro /dev/VolGroup01/LogVol00
echo Mounting root filesystem.
mount /sysroot
echo Setting up other filesystems.
echo Switching to new root and running init.
Old 05-11-2010, 12:06 PM   #2
LQ Newbie
Registered: Apr 2010
Distribution: Fedora 13
Posts: 20

Original Poster
Rep: Reputation: 1
Tried loading ide_disk and ide_core as modules (just a random guess) but no still no luck today.
Old 05-12-2010, 10:28 AM   #3
LQ Newbie
Registered: Apr 2010
Distribution: Fedora 13
Posts: 20

Original Poster
Rep: Reputation: 1
Still working on this problem but feel like ive made a little progress.

I noticed usb-storage isnt in the kernel (even though its selected in the config) so I added it and insmod'ed the .ko. This automatically brings up information about the usb when its plugged in and the SCSI emulation announcement. However still no sign of it in /dev

usb 1-10: new high speed USB device using ehci_hcd and address 9
usb 1-10: configuration #1 chosen from 1 choice
scsi8 : SCSI emulation for USB Mass Storage devices
Vendor: JetFlash Model: Transcend 1GB Rev: 8.07
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sdb: 1972224 512-byte hdwr sectors (1010 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
SCSI device sdb: 1972224 512-byte hdwr sectors (1010 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
sdb: sdb1
sd 8:0:0:0: Attached scsi removable disk sdb
I then created a node for it with:
mknod /dev/sdb b 8 16
mknod /dev/sdb1 b 8 17
When I run:
mount /dev/sdb1/ /cdrom
It returns
mount: mounting /dev/sdb1 on /cdrom/ failed: Invalid argument
::EDIT:: I should mention /cdrom is a empty directory I made, I realize the cd name is a little misleading but its used in the script later.

If I cat /dev/sdb1 to make sure somethings there I get a stream of data until I unplug the usb, so its pointing in the right place (this is a pretty crude way of checking but its the best I could figure out )

What am I missing?


::SOLVED:: In case someone stumbles on this thread in the future here is what I was missing


insmod cdrom.ko
insmod sr_mod.ko
insmod ide-cd.ko

mknod hda b 3 0

and then mount it

insmod fat.ko
insmod vfat.ko

mknod sdb b 8 16
mknod sdb1 b 8 17

Last edited by Potatos; 05-13-2010 at 01:27 PM.
Old 05-19-2010, 06:06 AM   #4
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,417

Rep: Reputation: Disabled
Thanks for coming back and explaining .
Old 06-01-2010, 12:37 PM   #5
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Rep: Reputation: 32
Good on you Potatos for writing your solution afterwards.

I have a similar problem with a 32G Kingston Drive, and I'm trying to find something in this thread that will help me.

What I find puzzling here is that you do get output identifying sdb1 as your device, though no file seems to exist (before you created it) in udev.

My general conclusion here is that everything was working correctly and it was just a case of creating the device nodes and then some associated filesystem modules.


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
palm device listed in /proc/bus/usb/devices, but not in lsusb output carltm Linux - Hardware 2 09-09-2010 08:33 AM
On (x)Ubuntu 9.04, usb hard drive isn't listed in /dev/sd*, yet seen by lsusb. cfp Linux - Hardware 1 07-28-2009 05:10 PM
Firewire Maxtor drive showing up in /proc but not /dev, can't mount darkbluedrew Linux - Newbie 1 09-17-2005 07:33 PM
Listed partition in cfdisk, but not listed in /dev? Erik_the_Red Linux - Newbie 7 08-06-2005 12:44 AM
USB hard drive rejects dev number mad2physicist Linux - Hardware 16 12-15-2003 01:11 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration