Mount cdrom Linux

In Slackware Linux, you need to manually mount the cdrom from command line terminal before you are able to use it. In order to mount the cdrom, you must have root privilege. So if you are going to mount the cdrom from Slackware 13.1 x-window(KDE), open command line terminal from Start --> Applications --> Systems --> Terminal. In Slackware 12.2 x-window kde, Start --> System --> Konsole. You can also switch to the command line terminal to another virtual terminal by pressing Alt+(F2-F6) and login as a normal user.

What you need to do now is to gain root privilege. Invoke 'su -' command and enter root password. Now that we are already root, we are set to mount the cdrom. The mount syntax is 'mount /dev/cdrom /mount-point'. See the example below:

[email protected]:~$ su -
Password:

Psychology. Mind over matter.
Mind under matter? It doesn't matter.
Never mind.

[email protected]:~# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only
[email protected]:~#

If you are finish using your cd, you need to unmount the cdrom drive or the disk won't eject. To unmount the cdrom in Linux, use 'umount /mnt/cdrom' command. Change the '/mnt/cdrom' to where you mounted your cdrom. See umount example below:

[email protected]:~# umount /mnt/cdrom/
[email protected]:~#

Now you can press the eject button on the cdrom drive to manually eject cd. Also, you must not be on the mounted directory when issuing the umount command otherwise you'll get the 'device is busy' error message:

[email protected]:/mnt/cdrom# umount /mnt/cdrom/
umount: /mnt/cdrom: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
[email protected]:/mnt/cdrom#

That's it. However, the above mount command only valid for the first cdrom drive and only if you are using Slackware Linux. Ubuntu desktop automatically mount cdrom, there's no problem. If you are using other Linux distributions that need to manually mount the cdrom, keep on reading.

Here are some useful information about cdrom. If you have many cdrom drives such as a cd writer, dvd drive and dvd writer, then you should know that Linux assigns a unique name for each device. For example, if sata devices, the first cdrom would be /dev/sr0, the cd writer is /dev/sr1, the dvd writer is /dev/sr2 and so on. Linux detects sata devices as scsi devices. You can confirm it using 'cat /proc/scsi/scsi' command. If it's ide devices, the name can be different. You can check using command 'dmesg | grep cd' or 'dmesg | grep dvd'. See examples below:

Example checking cdrom using 'dmesg | grep cd' command.

[email protected]:~# dmesg | grep cd
sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
sr1: scsi3-mmc drive: 52x/52x writer dvd-ram cd/rw xa/form2 cdda tray
Bla bla bla
[email protected]:~#

Example checking cdrom using 'cat /proc/scsi/scsi' command.

[email protected]:~# cat /proc/scsi/scsi
Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: WDC WD1600AAJS-0 Rev: 05.0
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: HL-DT-ST Model: DVDRAM GSA-H62N Rev: CL00
Type: CD-ROM ANSI SCSI revision: 05

Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3250820SV Rev: 3.AC
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi5 Channel: 00 Id: 00 Lun: 00
Vendor: TSSTcorp Model: CDDVDW SH-S223C Rev: SB02
Type: CD-ROM ANSI SCSI revision: 05

Bla bla bla
[email protected]:~#

It's also fun using command line terminal to mount cdrom. You can open cdrom tray using the 'eject' command. When you invoke the eject command, the first cdrom tray will open. So you put the cd on the cd tray. Now, to close the tray, issue 'eject -T' command.

[email protected]:~# eject
[email protected]:~# eject -T

If you want to open the second cdrom drive's tray, invoke the command 'eject /dev/sr1' (change the name sr1 to your cdrom drive!). See the example below on how to open and close second cdrom tray:

[email protected]:~# eject /dev/sr1
[email protected]:~# eject -T /dev/sr1

You can mount cdrom on other cdrom drive (for example, on second cdrom drive) using the name of the drive. This command also applicable to those using other Linux distributions. Basiccally, you just select which cdrom device to mount and mount it somewhere. See example below:

[email protected]:~# mount /dev/sr1 /mnt/cdrom/
mount: block device /dev/sr1 is write-protected, mounting read-only
[email protected]:~#

If you are trying to mount an empty cdrom drive, Linux will give you 'No medium found' error message as in the example below:

[email protected]:~# mount /dev/sr1 /mnt/cdrom/
mount: No medium found
[email protected]:~#

Last note, we can copy files from cd even if we are a normal user. That means from x-window, we can navigate to the directory we mounted the cdrom and copy files to the computer using mouse as usual. However, we can't copy files from computer to the cd. The cd is mounting as a read-only. That's all. Have fun!

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.