# why /dev/sda/ is present at boot

## brain salad surgery

i got a problem when i want to use a usb device

like a compact flash reader

now, when i boot (i use devfs)

theres a directory /dev/sda/ that is automatically created

- >   d /dev/sda

total 0

drwxr-xr-x  1 root root 0 Dec 31  1969 ..

drwxr-xr-x  1 root root 0 Mar 15 07:43 .

and when i do sg_map, i get:

 - >  sg_map

# Note: the devfs pseudo file system is present

device /dev/sda failed on scsi ioctl(idlun), skip: Inappropriate ioctl for device

/dev/sg0  /dev/sr0

i guess there a device problem (there shouldn't be any /dev/sda 

before sg_map creates /dev/sda1 /dev/sda2...etc) 

everything's fine regarding kernel's config (2.6.10-gentoo-r6), 

usb-storage is loaded

 - >   lsmod

Module                  Size  Used by

usb_storage            38784  0 

nvidia               3462428  12 

maybe have i created that /dev/sda by error (don't remember)

how to get the things fixed ??

i haven't changed anything in devfsd 's configs

thanks if anyone can help

----------

## yaneurabeya

Could you tell me what your kernel config is for USB and copy your dmesg output here please?

----------

## chunderbunny

This ,ight be a flaw with the node devfsd has created, and once ti is created it is saved by devfsd forver (devfsd doesn't actively remove device nodes when they are not in use.) I would recommend switching to udev instead of devfsd, udev starts with an empty /dev directory and populates it at every boot.

----------

## yaneurabeya

Yes. With exception of permissions issues sometimes *curses udev for that*, udev's great.

----------

## brain salad surgery

here we go:

dmesg:

Linux version 2.6.10-gentoo-r6 (root@mireault) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #4 Tue Mar 15 10:24:33 EST 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)

 BIOS-e820: 000000001fff0000 - 000000001fff3000 (ACPI NVS)

 BIOS-e820: 000000001fff3000 - 0000000020000000 (ACPI data)

 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

0MB HIGHMEM available.

511MB LOWMEM available.

On node 0 totalpages: 131056

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 126960 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI: RSDP (v000 GBT                                   ) @ 0x000f6480

ACPI: RSDT (v001 GBT    AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x1fff3000

ACPI: FADT (v001 GBT    AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x1fff3040

ACPI: MADT (v001 GBT    AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x1fff6a80

ACPI: DSDT (v001 GBT    AWRDACPI 0x00001000 MSFT 0x0100000c) @ 0x00000000

ACPI: PM-Timer IO Port: 0x4008

Built 1 zonelists

Kernel command line: BOOT_IMAGE=superlinux ro root=304 devfs=mount hdd=ide-scsi

ide_setup: hdd=ide-scsi

Initializing CPU#0

CPU 0 irqstacks, hard=c0437000 soft=c0436000

PID hash table entries: 2048 (order: 11, 32768 bytes)

Detected 1541.021 MHz processor.

Using pmtmr for high-res timesource

Console: colour VGA+ 80x25

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 515308k/524224k available (2247k kernel code, 8376k reserved, 625k data, 388k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 3047.42 BogoMIPS (lpj=1523712)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU: After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000

CPU: After vendor identify, caps:  0383fbff c1c3fbff 00000000 00000000

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

CPU: After all inits, caps:        0383fbff c1c3fbff 00000000 00000020

CPU: AMD Athlon(tm) XP 1800+ stepping 00

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

ACPI: setting ELCR to 0200 (from 0e00)

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xf9cc0, last bus=1

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20041105

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [ALKA] (IRQs 20) *0, disabled.

ACPI: PCI Interrupt Link [ALKB] (IRQs 21) *0, disabled.

ACPI: PCI Interrupt Link [ALKC] (IRQs 22) *0, disabled.

ACPI: PCI Interrupt Link [ALKD] (IRQs 23) *0, disabled.

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

** PCI interrupts are no longer routed automatically.  If this

** causes a device to stop working, it is probably because the

** driver failed to call pci_enable_device().  As a temporary

** workaround, the "pci=routeirq" argument restores the old

** behavior.  If this argument makes the device work again,

** please email the output of "lspci" to bjorn.helgaas@hp.com

** so I can fix the driver.

VFS: Disk quotas dquot_6.5.1

Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

Initializing Cryptographic API

inotify device minor=63

Real Time Clock Driver v1.12

Linux agpgart interface v0.100 (c) Dave Jones

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

mice: PS/2 mouse device common for all mice

input: AT Translated Set 2 keyboard on isa0060/serio0

input: ImPS/2 Logitech Wheel Mouse on isa0060/serio1

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)

8139cp: pci dev 0000:00:13.0 (id 10ec:8139 rev 10) is not an 8139C+ compatible chip

8139cp: Try the "8139too" driver instead.

8139too Fast Ethernet driver 0.9.27

ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10

PCI: setting IRQ 10 as level-triggered

ACPI: PCI interrupt 0000:00:13.0[A] -> GSI 10 (level, low) -> IRQ 10

eth0: RealTek RTL8139 at 0xe400, 00:20:ed:b8:54:3a, IRQ 10

eth0:  Identified 8139 chip type 'RTL-8100B/8139D'

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

Probing IDE interface ide0...

hda: Maxtor 6Y080L0, ATA DISK drive

Probing IDE interface ide1...

hdd: HL-DT-ST GCE-8481B, ATAPI CD/DVD-ROM drive

Probing IDE interface ide2...

ide2: Wait for ready failed before probe !

Probing IDE interface ide3...

ide3: Wait for ready failed before probe !

Probing IDE interface ide4...

ide4: Wait for ready failed before probe !

Probing IDE interface ide5...

ide5: Wait for ready failed before probe !

elevator: using anticipatory as default io scheduler

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 160086528 sectors (81964 MB) w/2048KiB Cache, CHS=65535/16/63

hda: cache flushes supported

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4

ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device

scsi0 : SCSI host adapter emulation for IDE ATAPI devices

  Vendor: HL-DT-ST  Model: CD-RW GCE-8481B   Rev: 1.10

  Type:   CD-ROM                             ANSI SCSI revision: 02

sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray

Uniform CD-ROM driver Revision: 3.20

Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 5

usbcore: registered new driver hiddev

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

i2c /dev entries driver

md: raid5 personality registered as nr 4

raid5: automatically using best checksumming function: pIII_sse

   pIII_sse  :  4104.000 MB/sec

raid5: using function: pIII_sse (4104.000 MB/sec)

md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27

Advanced Linux Sound Architecture Driver Version 1.0.6 (Sun Aug 15 07:17:53 2004 UTC).

ACPI: PCI interrupt 0000:00:11.5[C] -> GSI 10 (level, low) -> IRQ 10

PCI: Setting latency timer of device 0000:00:11.5 to 64

ALSA device list:

  #0: VIA 8235 with ALC650E at 0xe000, irq 10

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 65536)

NET: Registered protocol family 1

NET: Registered protocol family 17

md: Autodetecting RAID arrays.

md: autorun ...

md: ... autorun DONE.

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

kjournald starting.  Commit interval 5 seconds

Mounted devfs on /dev

Freeing unused kernel memory: 388k freed

Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1

EXT3 FS on hda4, internal journal

spurious 8259A interrupt: IRQ7.

nvidia: module license 'NVIDIA' taints kernel.

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 11 (level, low) -> IRQ 11

NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-6629  Wed Nov  3 13:12:51 PST 2004

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

.config :

#

# SCSI support

#

CONFIG_SCSI=y

# CONFIG_BLK_DEV_SD is not set

# CONFIG_CHR_DEV_ST is not set

# CONFIG_CHR_DEV_OSST is not set

CONFIG_BLK_DEV_SR=y

CONFIG_BLK_DEV_SR_VENDOR=y

CONFIG_SR_EXTRA_DEVS=2

CONFIG_CHR_DEV_SG=y

CONFIG_SCSI_DEBUG_QUEUES=y

CONFIG_SCSI_MULTI_LUN=y

CONFIG_SCSI_CONSTANTS=y

# CONFIG_SCSI_LOGGING is not set

#

# SCSI low-level drivers

#

# CONFIG_BLK_DEV_3W_XXXX_RAID is not set

# CONFIG_SCSI_7000FASST is not set

# CONFIG_SCSI_ACARD is not set

# CONFIG_SCSI_AHA152X is not set

# CONFIG_SCSI_AHA1542 is not set

# CONFIG_SCSI_AHA1740 is not set

# CONFIG_SCSI_AACRAID is not set

# CONFIG_SCSI_AIC7XXX is not set

# CONFIG_SCSI_AIC79XX is not set

# CONFIG_SCSI_AIC7XXX_OLD is not set

# CONFIG_SCSI_DPT_I2O is not set

# CONFIG_SCSI_ADVANSYS is not set

# CONFIG_SCSI_IN2000 is not set

# CONFIG_SCSI_AM53C974 is not set

# CONFIG_SCSI_MEGARAID is not set

# CONFIG_SCSI_MEGARAID2 is not set

# CONFIG_SCSI_SATA is not set

# CONFIG_SCSI_SATA_SVW is not set

# CONFIG_SCSI_ATA_PIIX is not set

# CONFIG_SCSI_SATA_PROMISE is not set

# CONFIG_SCSI_SATA_SIL is not set

# CONFIG_SCSI_SATA_VIA is not set

# CONFIG_SCSI_BUSLOGIC is not set

# CONFIG_SCSI_CPQFCTS is not set

# CONFIG_SCSI_DMX3191D is not set

# CONFIG_SCSI_DTC3280 is not set

# CONFIG_SCSI_EATA is not set

# CONFIG_SCSI_EATA_DMA is not set

# CONFIG_SCSI_EATA_PIO is not set

# CONFIG_SCSI_FUTURE_DOMAIN is not set

# CONFIG_SCSI_GDTH is not set

# CONFIG_SCSI_GENERIC_NCR5380 is not set

# CONFIG_SCSI_IPS is not set

# CONFIG_SCSI_INITIO is not set

# CONFIG_SCSI_INIA100 is not set

# CONFIG_SCSI_PPA is not set

# CONFIG_SCSI_IMM is not set

# CONFIG_SCSI_NCR53C406A is not set

# CONFIG_SCSI_NCR53C7xx is not set

# CONFIG_SCSI_SYM53C8XX_2 is not set

# CONFIG_SCSI_NCR53C8XX is not set

CONFIG_SCSI_SYM53C8XX=y

CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=4

CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32

CONFIG_SCSI_NCR53C8XX_SYNC=20

# CONFIG_SCSI_NCR53C8XX_PROFILE is not set

# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set

# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set

# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set

# CONFIG_SCSI_PAS16 is not set

# CONFIG_SCSI_PCI2000 is not set

# CONFIG_SCSI_PCI2220I is not set

# CONFIG_SCSI_PSI240I is not set

# CONFIG_SCSI_QLOGIC_FAS is not set

# CONFIG_SCSI_QLOGIC_ISP is not set

# CONFIG_SCSI_QLOGIC_FC is not set

# CONFIG_SCSI_QLOGIC_1280 is not set

# CONFIG_SCSI_SEAGATE is not set

# CONFIG_SCSI_SIM710 is not set

# CONFIG_SCSI_SYM53C416 is not set

# CONFIG_SCSI_DC390T is not set

# CONFIG_SCSI_T128 is not set

# CONFIG_SCSI_U14_34F is not set

# CONFIG_SCSI_ULTRASTOR is not set

# CONFIG_SCSI_NSP32 is not set

# CONFIG_SCSI_DEBUG is not set

#

# USB support

#

CONFIG_USB=y

# CONFIG_USB_DEBUG is not set

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_BANDWIDTH is not set

# CONFIG_USB_EHCI_HCD is not set

# CONFIG_USB_UHCI is not set

# CONFIG_USB_UHCI_ALT is not set

CONFIG_USB_OHCI=y

# CONFIG_USB_SL811HS_ALT is not set

# CONFIG_USB_SL811HS is not set

CONFIG_USB_AUDIO=m

CONFIG_USB_EMI26=m

# CONFIG_USB_BLUETOOTH is not set

# CONFIG_USB_MIDI is not set

# CONFIG_USB_STORAGE is not set

# CONFIG_USB_STORAGE_DEBUG is not set

# CONFIG_USB_STORAGE_DATAFAB is not set

# CONFIG_USB_STORAGE_FREECOM is not set

# CONFIG_USB_STORAGE_ISD200 is not set

# CONFIG_USB_STORAGE_DPCM is not set

# CONFIG_USB_STORAGE_HP8200e is not set

# CONFIG_USB_STORAGE_SDDR09 is not set

# CONFIG_USB_STORAGE_SDDR55 is not set

# CONFIG_USB_STORAGE_JUMPSHOT is not set

# CONFIG_USB_ACM is not set

# CONFIG_USB_PRINTER is not set

CONFIG_USB_HID=m

# CONFIG_USB_HIDINPUT is not set

CONFIG_USB_HIDDEV=y

# CONFIG_USB_KBD is not set

# CONFIG_USB_MOUSE is not set

# CONFIG_USB_AIPTEK is not set

# CONFIG_USB_WACOM is not set

# CONFIG_USB_KBTAB is not set

# CONFIG_USB_POWERMATE is not set

# CONFIG_USB_DC2XX is not set

# CONFIG_USB_MDC800 is not set

# CONFIG_USB_SCANNER is not set

# CONFIG_USB_MICROTEK is not set

# CONFIG_USB_HPUSBSCSI is not set

# CONFIG_USB_IBMCAM is not set

# CONFIG_USB_KONICAWC is not set

# CONFIG_USB_OV511 is not set

# CONFIG_USB_PWC is not set

# CONFIG_USB_SE401 is not set

# CONFIG_USB_STV680 is not set

# CONFIG_USB_W9968CF is not set

# CONFIG_USB_VICAM is not set

# CONFIG_USB_DSBR is not set

# CONFIG_USB_DABUSB is not set

# CONFIG_USB_PEGASUS is not set

# CONFIG_USB_RTL8150 is not set

# CONFIG_USB_KAWETH is not set

# CONFIG_USB_CATC is not set

# CONFIG_USB_CDCETHER is not set

# CONFIG_USB_USBNET is not set

# CONFIG_USB_USS720 is not set

#

# USB Serial Converter support

#

# CONFIG_USB_SERIAL is not set

# CONFIG_USB_RIO500 is not set

# CONFIG_USB_AUERSWALD is not set

# CONFIG_USB_TIGL is not set

# CONFIG_USB_BRLVGER is not set

# CONFIG_USB_LCD is not set

#

# Support for USB gadgets

#

CONFIG_USB_GADGET=m

CONFIG_USB_GADGET_NET2280=y

# CONFIG_USB_GADGET_GOKU is not set

# CONFIG_USB_GADGET_CONTROLLER is not set

CONFIG_USB_NET2280=m

CONFIG_USB_GADGET_CONTROLLER=m

CONFIG_USB_ZERO=m

# CONFIG_USB_ETH is not set

# CONFIG_USB_FILE_STORAGE is not set

# CONFIG_USB_FILE_STORAGE_TEST is not set

#

# Bluetooth support

#

# CONFIG_BLUEZ is not set

#

# Kernel hacking

#

# CONFIG_DEBUG_KERNEL is not set

CONFIG_LOG_BUF_SHIFT=0

#

# Cryptographic options

#

CONFIG_CRYPTO=y

CONFIG_CRYPTO_HMAC=y

CONFIG_CRYPTO_NULL=m

CONFIG_CRYPTO_MD4=m

CONFIG_CRYPTO_MD5=m

# CONFIG_CRYPTO_SHA1 is not set

# CONFIG_CRYPTO_SHA256 is not set

# CONFIG_CRYPTO_SHA512 is not set

# CONFIG_CRYPTO_DES is not set

# CONFIG_CRYPTO_BLOWFISH is not set

# CONFIG_CRYPTO_TWOFISH is not set

# CONFIG_CRYPTO_SERPENT is not set

# CONFIG_CRYPTO_AES is not set

# CONFIG_CRYPTO_CAST5 is not set

# CONFIG_CRYPTO_CAST6 is not set

# CONFIG_CRYPTO_DEFLATE is not set

# CONFIG_CRYPTO_TEST is not set

#

# Library routines

#

CONFIG_CRC32=y

CONFIG_ZLIB_INFLATE=y

CONFIG_ZLIB_DEFLATE=m

# CONFIG_FW_LOADER is not set

#

# Grsecurity

#

# CONFIG_GRKERNSEC is not set

----------

## yaneurabeya

Add USB storage support as well as UHCI and EHCI support to your kernel.

----------

## brain salad surgery

this is not a matter of kernel config...

 i've recompile with everything inside the kernel (not as modules)

is there a way to fix /dev/ ? or i must reinstall ?

/dev/sda should not exist at boot

----------

## yaneurabeya

Uhm, based on your kernel configs it would be the fact that EHCI and UHCI support aren't available in the kernel-either as modules or as statically built parts of the kernel. Next step you can do is emerge coldplug and hotplug support (if you haven't done so already), and add them to your default rc runlevel so then your USB card is detected properly, ie

```
emerge [blah]plug && /usr/sbin/rc-update add [blah]plug default
```

Where [blah] can either be 'hot' or 'cold' (without the quotes of course).

----------

## brain salad surgery

no no.. like i've said,

 i've recompile with everything inside the kernel (not as modules) 

this include usb support for ehci ohci, and uhci

and i still get the same message when i do sg_map as root

and that kernel config worked perfectly before,

this is not the first time i install gentoo on this computer

no worry, i'm gonna reinstall the whole thing... but 

i would have like to fix it instead or at least understand it...

this is the most important

thanks anyway

----------

## yaneurabeya

Erm, don't reinstall it yet. That's a *ducks for cover first* 'Windows' approach to solving problems  :Very Happy: .

Try out udev before giving up hope yet. udev has worked well for me and I find it a better solution in many ways to devfsd. Be sure to read the udev upgrade docs on the Gentoo site if you are going to follow this route  :Wink: .

----------

