Udev thinks my cdrom is a char device?

From: Ryan Reich (ryanr_at_uchicago.edu)
Date: 05/30/04

  • Next message: Giuseppe Bilotta: "Re: Why is proper NTFS-driver difficult?"
    Date:	Sun, 30 May 2004 15:54:52 -0500
    To: linux-kernel@vger.kernel.org, linux-hotplug-devel@lists.sourceforge.net
    
    

    I don't use my CD-ROM drive too often, and in fact I think the last time I
    did was 4 April, to make a backup; at the time I was running 2.6.4, patched
    with supermount and bootsplash. Now I run 2.6.5, and I find the following
    odd situation in /dev:

    # ls -l /dev/hd*
    brw-rw-rw- 1 root root 3, 0 May 13 07:18 /dev/hda
    brw-rw-rw- 1 root root 3, 1 May 13 07:18 /dev/hda1
    brw-rw-rw- 1 root root 3, 64 May 13 07:18 /dev/hdb
    brw-rw-rw- 1 root root 3, 65 May 13 07:18 /dev/hdb1
    brw-rw-rw- 1 root root 3, 66 May 13 07:18 /dev/hdb2
    brw-rw-rw- 1 root root 3, 69 May 13 07:18 /dev/hdb5
    brw-rw-rw- 1 root root 3, 70 May 13 07:18 /dev/hdb6
    brw-rw-rw- 1 root root 3, 71 May 13 07:18 /dev/hdb7
    brw-rw-rw- 1 root root 3, 72 May 13 07:18 /dev/hdb8
    crw-rw-rw- 1 root root 22, 0 May 30 15:41 /dev/hdc

    It's probably not just me that hdc (my CD-ROM) should be a block device. I
    use udev to manage /dev but I haven't touched a line of any script in months;
    deleting and recreating the device with udev reproduces the problem. If I
    manually create /dev/hdc with `mknod -m 666 /dev/hdc b 22 0` I can read the
    disc in the drive. The directory /sys/block/hdc exists and contains a
    device, but for some reason udev makes a char device anyway.

    No other block device has this problem (i.e. I have been able to boot my
    computer from a hard disk); what's going on here?

    -- 
    Ryan Reich
    ryanr@uchicago.edu
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Giuseppe Bilotta: "Re: Why is proper NTFS-driver difficult?"

    Relevant Pages

    • Re: removable media revalidation - udev vs. devfs or static /dev
      ... >> If so, udev will catch that. ... as I thought we could rely on the kernel partition support. ... partitions for every block device, if they need them or not. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: removable media revalidation - udev vs. devfs or static /dev
      ... > Doesn't the kernel always create the main block device for this device? ... But udev should probably also create all the sub-nodes if it doesn't ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: udev sysfs docs Re: State of devfs in 2.6?
      ... /dev is just a normal directory ... The naive solution ... My guess is, unfortunately, udev probably won't handle this any time ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: dynamic /dev security hole?
      ... On Mon, 9 Aug 2004, Alan Cox wrote: ... udev would chown your ... linked copy (before unlinking the original device node), ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: DevFS vs. udev
      ... On Wed, 2003-12-24 at 03:07, Greg KH wrote: ... cool - please post if you have something a bit before next udev ... Gentoo Linux Developer, Desktop/System Team Developer ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)