• Re: eject: using default device `/dev/sr0'

    From Dan Purgert@21:1/5 to William Torrez Corea on Mon Feb 17 02:20:01 2025
    On Feb 16, 2025, William Torrez Corea wrote:
    *eject: device name is `/dev/sr0'eject: /dev/sr0: not mountedeject:
    /dev/sr0: is whole-disk deviceeject: /dev/sr0: trying to eject using CD-ROM eject commandeject: CD-ROM eject command succeeded*

    I can't eject the optical drive, i try mount the device:

    *sudo mount -t iso9660 /dev/sr0 /mnt/cdrom*

    But i get the following error message:


    *mount: /mnt/cdrom: no medium found on /dev/sr0. dmesg(1) may have
    more information after failed mount system call.*

    Is there a CD/DVD inserted in the drive?

    --
    |_|O|_|
    |_|_|O| Github: https://github.com/dpurgert
    |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmeyjF4ACgkQbWVw5Uzn KGCZ4Q//ehc7sroMsFiGd70yfLKyzKXiX2Cv2B+Xn+XkpBKbGAZit/3LxnvZBWgh 34VjGsqiViP9LvfZeTyO/OIJlZvVvEhw1cihL0btbg5HXNWkWnXeelA4YuifYjcS ivfW9UZof7bUfzkKrvAugdC2U8YY2GgY9k976ZpApHEOKGH6Qcop0Z3taO0pgAB2 a4yCcdNx/LOJIQaX+aR0GwVCTVD7sOTFXRxT3RFPWfFwyXeIbnakIM0g3lW6hTZu wF7APYvZDdkPbn4j8acmLfT2shXckV+Me6PgAvb8nC5IE9kU0hothSieDc7p/HPL LEUAAUZxpPutZRsxYqlpr7WdVGLiBCJlgFYdqY0zvotcTK/OjVM9Qb7cWvF1U610 qxYIuw3lIDl2hn4uX3quJXJirosNPc/Azoj3AY8pfbLdj8zJ3+JzIZT7vthPp59O hYQVdpfZU/MtE2l57IpCI1SrXSEATI8qYxgjb8D/aYGXujY2BMFGJVBpnAceP/ag 7oOGx/b+abF9VpUX9JKxo7+S7io9f8Uf5JBSdvGQvxkOSDaOTWVboRvBYsWqD6bt b+sd2kTpgRSRW9ifJWW1xsoncL9q9v3xJ7HXA8DN0AqnXicHKv2Dt3+T1u5B9Cx7 KfgOHn+/LDauKrHfgpD83WgrTPRS6fJIhdO8On6JNRFGfoYSFIY=
    =7St3
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us
  • From Thomas Schmitt@21:1/5 to William Torrez Corea on Mon Feb 17 08:40:01 2025
    Hi,

    William Torrez Corea wrote:
    eject: device name is `/dev/sr0'
    ...
    eject: CD-ROM eject command succeeded

    I can't eject the optical drive

    That was with: eject -v /dev/sr0 ?

    What do you get from this program run

    xorriso -outdev /dev/sr0 -eject all


    i try mount the device:
    sudo mount -t iso9660 /dev/sr0 /mnt/cdrom
    But i get the following error message:
    mount: /mnt/cdrom: no medium found on /dev/sr0.
           dmesg(1) may have more information after failed mount system call.

    Was the tray with the medium already loaded and had any blinking
    already stopped ?

    (Linux has an old bug since 2008 which keeps it from waiting for the
    drive to become ready after the tray was pulled in automatically by
    e.g. mount(8) or open(2). Remedy is to insert the tray manually and
    to wait as human supervisor until blinking stops, or to use a burn
    program to load the tray. Only then perform mount.)


    [    2.952866] sr 1:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray

    So the operating system had at least some contact to the drive and was
    able to inquire some of its capabilities.


    We could watch the SCSI command dialog of xorriso with the drive:

    xorriso -scsi_log on -outdev /dev/sr0 \
    -toc -list_profiles all -eject all 2>&1 | \
    tee -i /tmp/xorriso_indev_eject.log

    This will be very verbose. Therefore the pipe to program "tee" which
    puts a copy into file
    /tmp/xorriso_indev_eject.log

    Please send the file to me in private in order not to flood the list.
    I will then inspect it and report if i find something enlightening.


    Have a nice day :)

    Thomas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?J=C3=B6rg-Volker_Peetz?=@21:1/5 to All on Mon Feb 17 12:30:01 2025
    In my experience, `cdrskin -eject` works more reliable than `eject`.

    Regards,
    Jörg.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Purgert@21:1/5 to mick.crane on Mon Feb 17 12:20:01 2025
    On Feb 17, 2025, mick.crane wrote:
    On 2025-02-17 01:09, Dan Purgert wrote:
    On Feb 16, 2025, William Torrez Corea wrote:
    *eject: device name is `/dev/sr0'eject: /dev/sr0: not mountedeject: /dev/sr0: is whole-disk deviceeject: /dev/sr0: trying to eject using CD-ROM
    eject commandeject: CD-ROM eject command succeeded*

    I can't eject the optical drive, i try mount the device:

    *sudo mount -t iso9660 /dev/sr0 /mnt/cdrom*

    But i get the following error message:


    *mount: /mnt/cdrom: no medium found on /dev/sr0. dmesg(1) may
    have
    more information after failed mount system call.*

    Is there a CD/DVD inserted in the drive?

    on bookworm without a cd in the tray.
    mick@courgette:~$ eject -v
    eject: using default device `/dev/sr0'
    eject: device name is `/dev/sr0'
    eject: /dev/sr0: not mounted
    eject: /dev/sr0: is whole-disk device
    eject: /dev/sr0: trying to eject using CD-ROM eject command
    eject: CD-ROM eject command succeeded

    mick@courgette:~$ eject
    doesn't report anything just ejects the tray.

    Okay, so you opened the CD Tray. Have you actually put a CD into the
    tray, and closed it?

    You "may" need to wait for the drive to finish reading the disc metadata
    (i.e. drive light stops flashing) before mount(1) will not complain
    about the lack of media. Not 100% sure if it's a generic problem, or
    just my crappy USB CD drive :)

    --
    |_|O|_|
    |_|_|O| Github: https://github.com/dpurgert
    |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmezGX4ACgkQbWVw5Uzn KGCrBhAApSml8mHbre3jkq2hSjx3lsLUzc/Zf/rUJeqmzd2YlbFfgu8HUC+TFRcE zllnGw03nHkJmommmk177HJe/wLHHxdAlMJbnVOACWJRDquNgDsbD3poUbN0aKxC fBMS1QTDseaHxkogrRv0KE4ZWjqg+YNa1ihyyE1EagKp5b0nnpDFD3CWZ4tRK8sR VfE9P2vHwIyxYNZlzjdtNQ8+YL+PGd2qodx6EX9aQAAkV2A7yYWE6pGHkUOQCajA XQV39QOboxcqMwibJZUvagSH/L9xYGNGAbhI9kPpB+7Ay4uRLKLpAi/6ausokBpB Qvd69voim1fZ+c8qWMoWgW1gVXydAznBMXIzVwmN/zEy55k0bhnS46E75tV8zLtl 2xrNhAD9CHzzyI6wZ63vnDyfjqiE/dPSBHE3170V4WQyzLQyvVEJRbr4a/s5scAS QnvjUv0GbjYXa3fbjeTgElUh9px1WaUzcAFXh4sOAxQOfwxw0GOFHTxlDnCQJxp6 RpeU4cOSEdzH0/W1gbzMHn+XbLei/0LoykhFPqwBnF2COWW0eFnBrB5FrM81Ahe4 vXZ2dBiFAt94ShHV6G6yFNmkt4wKl7WxK+gorFpCuHQtKzWgOWStYdi2oBWJkcvT 47iNdaTtvbqYd+UAoqgxpf7hOgUTG0SELcppW248fMf66V6cOFA=
    =0SCR
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us
  • From Thomas Schmitt@21:1/5 to Dan Purgert on Mon Feb 17 13:20:01 2025
    Hi,

    Dan Purgert wrote:
    You "may" need to wait for the drive to finish reading the disc metadata (i.e. drive light stops flashing) before mount(1) will not complain
    about the lack of media. Not 100% sure if it's a generic problem, or
    just my crappy USB CD drive :)

    It's a Linux kernel problem. I have seen it with a dozen different
    drives since Debian 8 of 2015, kernel 3.x.

    The kernel does not wait after emitting a START/STOP UNIT command until
    the drive reports success as answer to TEST UNIT READY commands.
    I diagnosed it in 2020 and submitted a patch.
    https://lore.kernel.org/linux-scsi/20201006094026.1730-1-scdbackup@gmx.net/T/#u
    But my social competence does not suffice for successful kernel work.

    (Also my research of kernel commits does not hold any more.
    2bbea6e11735 from march 2008 cannot be found. A commit from march 2018
    has the same title "cdrom: do not call check_disk_change() inside
    cdrom_open()" but a different commit id. It is too young for causing
    the problem back in Debian 8.)


    Jörg-Volker Peetz wrote:
    In my experience, `cdrskin -eject` works more reliable than `eject`.

    At least it waits for the drive to be ready before it orders it to
    become unready.

    Note that
    cdrskin -eject
    without dev= argument will first grope all optical drives of the
    computer in order to get a list of them and then chose the first one,
    which is most probably /dev/sr0 on a Linux system. This may last some
    time even if there is only one such drive.
    Consider to give the desired drive device file explicitely:

    cdrskin dev=/dev/sr0 -eject


    Have a nice day :)

    Thomas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Purgert@21:1/5 to Thomas Schmitt on Mon Feb 17 13:50:01 2025
    On Feb 17, 2025, Thomas Schmitt wrote:
    Hi,

    Dan Purgert wrote:
    You "may" need to wait for the drive to finish reading the disc metadata (i.e. drive light stops flashing) before mount(1) will not complain
    about the lack of media. Not 100% sure if it's a generic problem, or
    just my crappy USB CD drive :)

    It's a Linux kernel problem. I have seen it with a dozen different
    drives since Debian 8 of 2015, kernel 3.x.

    Ah, I've only had (crappy) USB drives since the 2008-era laptop's
    internal drive went wonky in, um 2010 or '12 or somewhere thereabouts.

    Good to know it's a larger issue, in the event I ever get a tower, or
    otherwise decent CD drive.

    --
    |_|O|_|
    |_|_|O| Github: https://github.com/dpurgert
    |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmezLkcACgkQbWVw5Uzn KGAuDxAAlPqYCYShJ9ybzBZ9uLeGw6MN3wRXxN6NF1mG9rWA1BB7qUClMaB9Qjns VE5crzl7pAMosG1NiPqxyh0fESH7WSej38n6QSVj0rR/3lwXrrZMUVgN/9sdkXv5 qLGKy28DFbTOGyy9IGtOluGI4CxFgVxwmhgtBa8vMSxJQjzZp2BYImwsELf3rS0p tXTWkrYbhULFVwOLAryUrwi6eLXlwLDpsOJQY3uGq5lCwaPCK7ocfcosTu4V7Otw hqaEEUr4PrgqwqtSHFhjPvSagg5kJqRu4ePLwGof7GLrED4sRKJMkd4er0nmAWp7 vBqbl9JN0O1He9ax6Fkm2sWjC11quiF7N0C0h7acaJWxaeZRqABINLQcFZTcZbby Y5/7KS0AbLQi7YkvZ/yrnKToSNG1l2K9evGcsBEt/L044bti5Oz10CsufBkK+BQF TCpvktCbbzIcnCI/7p95UDZ3rJldPN3z9+IKQa20ZoR38wKzdlX+XekU2Zm2eOPp xyE3dVEFQeZbbysSs30Wu6D9UJIsG0sODv96GI3RGu0LEPd4taiNsmAT4CBf40tx Sywv7AXVzdxTg49qEdZp/vKPBEBYSPJQ7tbUEcOhm8Chb54SfrdDF7EupvoAiOzS hqXCRUsAZEdQcqMyY8rvCuqXtCYAwS//Qfr6qK6mdvozerSt9tY=
    =1U/V
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us