Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 102669 - udev-067 does not create cd/dvd symlinks at boot
Summary: udev-067 does not create cd/dvd symlinks at boot
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-15 20:00 UTC by Philip Kovacs
Modified: 2005-08-20 19:51 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Kovacs 2005-08-15 20:00:26 UTC
/dev/hdc = ide cdrom
/dev/sr0 = scsi dvd/cd burner

The cd/dvd symlinks are not created on boot with udev-067, however, manually
running udevstart after the system is up does create the missing symlinks:
cdrom, cdrom1, cdrw, dvd and dvdrw which all appear to be correct. 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.5-r0, 2.6.12-gentoo-r8 i686)
=================================================================
System uname: 2.6.12-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.pair.com
http://gentoo.ccccom.com"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X alsa avi cdr cups divx4linux dvd dvdr encode fbcon gif gpm gtk gtk2
jpeg mad mikmod mmx mpeg ncurses nls nptl oggvorbis opengl oss perl png python
readline sdl slang spell sse ssl tcpd truetype unicode xml2 xprint xv xvid zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-15 23:08:12 UTC
None?  bah, this should have been fixed (turns up every other release...)

Ok, if you run 'udevstart' after booting, do the symlinks show up?

If you run 'udevtest /sys/block/hdc block' what does it show?

If you run 'udevtest /sys/block/sr0 block' what does it show?

If you run 'cdrom_id /dev/hdc' what does it show (might have to do this as root,
if the permissions are not correct.)

Same for 'cdrom_id /dev/sr0'
Comment 2 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-15 23:09:11 UTC
need to reassign this to me...
Comment 3 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-15 23:09:53 UTC
Ok, now can mark NEED_INFO
Comment 4 Philip Kovacs 2005-08-16 08:59:14 UTC
Yes, running udevstart after boot does indeed create the missing symlinks.

# udevtest /sys/block/hdc block
udevtest.c: looking at device '/block/hdc' from subsystem 'block'
udevtest.c: opened class_dev->name='hdc'
udev_rules.c: IMPORT executes '/sbin/cdrom_id --export /dev/.tmp-22-0'
udev_rules.c: rule applied, added symlink 'cdrom2'
udev_rules.c: add symlink 'cdrom2'
udev_rules.c: no node name set, will use kernel name 'hdc'
udev_add.c: creating device node '/dev/hdc', major = '22', minor = '0', mode =
'0660', uid = '0', gid = '19'

# udevtest /sys/block/sr0 block
udevtest.c: looking at device '/block/sr0' from subsystem 'block'
udevtest.c: opened class_dev->name='sr0'
udev_rules.c: IMPORT executes '/sbin/cdrom_id --export /dev/.tmp-11-0'
udev_rules.c: rule applied, added symlink 'cdrom2'
udev_rules.c: add symlink 'cdrom2'
udev_rules.c: rule applied, added symlink 'cdrw1'
udev_rules.c: add symlink 'cdrw1'
udev_rules.c: rule applied, added symlink 'dvd1'
udev_rules.c: add symlink 'dvd1'
udev_rules.c: rule applied, added symlink 'dvdrw1'
udev_rules.c: add symlink 'dvdrw1'
udev_rules.c: no node name set, will use kernel name 'sr0'
udev_add.c: creating device node '/dev/sr0', major = '11', minor = '0', mode =
'0660', uid = '0', gid = '19'

# cdrom_id /dev/hdc
ID_CDROM=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_RAM=1

Note that I ran these tests after running udevstart manually to create the
missing symlinks (it looks like the tests above want to create additional
symlinks with higher indices, e.g. cdrom2, etc.)

Lemme know if you need anything more.

Phil
Comment 5 Philip Kovacs 2005-08-16 09:07:20 UTC
Here are the same tests, run immediately after boot, but WITHOUT having run
udevstart ( so the symlinks have not yet been created ):

