How to check if a cdrom is in the tray remotely (via ssh)?

Posted by adempewolff on Ask Ubuntu See other posts from Ask Ubuntu or by adempewolff
Published on 2012-09-06T09:10:12Z Indexed on 2012/09/06 9:49 UTC
Read the original article Hit count: 429

Filed under:
|
|
|
|

I have a server running Ubuntu 10.04 (it's on the other side of the world and I haven't built up the wherewithal to upgrade it remotely yet) and I have been told that there is a CD in one of it's two CD drives. I want to rip an image of the cd and then download it to my local computer (I don't need help with either of these steps).

However, I cannot seem to confirm whether or not there actually is a CD in the drive as I was told. It did not automatically mount anywhere (which I'm thinking might just be a result of it being a headless server not running X, nautilus, or any of the other nice user friendly things).

There are two CD drives connected via SCSI:

austin@austinvpn:/proc/scsi$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD400EB-75CP Rev: 06.0
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: Lite-On  Model: LTN486S 48x Max  Rev: YDS6
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi1 Channel: 00 Id: 01 Lun: 00
  Vendor: SAMSUNG  Model: CD-R/RW SW-248F  Rev: R602
  Type:   CD-ROM                           ANSI  SCSI revision: 05

However when I try mounting either of these devices (and every other device that could possibly be the cd-drive), it says no medium found:

austin@austinvpn:/proc/scsi$ sudo mount -t iso9660 /dev/scd1 /cdrom
mount: no medium found on /dev/sr1
austin@austinvpn:/proc/scsi$ sudo mount -t iso9660 /dev/scd0 /cdrom
mount: no medium found on /dev/sr0
austin@austinvpn:/proc/scsi$ sudo mount -t iso9660 /dev/cdrom /cdrom
mount: no medium found on /dev/sr1
austin@austinvpn:/proc/scsi$ sudo mount -t iso9660 /dev/cdrom1 /cdrom
mount: no medium found on /dev/sr0
austin@austinvpn:/proc/scsi$ sudo mount -t iso9660 /dev/cdrw /cdrom
mount: no medium found on /dev/sr1

Here are the contents of my /dev folder:

austin@austinvpn:/proc/scsi$ ls /dev
agpgart          loop6               ram6      tty10  tty38  tty8
austinvpn        loop7               ram7      tty11  tty39  tty9
block            lp0                 ram8      tty12  tty4   ttyS0
bsg              mapper              ram9      tty13  tty40  ttyS1
btrfs-control    mcelog              random    tty14  tty41  ttyS2
bus              mem                 rfkill    tty15  tty42  ttyS3
cdrom            net                 root      tty16  tty43  urandom
cdrom1           network_latency     rtc       tty17  tty44  usbmon0
cdrw             network_throughput  rtc0      tty18  tty45  usbmon1
char             null                scd0      tty19  tty46  usbmon2
console          oldmem              scd1      tty2   tty47  usbmon3
core             parport0            sda       tty20  tty48  usbmon4
cpu_dma_latency  pktcdvd             sda1      tty21  tty49  vcs
disk             port                sda2      tty22  tty5   vcs1
dri              ppp                 sda5      tty23  tty50  vcs2
ecryptfs         psaux               sg0       tty24  tty51  vcs3
fb0              ptmx                sg1       tty25  tty52  vcs4
fd               pts                 sg2       tty26  tty53  vcs5
full             ram0                shm       tty27  tty54  vcs6
fuse             ram1                snapshot  tty28  tty55  vcs7
hpet             ram10               snd       tty29  tty56  vcsa
input            ram11               sndstat   tty3   tty57  vcsa1
kmsg             ram12               sr0       tty30  tty58  vcsa2
log              ram13               sr1       tty31  tty59  vcsa3
loop0            ram14               stderr    tty32  tty6   vcsa4
loop1            ram15               stdin     tty33  tty60  vcsa5
loop2            ram2                stdout    tty34  tty61  vcsa6
loop3            ram3                tty       tty35  tty62  vcsa7
loop4            ram4                tty0      tty36  tty63  vga_arbiter
loop5            ram5                tty1      tty37  tty7   zero

And here is my fstab file:

austin@austinvpn:/proc/scsi$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/austinvpn-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=ed5520ae-c690-4ce6-881e-3598f299be06 /boot           ext2    defaults        0       2
/dev/mapper/austinvpn-swap_1 none            swap    sw              0       0

Am I missing something/doing something wrong, or is there just no CD in the drive or is the drive possibly broken? Is there any nice command to list devices with mountable media?

Thanks in advance for any help!

© Ask Ubuntu or respective owner

Related posts about mount

  • 12.10 update breaks NFS mount

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I've just upgraded to the latest 12.10 beta. Rebooted twice. The problem is with the NFS folders not mounting, here's a verbose log. # mount -v myserver:/nfs_shared/tools /tools/ mount: no type was given - I'll assume nfs because of the colon mount.nfs: timeout set for Mon Oct 1 11:42:28 2012 mount… >>> More

  • Mount SMB / AFP 13.10

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I cannot seem to get Ubuntu to mount a mac share via SMB or AFP. I've tried the following... AFP: apt-get install afpfs-ng-utils mount_afp afp://user:password@localip/share /mnt/share Error given: "Could not connect, never got a reponse to getstatus, Connection timed out". Which is odd as I can… >>> More

  • Mount Return Code for CIFS mount

    as seen on Server Fault - Search for 'Server Fault'
    When I run the following command (as root or via sudo) from a bash script I get an exit status (or return code in mount man page parlance) of 1: mount -v -t cifs //nasbox/volume /tmpdir/ --verbose -o credentials=/root/cifsid & /tmp/mylog It outputs the following into the myflog file: parsing… >>> More

  • Disable raid member check upon mount to mount damaged nvidia raid1 member

    as seen on Server Fault - Search for 'Server Fault'
    Hi, A friend of mine destroyed his Nvidia RAID1 array somehow and in trying to fix it, he ended up with a non-working array. Because of the RAID metadata, the actual disk data was stored at an offset from the beginning. I was able to identify this offset with dd and a hexeditor and then I used losetup… >>> More

  • Network shares do not mount.

    as seen on Super User - Search for 'Super User'
    My network shares were mounting fine yesterday.. suddenly they are not. They were mounting fine for the last two weeks or however long since I added them. When I run sudo mount -a I get the following error: topsy@monolyth:~$ sudo mount -a mount error(12): Cannot allocate memory Refer to the mount… >>> More

Related posts about cd