Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
My /etc/fstab: /dev/hda3 swap swap defaults 0 0 /dev/hda5 / ext3 defaults 1 1 /dev/hda6 /boot ext3 defaults 1 2 /dev/hda7 /usr ext3 defaults 1 2 /dev/hda8 /opt ext3 defaults ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    CDrom mount problem Slackware 13.0


    My /etc/fstab:
    /dev/hda3 swap swap defaults 0 0
    /dev/hda5 / ext3 defaults 1 1
    /dev/hda6 /boot ext3 defaults 1 2
    /dev/hda7 /usr ext3 defaults 1 2
    /dev/hda8 /opt ext3 defaults 1 2
    /dev/hda9 /var ext3 defaults 1 2
    /dev/hda10 /home ext3 defaults 1 2
    /dev/hda11 /tmp ext3 defaults 1 2
    /dev/hda1 /winc ntfs-3g umask=077 1 0
    /dev/hda2 /winf ntfs-3g umask=077 1 0
    /dev/sda1 /tma1 vfat defaults 1 0
    /dev/sda2 /tma2 vfat defaults 1 0
    #/dev/cdrom0 /mnt/cdrom0 auto noauto,owner,ro 0 0 <--NOTE
    /dev/fd0 /mnt/floppy auto noauto,owner 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    proc /proc proc defaults 0 0
    tmpfs /dev/shm tmpfs defaults 0 0

    With 12.0 I used:
    mount -t iso9660 -r /dev/cdrom0 /mnt Copied over off of backup cd but was able to access it because a gooey window came up in xfce which allowed it. Now that window is not coming up??

    Tried:/root
    bash-3.1# mount -t iso9660 -o ro /dev/cdrom0 /mnt
    mount: no medium found on /dev/hdc
    bash-3.1# mount -t iso9660 -o ro /dev/cdrom1 /mnt
    mount: no medium found on /dev/hdb
    bash-3.1# mount -t iso9660 -o ro /dev/cdrom /mnt
    mount: no medium found on /dev/hdb
    It just covered up the /mnt for me before.

    bash-3.1# mount -t iso9660 -o ro /dev/cdrom /media/new
    mount: mount point /media/new does not exist
    Also saw where was supposed to use /media/cdrom but that didn't work either.

    Under 12.0 seem to recall having an entry in fstab like the one commented out above. Because I have a cdrom and cd-rw installed, I think I had made them cdrom0 and cdrom1 on F & G, respectively.
    Read there is a need to comment out: /etc/udev/rules.d/70-persistent-cd.rules but do not know the purpose of that file, so am asking if:
    1) should I use:
    /dev/cdrom0 /mnt/cdrom0 auto noauto,owner,ro 0 0 in /etc/fstab (and cdrom1) or
    2) get rid of 70-persistent-cd.rules
    or 3) both or something else??

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    /dev/cdrom is a link to the real device. In this case it seems to be pointing to the wrong location, though.

    Post the output of
    Code:
    dmesg | grep -i cd-rom
    It should help figure out what your device is named.

    The window with XFCE is from thunar-volman, the thunar volume manager. You should have a menu entry for "Removable Drives and Media" which allows you to configure that.

    thunar-volman calls exo-mount.

    exo-mount relies on hal and dbus running properly. If you are using hal, you want to have entries for removable media commented out of your fstab. Hal dynamically creates and removes mount points in /media.

    Without knowing the contents of the file /etc/udev/rules.d/70-persistent-cd.rules I couldn't comment on removing or not. I would not until more troubleshooting.

  3. #3
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    CDrom mount problem Slackware 13.0

    Here are the results:
    bash-3.1# dmesg | grep -i cd-rom
    hdb: E-IDE CD-ROM Max 50X, ATAPI CD/DVD-ROM drive
    ide-cd: hdb: ATAPI 50X CD-ROM drive, 128kB Cache
    Uniform CD-ROM driver Revision: 3.20
    ide-cd: hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache

    Thanx for info on Thunar vol mgr! Normally don't use it and just type may alias for whichever drive I am using. I had not mentioned that an ls -l /dev/cdrom0 and likewise for 1 pointed to hdc and hdb respectively. An ls -l /dev/cdrom points to /dev/hdb also.
    I see I can revert to using fstab from the rREADME, but tried getting the vol mgr to recognize a cdrom was in a drive on /hdc as it did the one time I used Thunar but this time it did not see the cdrom. Can root cause mounts to /media??

    I wonder if the removal of 70-persistent-cd.rules forces linux to use fstab for drive assignment rather than exo-mounting on /media??
    Last edited by clickit; 12-03-2009 at 10:13 PM.

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Post the contents of the file.
    Code:
    cat /etc/udev/rules.d/70-persistent-cd.rules
    Block device renaming
    Recent versions of udev (104 and up) along with newer kernel versions (2.6.19 and up) may change your disc device names, due to a change in the kernel's libata implementation. A CD-RW device at /dev/hdc may be changed to /dev/sr0. While this is not normally a problem, it may cause issues for some applications that are hardcoded to look for devices at other locations. For example, media-sound/rip expects to find discs at /dev/cdrom, which becomes a problem if you use a newer kernel and udev renames your device to /dev/cdrom1.

    To work around these issues, you must edit /etc/udev/rules.d/70-persistent-cd.rules and assign the correct name to the device.
    Gentoo Linux Documentation -- Gentoo udev Guide

  5. #5
    Linux User
    Join Date
    Mar 2008
    Posts
    287
    # This file was automatically generated by the //lib/udev/write_cd_rules
    # program, run by the cd-aliases-generator.rules rules file.
    #
    # You can modify it, as long as you keep each rule on a single
    # line, and set the $GENERATED variable.

    # TDK_CDRW241040X (pci-0000:00:11.1-ide-1:0)
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdrom0", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdr0", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdr", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdwriter0", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdwriter", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdrw0", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdrw", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="writer", ENV{GENERATED}="1"
    # E-IDE_CD-ROM_Max_50X (pci-0000:00:11.1-ide-0:1)
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-0:1", SYMLINK+="cdrom1", ENV{GENERATED}="1"
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-0:1", SYMLINK+="cdrom", ENV{GENERATED}="1"

    And how/what do I set the variable GENERATED to? Is that the INV{GENERATED}="!" above??

    I could not find a rev. number like 104 on udev but my /etc/udev is dated 2008-08-30.
    The kernel is 2.6.29.6-smp.

    Is there a need to match info between /lib/udev/rules.d and /etc/udev/rules.d as it is claimed the former writes to the later??

    Thanks and hope I've included enough info!

  6. #6
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Honestly, I've never looked too deeply at udev rules.

    I'm reading up a bit on it, but I don't have an answer.

    https://www.cs.drexel.edu/cgi-bin/manServer.pl/udev.8
    Weblog for mar - Handling devices with udev
    Writing udev rules

    All of the ENV{} entries are variables exported to the udev environment. I think what is does is say, if this variable matches this, then create this symlink.

    I would look through the other rules in /etc/udev/rules.d/ as well.

    What happens if you try and mount using the kernel name rather than the symlink?

    Code:
    mount -t iso9660 -o ro /dev/hdb /mnt/mountpoint
    (Usually you create custom mountpoints in /mnt, rather than mounting directly to /mnt)

  7. #7
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Try this.

    Back up the rules file.
    Code:
    su -
    cp /etc/udev/rules.d/70-persistent-cd.rules /etc/udev/rules.d/70-persistent-cd.rules.bak
    Then delete all the rules, so it just looks like this.
    Code:
    # This file was automatically generated by the //lib/udev/write_cd_rules
    # program, run by the cd-aliases-generator.rules rules file.
    #
    # You can modify it, as long as you keep each rule on a single
    # line, and set the $GENERATED variable.
    Restart and see if it populates the file differently.

  8. #8
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    CDrom mount problem Slackware 13.0

    Tried:
    mount -t iso9660 -r /dev/hdb /mnt it generates: mount: no medium found on /dev/hdb
    also tried with /dev/hdc and got same result.
    Using udev seems to me to be overly complicating without much gain. It is also diverging from what has been standard *nix practice of setting up fstab and mounting pretty much as what I just tried. Perhaps I'm being cro-manion !

    Before trying to remove "70-persistent" I will review again the CD how to and get back.

  9. #9
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    CDrom mount problem Slackware 13.0

    I'm back. Did as you suggested and found that the 70-persistent-cd.rules regenerates as the same as the previous one.
    The cd rules seem to be reversed. The TDK r-w device and MAX_50X (rules) are setup to be on different drives than setup in /dev.
    # TDK_CDRW241040X (pci-0000:00:11.1-ide-1:0)
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-1:0", SYMLINK+="cdrom0", ENV{GENERATED}="1"
    and
    # E-IDE_CD-ROM_Max_50X (pci-0000:00:11.1-ide-0:1)
    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:11.1-ide-0:1", SYMLINK+="cdrom1", ENV{GENERATED}="1"

    ls -l /dev/cdrom0
    lrwxrwxrwx 1 root root 3 2009-12-04 15:12 /dev/cdrom0 -> hdc
    ls -l /dev/cdrom1
    lrwxrwxrwx 1 root root 3 2009-12-04 15:12 /dev/cdrom1 -> hdb

    I am wondering if there is a simple way to cause /etc/udev/rules.d/70-persistent-cd.rules to be generated to match what is setup in /dev (correctly).

    Alternatively, could I break the links for /dev/cdrom0 which point to /dev/hdc and for /dev/cdrom1 which points to /dev/hdb and relink sot cdrom0 ---> hdb and cdrom1 ---> hdc??
    Last edited by clickit; 12-05-2009 at 10:34 AM.

  10. #10
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    CDrom mount problem Slackware 13.0

    I've now added /dev/cdrom0 and 1 to /etc/fstab
    That produced the same error messages.
    I rewrote the 70-persistent-cd.rules by changing 1:0 to 1:1 for the TDK drive and 0:1 to 0:0 for the MAX_X drive and still getting the same errors.
    I am now desperate and may have to go back to 12.0 if no solution this week.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •