# Switched to udev, now cd-rw drive is gone [FIXED]

## mc_03

Emerged udev and got it all set up succesfully. The only problem is, while there is an entry for /dev/hdc (and /dev/cdroms/cdrom0) for my CD-ROM drive, /dev/hdd and anything related to my cd-rw drive is missing. How can I find out the mknod command for this and how to keep it there when I restart without using the devfs tarball? 

ThanksLast edited by mc_03 on Sat Sep 11, 2004 4:36 am; edited 1 time in total

----------

## tovrstra

This is a strange problem. Normally udev creates all the device nodes a normal devfs would create. Take a look at your /sys/block directory. Each directory corresponds to a block device, as seen by your kernel. If you want more info about a device:

```
udevinfo -a -p /sys/block/hda
```

(replace hda by your device) You should also see this devices in your /dev/ directory unless you did something strange with your udev rules.

Based on the output of this program, you can write udev-rules so that your cdrw will always get the same devicenode like /dev/mycoolcdrw. A good document on writing udev rules: http://www.reactivated.net/udevrules.php

----------

## mc_03

udevinfo for /sys/block/hdd just gives me:

couldn't get the class device

Which is really strange, because I have used this drive up until I installed udev to read and burn CDs.   :Confused: 

----------

## tovrstra

Does the directory /sys/block/hdd really exist? I get that error when i do a udevinfo on a non-existing directory. Could you list your /sys/block/ contents?

----------

## mc_03

mitchell@goomba ~ $ cd /sys/block

mitchell@goomba /sys/block $ l

fd0  hdc    loop2  loop5  ram0   ram11  ram14  ram3  ram6  ram9

hda  loop0  loop3  loop6  ram1   ram12  ram15  ram4  ram7  sda

hdb  loop1  loop4  loop7  ram10  ram13  ram2   ram5  ram8  sr0

No /dev/hdd. It doesn't appear to exist anywhere on my system. Is there a way to recreate it?

----------

## tovrstra

If you don't see your block device in /sys/block, then your kernel doesn't know/see it exists. It must first appaer here before you can make a device node for it. Can you identify all other devices in /sys/block with udevinfo (except loops and rams)? When you do so, certainly pay attention to the line 

```
SYSFS{removable}="1"
```

Is your cdrw a normal ide device? Maybe it needs special modules to be loaded in your kernel. Notice that usb-storage devices and usb-cdroms are in fact SCSI devices. Maybe /sys/block/sda is your cdwriter? Maybe you have activated the CONFIG_BLK_DEV_IDESCS option your kernel. You can safely turn this of. From the kernel docs:

```
CONFIG_BLK_DEV_IDESCSI:                                                                                                                              

WARNING: ide-scsi is no longer needed for cd writing applications! The 2.6 kernel supports direct writing to ide-cd, which eliminates the need for ide-scsi + the entire scsi stack just for writing a cd. The new method is more efficient in every way.
```

----------

## mc_03

tovrstra, thanks for all your help so far.

My CD-RW drive is an ordinary ide drive that was accessible by /dev/hdd before the switch. I have been using hdd=ide-scsi for cd burning in  my grub options, because scsi emulation seems to work better for cd burning for me. I was still always able to mount it as /dev/hdd. I think my kernel does see the drive, because it is mentioned in the logs during bootup (and it even is called /dev/hdd!) Here is what 'dmesg' shows going through a normal bootup. The CD-RW drive is mentioned several times. I think SCSI emulation is doing something with it later on, but I'm not sure what device it's setting the drive to... and why it's not in /dev/cdroms anyway. 

```

mapped to 0xd4806000, size 3072k

vesafb: mode is 1024x768x16, linelength=2048, pages=9

vesafb: protected mode interface info at c000:441b

vesafb: scrolling: redraw

vesafb: directcolor: size=0:5:6:5, shift=0:11:5:0

fb0: VESA VGA frame buffer device

Simple Boot Flag at 0x7a set to 0x80

Machine check exception polling timer started.

gx-suspmod: error: no MediaGX/Geode processor found!

apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)

apm: overridden by ACPI.

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

udf: registering filesystem

SGI XFS with large block numbers, no debug enabled

Initializing Cryptographic API

ACPI: Power Button (FF) [PWRF]

ACPI: Processor [CPU1] (supports C1)

mice: PS/2 mouse device common for all mice

input: PC Speaker

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

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

input: AT Translated Set 2 keyboard on isa0060/serio0

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... silentjpeg size 37356 bytes, found (1024x768, 15222 bytes, v3).

Console: switching to colour frame buffer device 128x48

Real Time Clock Driver v1.12

Non-volatile memory driver v1.2

hw_random hardware driver 1.0.0 loaded

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

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

Using anticipatory io scheduler

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

loop: loaded (max 8 devices)

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

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

ICH2: IDE controller at PCI slot 0000:00:1f.1

ICH2: chipset revision 1

ICH2: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA

hda: Maxtor 32049H2, ATA DISK drive

hdb: MAXTOR 6L040J2, ATA DISK drive

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

[b]hdc: Lite-On LTN483S 48x Max, ATAPI CD/DVD-ROM drive

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

[/b]

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

hda: max request size: 128KiB

hda: 39062500 sectors (20000 MB) w/2048KiB Cache, CHS=38752/16/63, UDMA(100)

 hda: hda1

hdb: max request size: 128KiB

hdb: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(100)

 hdb: hdb1 hdb2 hdb3 hdb4

[b]hdc: ATAPI 48X CD-ROM drive, 120kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

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-8160B   Rev: 1.02

  Type:   CD-ROM                             ANSI SCSI revision: 02

st: Version 20040403, fixed bufsize 32768, s/g segs 256

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

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

[/b]

NET: Registered protocol family 2

IP: routing cache hash table of 2048 buckets, 16Kbytes

TCP: Hash tables configured (established 32768 bind 65536)

NET: Registered protocol family 1

NET: Registered protocol family 17

ACPI: (supports S0 S1 S4 S5)

RAMDISK: Compressed image found at block 0

VFS: Mounted root (ext2 filesystem) readonly.

Freeing unused kernel memory: 168k freed

usbcore: registered new driver usbfs

usbcore: registered new driver hub

ehci_hcd 0000:02:0b.2: NEC Corporation USB 2.0

ehci_hcd 0000:02:0b.2: irq 11, pci mem d4b74c00

ehci_hcd 0000:02:0b.2: new USB bus registered, assigned bus number 1

ehci_hcd 0000:02:0b.2: USB 2.0 enabled, EHCI 0.95, driver 2004-May-10

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 5 ports detected

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

sbp2: $Rev: 1219 $ Ben Collins <bcollins@debian.org>

ReiserFS: hdb4: found reiserfs format "3.6" with standard journal

ReiserFS: hdb4: using ordered data mode

ReiserFS: hdb4: journal params: device hdb4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hdb4: checking transaction log (hdb4)

ReiserFS: hdb4: replayed 10 transactions in 0 seconds

ReiserFS: hdb4: Using r5 hash to sort names

Adding 498004k swap on /dev/hdb2.  Priority:-1 extents:1

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... silentjpeg size 37356 bytes, found (1024x768, 15222 bytes, v3).

bootsplash: status on console 0 changed to on

snd_mixer_oss: Unknown parameter `alias'

snd_pcm_oss: Unknown parameter `alias'

snd_seq_oss: Unknown parameter `alias'

PCI: Setting latency timer of device 0000:00:1f.5 to 64

intel8x0_measure_ac97_clock: measured 49379 usecs

intel8x0: clocking to 48000

Linux agpgart interface v0.100 (c) Dave Jones

agpgart: Detected an Intel i815 Chipset, but could not find the secondary device.

agpgart: Detected an Intel i815 Chipset.

agpgart: Maximum main memory to use for agp memory: 262M

agpgart: AGP aperture is 64M @ 0xf8000000

USB Universal Host Controller Interface driver v2.2