# udevtest /sys/block/hdc block
udevtest.c: looking at device '/block/hdc' from subsystem 'block'
udevtest.c: opened class_dev->name='hdc'
udev_rules.c: IMPORT executes '/sbin/cdrom_id --export /dev/.tmp-22-0'
udev_rules.c: rule applied, added symlink 'cdrom'
udev_rules.c: add symlink 'cdrom'
udev_rules.c: no node name set, will use kernel name 'hdc'
udev_add.c: creating device node '/dev/hdc', major = '22', minor = '0', mode =
'0660', uid = '0', gid = '19'

# udevtest /sys/block/sr0 block
udevtest.c: looking at device '/block/sr0' from subsystem 'block'
udevtest.c: opened class_dev->name='sr0'
udev_rules.c: IMPORT executes '/sbin/cdrom_id --export /dev/.tmp-11-0'
udev_rules.c: rule applied, added symlink 'cdrom'
udev_rules.c: add symlink 'cdrom'
udev_rules.c: rule applied, added symlink 'cdrw'
udev_rules.c: add symlink 'cdrw'
udev_rules.c: rule applied, added symlink 'dvd'
udev_rules.c: add symlink 'dvd'
udev_rules.c: rule applied, added symlink 'dvdrw'
udev_rules.c: add symlink 'dvdrw'
udev_rules.c: no node name set, will use kernel name 'sr0'
udev_add.c: creating device node '/dev/sr0', major = '11', minor = '0', mode =
'0660', uid = '0', gid = '19'

# cdrom_id /dev/hdc            
ID_CDROM=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_RAM=1
Comment 6 Kjell Claesson 2005-08-16 09:11:52 UTC
Info from one more system.
Same bug description.

emerge info
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r8 i686)
=================================================================
System uname: 2.6.12-gentoo-r8 i686 Intel(R) Celeron(TM) CPU                1400MHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.2.3-r5, 2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/
ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.du.se/pub/os/gentoo
http://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo
http://mirror.pudas.net/gentoo ftp://mirror.pudas.net/gentoo"
LANG="sv_SE"
LC_ALL="sv_SE"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 X aac aalib alsa apache2 apm arts avi berkdb bitmap-fonts blender-game
bonobo cdr crypt css cups curl dba dbus directfb divx4linux dv dvd dvdr dvdread
eds emboss encode esd fam fbcon flac flash font-server foomaticdb fortran gd
gdbm gif gimpprint glut gnome gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal
ieee1394 imagemagick imlib innodb java joystick jpeg junit kde libg++ libwww
live lm_sensors mad mikmod ming mmx motif mozilla mp3 mpeg mpm-prefork mysql
mysqli ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl oss pam pdflib perl
php png ppds python qt quicktime readline samba scanner sdl slang speex spell
sse ssl svga tcltk tcpd tetex tidy tiff timidity transcode truetype
truetype-fonts type1 type1-fonts unicode usb userlocales v4l vcd vcdimager
vorbis win32codecs xine xml xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS

udevtest /sys/block/hdc block (before udevstart)
udevtest.c: looking at device '/block/hdc' from subsystem 'block'
udev_rules_parse.c: error parsing SYSFS attribute in 'BUS'
udevtest.c: opened class_dev->name='hdc'
udev_rules.c: IMPORT executes '/sbin/cdrom_id --export /dev/.tmp-22-0'
udev_rules.c: rule applied, added symlink 'cdrom'
udev_rules.c: add symlink 'cdrom'
udev_rules.c: rule applied, added symlink 'cdrw'
udev_rules.c: add symlink 'cdrw'
udev_rules.c: rule applied, added symlink 'dvd'
udev_rules.c: add symlink 'dvd'
udev_rules.c: no node name set, will use kernel name 'hdc'
udev_add.c: creating device node '/dev/hdc', major = '22', minor = '0', mode =
'0660', uid = '0', gid = '19'

cdrom_id /dev/hdc (also before udevstart, but after above)
ID_CDROM=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_RAM=1

