eject doesn't with RHEL 4 (actually CentOS 4.2)... - Redhat

This is a discussion on eject doesn't with RHEL 4 (actually CentOS 4.2)... - Redhat ; I cannot get eject to eject my IDE CD-ROM on my CentOS 4.2 system running kernel kernel-smp-2.6.9-22.0.1.EL if I am just myself, but if I am root, it works just fine. Both drives are actually /dev/hdc, and neither is SCSI. ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: eject doesn't with RHEL 4 (actually CentOS 4.2)...

  1. eject doesn't with RHEL 4 (actually CentOS 4.2)...

    I cannot get eject to eject my IDE CD-ROM on my CentOS 4.2 system running
    kernel kernel-smp-2.6.9-22.0.1.EL if I am just myself, but if I am root, it
    works just fine. Both drives are actually /dev/hdc, and neither is SCSI.

    I checked the permissions of /usr/bin/eject and they come with permissions
    -rwxr-xr-x. Changing them to -rwsr-xr-x "fixes" this, but I do not like to
    leave it that way.

    On my RHEL 3 system, brw------- 1 jdbeyer disk 22, 0 Jun 24 2004 /dev/hdc

    On my RHEL 4 system, brw------- 1 jdbeyer disk 22, 0 Dec 16 11:47 /dev/hdc

    On the system that does not work, if I run eject -v, it tries various
    methods to eject, and the SCSI one is selected, but works only as root.

    On the other system, that works normally, it selects the CD-ROM method to
    eject and it does.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 08:55:00 up 20 days, 19:26, 5 users, load average: 4.19, 4.32, 4.45

  2. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Jean-David Beyer wrote:

    > I cannot get eject to eject my IDE CD-ROM on my CentOS 4.2 system running
    > kernel kernel-smp-2.6.9-22.0.1.EL if I am just myself, but if I am root,
    > it works just fine. Both drives are actually /dev/hdc, and neither is
    > SCSI.
    >
    > I checked the permissions of /usr/bin/eject and they come with permissions
    > -rwxr-xr-x. Changing them to -rwsr-xr-x "fixes" this, but I do not like to
    > leave it that way.
    >
    > On my RHEL 3 system, brw------- 1 jdbeyer disk 22, 0 Jun 24 2004
    > /dev/hdc
    >
    > On my RHEL 4 system, brw------- 1 jdbeyer disk 22, 0 Dec 16 11:47
    > /dev/hdc
    >
    > On the system that does not work, if I run eject -v, it tries various
    > methods to eject, and the SCSI one is selected, but works only as root.
    >
    > On the other system, that works normally, it selects the CD-ROM method to
    > eject and it does.
    >


    Works fine on my system;

    ls -l /dev/hdc
    brw------- 1 lenard disk 22, 0 Dec 17 04:07 /dev/hdc

    $ ls -l /usr/bin/eject
    -rwxr-xr-x 1 root root 23256 Feb 17 2005 /usr/bin/eject

    $ rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n'
    'eject'
    eject-2.0.13-11.x86_64.rpm

    But I do run a custom vanilla kernel;

    $ uname -a
    Linux Aspire5000 2.6.14.4dsdt #2 Fri Dec 16 13:08:32 EST 2005 x86_64 x86_64
    x86_64 GNU/Linux

    $ eject -v
    eject: using default device `cdrom'
    eject: device name is `cdrom'
    eject: expanded name is `/dev/cdrom'
    eject: `/dev/cdrom' is a link to `/dev/hdc'
    eject: `/dev/hdc' is not mounted
    eject: `/dev/hdc' is not a mount point
    eject: `/dev/hdc' is a multipartition device
    eject: trying to eject `/dev/hdc' using CD-ROM eject command
    eject: CD-ROM eject command succeeded

    Using also works; eject /dev/hdc or eject /media/cdrecorder

    It is a bit strange to see "eject: `/dev/hdc' is not a mount point" when in
    fstab it is defined this way;

    /dev/hdc /media/cdrecorder auto exec,noauto,users,ro 0 0


    --
    "A personal computer is called a personal computer because it's yours,
    Anything that runs on that computer, you should have control over."
    Andrew Moss, Microsoft's senior director of technical policy, 2005

  3. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Lenard wrote:
    > Jean-David Beyer wrote:
    >
    >
    >>I cannot get eject to eject my IDE CD-ROM on my CentOS 4.2 system running
    >>kernel kernel-smp-2.6.9-22.0.1.EL if I am just myself, but if I am root,
    >>it works just fine. Both drives are actually /dev/hdc, and neither is
    >>SCSI.
    >>
    >>I checked the permissions of /usr/bin/eject and they come with permissions
    >>-rwxr-xr-x. Changing them to -rwsr-xr-x "fixes" this, but I do not like to
    >>leave it that way.
    >>
    >>On my RHEL 3 system, brw------- 1 jdbeyer disk 22, 0 Jun 24 2004
    >>/dev/hdc
    >>
    >>On my RHEL 4 system, brw------- 1 jdbeyer disk 22, 0 Dec 16 11:47
    >>/dev/hdc
    >>
    >>On the system that does not work, if I run eject -v, it tries various
    >>methods to eject, and the SCSI one is selected, but works only as root.
    >>
    >>On the other system, that works normally, it selects the CD-ROM method to
    >>eject and it does.
    >>

    >
    >
    > Works fine on my system;
    >
    > ls -l /dev/hdc
    > brw------- 1 lenard disk 22, 0 Dec 17 04:07 /dev/hdc


    $ ls -l /dev/hdc
    brw------- 1 jdbeyer disk 22, 0 Dec 16 11:47 /dev/hdc
    >
    > $ ls -l /usr/bin/eject
    > -rwxr-xr-x 1 root root 23256 Feb 17 2005 /usr/bin/eject


    $ ls -l /usr/bin/eject
    -rwxr-xr-x 1 root root 18860 Feb 21 2005 /usr/bin/eject
    >
    > $ rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n'
    > 'eject'
    > eject-2.0.13-11.x86_64.rpm


    $ rpm -q eject
    eject-2.0.13-11

    >
    > But I do run a custom vanilla kernel;
    >
    > $ uname -a
    > Linux Aspire5000 2.6.14.4dsdt #2 Fri Dec 16 13:08:32 EST 2005 x86_64 x86_64
    > x86_64 GNU/Linux


    I run the latest and greatest from wherever CentOS gets their updates. If
    they are doing it legally, they get the sources from Red Hat and build them
    themselves.

    $ uname -a
    Linux valinuxl.localdomain 2.6.9-22.0.1.ELsmp #1 SMP Thu Oct 27 13:14:25 CDT
    2005 i686 i686 i386 GNU/Linux

    >
    > $ eject -v
    > eject: using default device `cdrom'
    > eject: device name is `cdrom'
    > eject: expanded name is `/dev/cdrom'
    > eject: `/dev/cdrom' is a link to `/dev/hdc'
    > eject: `/dev/hdc' is not mounted
    > eject: `/dev/hdc' is not a mount point
    > eject: `/dev/hdc' is a multipartition device
    > eject: trying to eject `/dev/hdc' using CD-ROM eject command
    > eject: CD-ROM eject command succeeded


    $ eject -v
    eject: using default device `cdrom'
    eject: device name is `cdrom'
    eject: expanded name is `/dev/cdrom'
    eject: `/dev/cdrom' is a link to `/dev/hdc'
    eject: `/dev/hdc' is not mounted
    eject: `/dev/hdc' is not a mount point
    eject: `/dev/hdc' is a multipartition device
    eject: unable to open `/dev/hdc'
    >
    > Using also works; eject /dev/hdc


    $ eject -v /dev/hdc
    eject: device name is `/dev/hdc'
    eject: expanded name is `/dev/hdc'
    eject: `/dev/hdc' is not mounted
    eject: `/dev/hdc' is not a mount point
    eject: `/dev/hdc' is a multipartition device
    eject: unable to open `/dev/hdc'


    > or eject /media/cdrecorder


    $ eject -v /dev/cdrom
    eject: device name is `/dev/cdrom'
    eject: expanded name is `/dev/cdrom'
    eject: `/dev/cdrom' is a link to `/dev/hdc'
    eject: `/dev/hdc' is not mounted
    eject: `/dev/hdc' is not a mount point
    eject: `/dev/hdc' is a multipartition device
    eject: unable to open `/dev/hdc'

    # eject -v
    eject: using default device `cdrom'
    eject: device name is `cdrom'
    eject: expanded name is `/dev/cdrom'
    eject: `/dev/cdrom' is a link to `/dev/hdc'
    eject: `/dev/hdc' is not mounted
    eject: `/dev/hdc' is not a mount point
    eject: `/dev/hdc' is a multipartition device
    eject: trying to eject `/dev/hdc' using CD-ROM eject command
    eject: CD-ROM eject command failed
    eject: trying to eject `/dev/hdc' using SCSI commands
    eject: SCSI eject succeeded

    BTW, I DO have a CD-R[W] drive on that machine, but it works the same:

    $ eject -v /dev/scd0
    eject: device name is `/dev/scd0'
    eject: expanded name is `/dev/scd0'
    eject: `/dev/scd0' is not mounted
    eject: `/dev/scd0' is not a mount point
    eject: `/dev/scd0' is not a multipartition device
    eject: unable to open `/dev/scd0'

    $ eject -v /dev/cdrom1
    eject: device name is `/dev/cdrom1'
    eject: expanded name is `/dev/cdrom1'
    eject: `/dev/cdrom1' is a link to `/dev/scd0'
    eject: `/dev/scd0' is not mounted
    eject: `/dev/scd0' is not a mount point
    eject: `/dev/scd0' is not a multipartition device
    eject: unable to open `/dev/scd0'

    # eject -v /dev/cdrom1
    eject: device name is `/dev/cdrom1'
    eject: expanded name is `/dev/cdrom1'
    eject: `/dev/cdrom1' is a link to `/dev/scd0'
    eject: `/dev/scd0' is not mounted
    eject: `/dev/scd0' is not a mount point
    eject: `/dev/scd0' is not a multipartition device
    eject: trying to eject `/dev/scd0' using CD-ROM eject command
    eject: CD-ROM eject command succeeded

    Curious, the ATA/IDE drive ejects with the SCSI command, and the SCSI drive
    ejects with the CD-ROM command. ??? 8-(
    >
    > It is a bit strange to see "eject: `/dev/hdc' is not a mount point" when in
    > fstab it is defined this way;
    >
    > /dev/hdc /media/cdrecorder auto exec,noauto,users,ro 0 0
    >

    $ cat /etc/fstab
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    [big snip]
    /dev/scd0 /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
    /dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
    /dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0

    I never change this file: afraid to. There is little point anyway, since it
    is re-written everytime I boot.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 10:00:00 up 20 days, 20:31, 5 users, load average: 4.59, 4.66, 4.56

  4. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Jean-David Beyer wrote:

    > $ cat /etc/fstab
    > # This file is edited by fstab-sync - see 'man fstab-sync' for details
    > [big snip]
    > /dev/scd0 /media/cdrecorder auto pamconsole,exec,noauto,managed 0
    > 0
    > /dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0
    > 0
    > /dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0
    > 0
    >
    > I never change this file: afraid to. There is little point anyway, since
    > it is re-written everytime I boot.


    I did change the file after installing CentOS-4, it was one of the first
    things I did after the system re-booted. And it's not re-written when
    booting. I did visit bugzilla.redhat.com and found;

    https://bugzilla.redhat.com/bugzilla....cgi?id=163746

    https://bugzilla.redhat.com/bugzilla....cgi?id=144913

    And just as a point of reference;

    $ rpm -q udev hal
    udev-050-7.99_1.el4.at
    hal-0.4.2-1.EL4
    hal-0.4.2-1.EL4


    --
    "A personal computer is called a personal computer because it's yours,
    Anything that runs on that computer, you should have control over."
    Andrew Moss, Microsoft's senior director of technical policy, 2005

  5. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Jean-David Beyer wrote:
    > I cannot get eject to eject my IDE CD-ROM on my CentOS 4.2 system running
    > kernel kernel-smp-2.6.9-22.0.1.EL if I am just myself, but if I am root, it
    > works just fine. Both drives are actually /dev/hdc, and neither is SCSI.
    >
    > I checked the permissions of /usr/bin/eject and they come with permissions
    > -rwxr-xr-x. Changing them to -rwsr-xr-x "fixes" this, but I do not like to
    > leave it that way.
    >
    > On my RHEL 3 system, brw------- 1 jdbeyer disk 22, 0 Jun 24 2004 /dev/hdc
    >
    > On my RHEL 4 system, brw------- 1 jdbeyer disk 22, 0 Dec 16 11:47 /dev/hdc
    >
    > On the system that does not work, if I run eject -v, it tries various
    > methods to eject, and the SCSI one is selected, but works only as root.
    >
    > On the other system, that works normally, it selects the CD-ROM method to
    > eject and it does.
    >

    I have a CentOS 4.2 box, too, and this one has a Sony CDRW drive on it.
    Eject works fine. My drive is listed as follows in /etc/fstab

    /dev/hdc /media/cdrecorder auto pamconsole, fscontext=sys

  6. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Lenard wrote:
    > Jean-David Beyer wrote:
    >
    >
    >>$ cat /etc/fstab
    >># This file is edited by fstab-sync - see 'man fstab-sync' for details
    >>[big snip]
    >>/dev/scd0 /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
    >>/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
    >>/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
    >>
    >>I never change this file: afraid to. There is little point anyway, since
    >>it is re-written everytime I boot.

    >
    >
    > I did change the file after installing CentOS-4, it was one of the first
    > things I did after the system re-booted. And it's not re-written when
    > booting. I did visit bugzilla.redhat.com and found;
    >
    > https://bugzilla.redhat.com/bugzilla....cgi?id=163746
    >
    > https://bugzilla.redhat.com/bugzilla....cgi?id=144913


    All very well, but while the bug is posted, no solutions are.
    >
    > And just as a point of reference;
    >
    > $ rpm -q udev hal
    > udev-050-7.99_1.el4.at
    > hal-0.4.2-1.EL4
    > hal-0.4.2-1.EL4
    >

    $ rpm -q udev hal
    udev-039-10.10.EL4
    hal-0.4.2-1.EL4

    I wonder why your udev is more up to date when I allow up2date applet to run
    all the time and does not indicate I need anything (it does when CentOS
    thinks there is something).

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 17:00:00 up 21 days, 3:31, 5 users, load average: 4.34, 4.18, 4.09

  7. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Bruce Coryell wrote:
    > Jean-David Beyer wrote:
    >
    >> I cannot get eject to eject my IDE CD-ROM on my CentOS 4.2 system running
    >> kernel kernel-smp-2.6.9-22.0.1.EL if I am just myself, but if I am
    >> root, it
    >> works just fine. Both drives are actually /dev/hdc, and neither is SCSI.
    >>


    > I have a CentOS 4.2 box, too, and this one has a Sony CDRW drive on it.
    > Eject works fine. My drive is listed as follows in /etc/fstab
    >
    > /dev/hdc /media/cdrecorder auto pamconsole, fscontext=sys


    Why do they all come up with different definitions in /etc/fstab?

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 17:05:00 up 21 days, 3:36, 5 users, load average: 4.30, 4.20, 4.11

  8. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Jean-David Beyer wrote:

    > Lenard wrote:
    >> Jean-David Beyer wrote:
    >>
    >>
    >>>$ cat /etc/fstab
    >>># This file is edited by fstab-sync - see 'man fstab-sync' for details
    >>>[big snip]
    >>>/dev/scd0 /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
    >>>/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
    >>>/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
    >>>
    >>>I never change this file: afraid to. There is little point anyway, since
    >>>it is re-written everytime I boot.

    >>
    >>
    >> I did change the file after installing CentOS-4, it was one of the first
    >> things I did after the system re-booted. And it's not re-written when
    >> booting. I did visit bugzilla.redhat.com and found;
    >>
    >> https://bugzilla.redhat.com/bugzilla....cgi?id=163746
    >>
    >> https://bugzilla.redhat.com/bugzilla....cgi?id=144913

    >
    > All very well, but while the bug is posted, no solutions are.
    >>
    >> And just as a point of reference;
    >>
    >> $ rpm -q udev hal
    >> udev-050-7.99_1.el4.at
    >> hal-0.4.2-1.EL4
    >> hal-0.4.2-1.EL4
    >>

    > $ rpm -q udev hal
    > udev-039-10.10.EL4
    > hal-0.4.2-1.EL4
    >
    > I wonder why your udev is more up to date when I allow up2date applet to
    > run all the time and does not indicate I need anything (it does when
    > CentOS thinks there is something).


    Because I run vanilla kernels from kernel.org and with the 2.6.14.X I needed
    a newer version, so I visited http://atrpms.net/ and downloaded/installed
    the newer version. I also use yum with additional repositories instead of
    up2date.

    My fstab entries looked like your before editing.


    --
    "A personal computer is called a personal computer because it's yours,
    Anything that runs on that computer, you should have control over."
    Andrew Moss, Microsoft's senior director of technical policy, 2005

  9. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    On Sat, 17 Dec 2005 17:09:12 -0500, Jean-David Beyer wrote:

    > Why do they all come up with different definitions in /etc/fstab?


    my fstab is

    /dev/hdc /media/cdrom auto
    pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0

    and eject works fine

  10. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    Mario wrote:
    > On Sat, 17 Dec 2005 17:09:12 -0500, Jean-David Beyer wrote:
    >
    >
    >>Why do they all come up with different definitions in /etc/fstab?

    >
    >
    > my fstab is
    >
    > /dev/hdc /media/cdrom auto
    > pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0
    >
    > and eject works fine


    How do you get your /etc/fstab to stay that way (assuming that is the
    solution), since it gets re-written each time you reboot?

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 07:30:00 up 23 days, 18:01, 5 users, load average: 4.18, 4.20, 4.09

  11. Re: eject doesn't with RHEL 4 (actually CentOS 4.2)...

    On Tue, 20 Dec 2005 07:35:11 -0500, Jean-David Beyer wrote:

    > How do you get your /etc/fstab to stay that way (assuming that is the
    > solution), since it gets re-written each time you reboot?


    I don't know why you think it gets re-written, after reboot it's the same

    /dev/hdc /media/cdrom auto
    pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0

+ Reply to Thread