uhci_hcd 0000:00:1f.2: Intel Corp. 82801BA/BAM USB (Hub #1)

PCI: Setting latency timer of device 0000:00:1f.2 to 64

uhci_hcd 0000:00:1f.2: irq 10, io base 0000ef80

uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

usb 2-1: new full speed USB device using address 2

usbcore: registered new driver usbserial

drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0

drivers/usb/serial/usb-serial.c: USB Serial support registered for PocketPC PDA

/home/mitchell/src/Synce/kernel-2.6-driver/ipaq.c: USB PocketPC PDA driver v0.5

ipaq 2-1:1.0: PocketPC PDA converter detected

usb 2-1: PocketPC PDA converter now attached to ttyUSB0 (or usb/tts/0 for devfs)usbcore: registered new driver ipaq

usb 2-2: new low speed USB device using address 3

usbcore: registered new driver hiddev

input: USB HID v1.10 Mouse [Logitech USB Mouse] on usb-0000:00:1f.2-2

usbcore: registered new driver usbhid

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

e100: Intel(R) PRO/100 Network Driver, 3.0.18

e100: Copyright(c) 1999-2004 Intel Corporation

e100: eth0: e100_probe: addr 0xff9ff000, irq 3, MAC addr 00:03:47:0E:9F:CD

ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ohci_hcd: block sizes: ed 64 td 64

ohci_hcd 0000:02:0b.0: NEC Corporation USB

ohci_hcd 0000:02:0b.0: irq 11, pci mem d4cfc000

ohci_hcd 0000:02:0b.0: new USB bus registered, assigned bus number 3

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 3 ports detected

usb 3-2: new full speed USB device using address 2

ohci_hcd 0000:02:0b.1: NEC Corporation USB (#2)

scsi1 : SCSI emulation for USB Mass Storage devices

ohci_hcd 0000:02:0b.1: irq 9, pci mem d4d52000

ohci_hcd 0000:02:0b.1: new USB bus registered, assigned bus number 4

  Vendor: HP        Model: psc 2175          Rev: 1.00

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sda: 494080 512-byte hdwr sectors (253 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

 sda: sda1

Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0

Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0,  type 0

USB Mass Storage device found at 2

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x2B11

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

usb 4-2: new full speed USB device using address 2

Bluetooth: Core ver 2.5

NET: Registered protocol family 31

Bluetooth: HCI device and connection manager initialized

Bluetooth: HCI socket layer initialized

Bluetooth: HCI USB driver ver 2.6

usbcore: registered new driver hci_usb

Bluetooth: L2CAP ver 2.2

Bluetooth: L2CAP socket layer initialized

ndiswrapper version 0.8 loaded

ndiswrapper adding bcmwl5.sys

wlan0: ndiswrapper ethernet device 00:0c:41:62:c2:52 using driver bcmwl5.sys

cdrom: This disc doesn't have any tracks I recognize!

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... found (1024x768, 15222 bytes, v3).

bootsplash: status on console 0 changed to on

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... found (1024x768, 28829 bytes, v3).

bootsplash: status on console 1 changed to on

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... found (1024x768, 80505 bytes, v2).

bootsplash: status on console 2 changed to on

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... found (1024x768, 153589 bytes, v3).

bootsplash: status on console 3 changed to on

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... found (1024x768, 194667 bytes, v3).

bootsplash: status on console 4 changed to on

bootsplash 3.1.4-2004/02/19-spock-0.1: looking for picture.... found (1024x768, 15222 bytes, v3).

bootsplash: status on console 5 changed to on

mtrr: 0xf0000000,0x1000000 overlaps existing 0xf0000000,0x200000

mtrr: 0xf0000000,0x1000000 overlaps existing 0xf0000000,0x200000

[drm] Initialized r128 2.5.0 20030725 on minor 0: ATI Technologies Inc Rage 128 PF/PRO AGP 4x TMDS

mtrr: 0xf0000000,0x1000000 overlaps existing 0xf0000000,0x200000

agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode

agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode

atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

hdc: DMA interrupt recovery

hdc: lost interrupt

hdc: status timeout: status=0xd0 { Busy }

hdc: status timeout: error=0x00

hdc: DMA disabled

hdc: drive not ready for command

hdc: ATAPI reset complete

cdrom_pc_intr, write: dev hdc: flags = REQ_STARTED REQ_PC

sector 0, nr/cnr 0/0

bio 00000000, biotail 00000000, buffer 00000000, data 00000000, len 0

cdb: 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x02)

```

Any ideas?

----------

## mc_03

Neved mind, fixed it  :Very Happy:  I upgraded my kernel to 2.6.8 and changed hdd=ide-scsi to hdd=ide-cd in grub.conf. Not sure which one of those did it, but now the drive is fully mountable and writable! Woohoo! Again, thanks for your help through all this.

----------

## tovrstra

It could have been the kernel version. I remember something cdrw related in the changelog of the gentoo-dev-sources. Anyway, happy cd-writing!

----------