udevtest /sys/block/hdd block
udevtest.c: looking at device '/block/hdd' from subsystem 'block'
udev_rules_parse.c: error parsing SYSFS attribute in 'BUS'
udevtest.c: opened class_dev->name='hdd'
udev_rules.c: IMPORT executes '/sbin/cdrom_id --export /dev/.tmp-22-64'
udev_rules.c: rule applied, added symlink 'cdrom'
udev_rules.c: add symlink 'cdrom'
udev_rules.c: no node name set, will use kernel name 'hdd'
udev_add.c: creating device node '/dev/hdd', major = '22', minor = '64', mode =
'0660', uid = '0', gid = '19'

cdrom_id /dev/hdd
ID_CDROM=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_RAM=1

Kjell
Comment 7 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-16 12:04:27 UTC
And your ide cdrom driver and scsi driver are all built into the kernel?

Or are they modules?
Comment 8 Kjell Claesson 2005-08-16 12:15:25 UTC
I have cdrom and ide-cd as modules
Comment 9 Philip Kovacs 2005-08-16 12:18:51 UTC
all modules.  ide-cd, sr_mod, usbcore, uhci_hcd, ehci_hcd, etc.
Comment 10 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-16 12:23:31 UTC
Ok, then who is loading those modules?  Your modules.autoload file?
Comment 11 Kjell Claesson 2005-08-16 12:41:11 UTC
(In reply to comment #10)
> Ok, then who is loading those modules?  Your modules.autoload file?

Yes i have ide-cd in /etc/modules.autoload.d/kernel-2.6
Comment 12 Philip Kovacs 2005-08-16 13:06:48 UTC
i have ide-cd in my /etc/modules.autoload.d/kernel-2.6, but not sr_mod.  sr_mod
gets loaded through the hotplug/coldplug mechanism, i.e. I often plug the sr0
burner into different machines, so it's not always tethered onto the usb bus
when i boot -- thus i use the coldplug/hotplug mechanism to discover sr0 and
load that module as needed.
Comment 13 Dirk Heinrichs 2005-08-17 02:48:39 UTC
I see the same problem. As with the others, udevstart after boo fixes the 
problem. ide-cd built as module, loaded via /etc/modules.autoload.d/kernel-2.6. 
Cold-/hotplug are run in boot runlevel. 
 
Comment 14 jack_mort 2005-08-17 14:02:10 UTC
Same problem as described. ide_cd built as module and loaded via modules.autoload
Also running coldplug and hotplug.
Comment 15 Heinz Hombergs 2005-08-17 14:45:32 UTC
Same here. ide_cd build in kernel.
I use hdparm in the default runlevel for setting the params of my hd and cd
drives. With udev-067 hdparm only set the params for /dev/hda and /dev/hdb (my
hd drives) but not for /dev/hdc and /dev/hdd (my cdrom drives). With udev-065
hdparm sets the params for all four drives.
Comment 16 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-17 20:36:27 UTC
I can now duplicate this here, and upstream has verified that this is a bug.
Comment 17 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-18 10:37:12 UTC
Should now be fixed in 068 release.  If not, please reopen this bug.
Comment 18 Philip Kovacs 2005-08-19 09:12:28 UTC
068 fixed the problem here.  many thanks.
Comment 19 jack_mort 2005-08-19 09:59:23 UTC
Yep ! Problem fixed. Thanks !
Comment 20 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-19 10:22:13 UTC
Ok, I'll considered this verified then :)
Comment 21 Heinz Hombergs 2005-08-20 10:25:31 UTC
Works now. But the hdparm problem is not gone.
I use the hdc_args and hdd_args for setting the cdrom params.
Comment 22 Philip Kovacs 2005-08-20 10:51:49 UTC
hm.  i also use /etc/conf.d/hdparm to turn off DMA on my older hdc cdrom
(hdc_args="-d0").  i just checked dmesg and, you are right, there is a problem.
 perhaps the hdc/hdd nodes are created relatively late with >067, i.e. after the
hdparm is run in boot level?  is there a separate bug on this?
Comment 23 Heinz Hombergs 2005-08-20 11:27:47 UTC
I run hdparm not at boot level. I run it at default level.

Under /dev/disk/by-id I have the following entries:

lrwxrwxrwx  1 root root  9 20. Aug 2005  ata-SAMSUNG_SP1604N_S02DJ10X900085 ->
../../hdb
lrwxrwxrwx  1 root root 10 20. Aug 2005 
ata-SAMSUNG_SP1604N_S02DJ10X900085-part1 -> ../../hdb1
lrwxrwxrwx  1 root root 10 20. Aug 2005 
ata-SAMSUNG_SP1604N_S02DJ10X900085-part2 -> ../../hdb2
lrwxrwxrwx  1 root root 10 20. Aug 2005 
ata-SAMSUNG_SP1604N_S02DJ10X900085-part3 -> ../../hdb3
lrwxrwxrwx  1 root root 10 20. Aug 2005 
ata-SAMSUNG_SP1604N_S02DJ10X900085-part5 -> ../../hdb5
lrwxrwxrwx  1 root root 10 20. Aug 2005 
ata-SAMSUNG_SP1604N_S02DJ10X900085-part6 -> ../../hdb6
lrwxrwxrwx  1 root root  9 20. Aug 2005  ata-ST3200021A_3LJ0BNST -> ../../hda
lrwxrwxrwx  1 root root 10 20. Aug 2005  ata-ST3200021A_3LJ0BNST-part1 -> ../../hda1
lrwxrwxrwx  1 root root 10 20. Aug 2005  ata-ST3200021A_3LJ0BNST-part2 -> ../../hda2
lrwxrwxrwx  1 root root 10 20. Aug 2005  ata-ST3200021A_3LJ0BNST-part3 -> ../../hda3
lrwxrwxrwx  1 root root 10 20. Aug 2005  ata-ST3200021A_3LJ0BNST-part5 -> ../../hda5
lrwxrwxrwx  1 root root 10 20. Aug 2005  ata-ST3200021A_3LJ0BNST-part6 -> ../../hda6
lrwxrwxrwx  1 root root 10 20. Aug 2005  ata-ST3200021A_3LJ0BNST-part7 -> ../../hda7
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-Generic_CF_Card_CF_AAAA12345678 ->
../../sda
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-Generic_MS_Card_MS_AAAA12345678 ->
../../sdb
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-Generic_SD_Card_MMC.SD_AAAA12345678
-> ../../sdc
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-Generic_SM.XD_Card_SM_AAAA12345678
-> ../../sdd

Under /dev/disk/by-path:

lrwxrwxrwx  1 root root  9 20. Aug 2005  pci-0000:00:1f.1-ide-0:0 -> ../../hda
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:0-part1 ->
../../hda1
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:0-part2 ->
../../hda2
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:0-part3 ->
../../hda3
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:0-part5 ->
../../hda5
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:0-part6 ->
../../hda6
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:0-part7 ->
../../hda7
lrwxrwxrwx  1 root root  9 20. Aug 2005  pci-0000:00:1f.1-ide-0:1 -> ../../hdb
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:1-part1 ->
../../hdb1
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:1-part2 ->
../../hdb2
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:1-part3 ->
../../hdb3
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:1-part5 ->
../../hdb5
lrwxrwxrwx  1 root root 10 20. Aug 2005  pci-0000:00:1f.1-ide-0:1-part6 ->
../../hdb6
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-0x0db0-0x4011:0:0:0 -> ../../sda
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-0x0db0-0x4011:0:0:1 -> ../../sdb
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-0x0db0-0x4011:0:0:2 -> ../../sdc
lrwxrwxrwx  1 root root  9 20. Aug 2005  usb-0x0db0-0x4011:0:0:3 -> ../../sdd


Under /dev/disk/by-uuid:

lrwxrwxrwx  1 root root 10 20. Aug 2005  1a5ebea6-6535-4286-a2b5-11e907decf3f ->
../../hdb1
lrwxrwxrwx  1 root root 10 20. Aug 2005  1e9c4b2c-3790-41ef-ad88-e477433d65b1 ->
../../hda6
lrwxrwxrwx  1 root root 10 20. Aug 2005  2711c7b1-3f63-4969-bae5-73a798597c10 ->
../../hda5
lrwxrwxrwx  1 root root 10 20. Aug 2005  323244be-91bf-4e23-99ad-7107ae0c2fa5 ->
../../hda7
lrwxrwxrwx  1 root root 10 20. Aug 2005  3c666213-5eaa-4ab5-aa43-90c2c78ca045 ->
../../hdb5
lrwxrwxrwx  1 root root 10 20. Aug 2005  a1d429ec-fc42-478e-8df6-e51c8a231b12 ->
../../hda1
lrwxrwxrwx  1 root root 10 20. Aug 2005  abb6e3ca-dd9b-436e-8cd7-90400241f3b0 ->
../../hdb6
lrwxrwxrwx  1 root root 10 20. Aug 2005  eeac9ec8-2cc8-4640-9101-c8eb6019d4c9 ->
../../hdb2


And under /dev:

hombergs2 dev # ll hd*
brw-rw----  1 root disk   3,  0 20. Aug 2005  hda
brw-rw----  1 root disk   3,  1 20. Aug 2005  hda1
brw-rw----  1 root disk   3,  2 20. Aug 2005  hda2
brw-rw----  1 root disk   3,  3 20. Aug 2005  hda3
brw-rw----  1 root disk   3,  5 20. Aug 2005  hda5
brw-rw----  1 root disk   3,  6 20. Aug 2005  hda6
brw-rw----  1 root disk   3,  7 20. Aug 2005  hda7
brw-rw----  1 root disk   3, 64 20. Aug 2005  hdb
brw-rw----  1 root disk   3, 65 20. Aug 2005  hdb1
brw-rw----  1 root disk   3, 66 20. Aug 2005  hdb2
brw-rw----  1 root disk   3, 67 20. Aug 2005  hdb3
brw-rw----  1 root disk   3, 69 20. Aug 2005  hdb5
brw-rw----  1 root disk   3, 70 20. Aug 2005  hdb6
brw-rw----  1 root cdrom 22,  0 20. Aug 2005  hdc
brw-rw----  1 root cdrom 22, 64 20. Aug 2005  hdd

Comment 24 Philip Kovacs 2005-08-20 11:46:57 UTC
I see the problem.   Refer to the bottom of the script /etc/init.d/hdparm:

...
else

                # non-devfs compatible system
                for device in /dev/hd?
                do
                        # check that the block device really exists
                        # by opening it for reading
                        if [ -b $device ] && ( : <$device ) 2>/dev/null
                        then
                                eval args=\${`basename $device`_args}
                                do_hdparm
                        fi
                done

        fi
...

that code to test for the block device and then try to open it doesn't work
UNLESS there 
is a cd in the drive.

Specifically and for example:

if [ -b /dev/hdc ] && ( : </dev/hdc ) 2>/dev/null

does not return true unless the ide cdrom drive has a cd in it.

changing the line:

if [ -b $device ] && ( : <$device ) 2>/dev/null line 

to just:

if [ -b $device ] 

will fix the problem by removing the attempt to open the device.  
i'll file a separate bug report on this.  not a udev problem.  
it's a weakness in the hdparm startup script revealed by udev moving 
completely away from devfs names.

Phil
Comment 25 Philip Kovacs 2005-08-20 12:00:57 UTC
see bug #69284
Comment 26 Heinz Hombergs 2005-08-20 16:01:31 UTC
Thanks. It works now.
But something is strange. Cause with udev-065 hdparm runs normal.
After upgrading to udev-068 this problem appears.
Comment 27 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-20 18:35:33 UTC
That is because we switched away from the devfs names for block devices after 065
Comment 28 Philip Kovacs 2005-08-20 19:51:10 UTC
i filed bug# 103202 which i hope directly addresses the problem.