我尝试从终端打开 CD-ROM,但显示错误;
eject: unable to find or open device for: `/dev/cdrom'
我尝试使用以下命令查找 CD-ROM:
sy@shiv:~$ sudo lshw -C disk
*-disk
description: SCSI Disk
product: Card Reader
vendor: Multiple
physical id: 0.0.0
bus info: scsi@6:0.0.0
logical name: /dev/sdb
version: 1.00
size: 3837MiB (4023MB)
capabilities: removable
configuration: logicalsectorsize=512 sectorsize=512
*-medium
physical id: 0
logical name: /dev/sdb
size: 3837MiB (4023MB)
capabilities: partitioned partitioned:dos
*-disk
description: ATA Disk
product: ST9500325AS
vendor: Seagate
physical id: 0.0.0
bus info: scsi@1:0.0.0
logical name: /dev/sda
version: LVM1
serial: S2WJMH7Q
size: 465GiB (500GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=fbac54d6-645e-4020-9ed3-16cff0ed5c03 logicalsectorsize=512 sectorsize=512
lsblk
也没有显示 CD-ROM:
sy@shiv:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 3.8G 0 disk
└─sdb1 8:17 1 3.8G 0 part /media/sy/75E3-0CE2
sda 8:0 0 465.8G 0 disk
├─sda4 8:4 0 95.4G 0 part /
├─sda2 8:2 0 270G 0 part
├─sda3 8:3 0 3.9G 0 part [SWAP]
└─sda1 8:1 0 512M 0 part /boot/efi
答案1
$ sudo lshw -C disk
*-disk
…
*-cdrom
description: DVD-RAM writer
product: DVDRAM GT50N
vendor: HL-DT-ST
physical id: 0.0.0
bus info: scsi@1:0.0.0
logical name: /dev/sr0
version: LT20
capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
configuration: ansiversion=5 status=nodisc
*-disk
…
它看起来应该是这样的。/dev/sr0
如果您有多个光驱,您的设备应该被命名或类似的东西。/dev/cdrom 和 /dev/dvdrom 是指向 /dev/sr0 的符号链接,它们不必存在并且似乎不再生成。
如果您确实有光盘驱动器连接到计算机,那么 Ubuntu 无法检测到它,您需要调查原因。确保驱动器连接正确(USB?SATA?)并且有足够的电力来操作驱动器(某些 USB 端口和某些驱动器播放效果不佳)。您可能会在 中找到提示dmesg
。
如果设备可以运行,它也应该出现在 lsblk 和 /dev 中。/dev/disk/by-path
这可能是您在排除硬件问题时最有用的表示。
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
…
sr0 11:0 1 1024M 0 rom
…
$ ll /dev/disk/by-path/
total 0
drwxr-xr-x 2 root root 280 Nov 16 10:36 ./
drwxr-xr-x 8 root root 160 Nov 16 11:01 ../
lrwxrwxrwx 1 root root 9 Nov 16 11:01 pci-0000:00:1f.2-ata-1 -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 16 11:01 pci-0000:00:1f.2-ata-1-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 16 11:01 pci-0000:00:1f.2-ata-1-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Nov 16 11:01 pci-0000:00:1f.2-ata-1-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Nov 16 11:01 pci-0000:00:1f.2-ata-1-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Nov 16 10:25 pci-0000:00:1f.2-ata-1-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Nov 16 10:19 pci-0000:00:1f.2-ata-1-part6 -> ../../sda6
lrwxrwxrwx 1 root root 9 Nov 27 09:10 pci-0000:00:1f.2-ata-2 -> ../../sr0
lrwxrwxrwx 1 root root 9 Nov 16 11:01 pci-0000:00:1f.2-ata-3 -> ../../sdb
lrwxrwxrwx 1 root root 10 Nov 16 11:01 pci-0000:00:1f.2-ata-3-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Nov 16 11:01 pci-0000:00:1f.2-ata-3-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Nov 16 11:01 pci-0000:00:1f.2-ata-3-part3 -> ../../sdb3