Thursday 19 July 2012

Mounting an executable CD Drive in Linux

I ran into the below problem while installing Matlab onto a Linux machine. Hopefully this will help someone else!

On most modern Linux systems, CD drives are automatically mounted. The problem comes when they are mounted without any exec permissions - this means that any scripts, etc on the CD, or .iso, will be unable to run. To resolve this, follow the steps below:
  1. Find the name of your mounted CD drive by using:
     mount  
    
  2. Then remount the device with the exec bit set:
     mount -o remount,exec $DEVICE
Where $DEVICE is the name of the CD drive.

You'll then be able to run all executables on the drive - in my case, the Matlab executable was then launched using the below commands:
 $ su  
 $ /path/to/mounted/cdrom/./install  

Remember to logout as root when the installer has finished!
 logout  

1 comment:

  1. the great thing about the command

    mount -o remount,exec $DEVICE

    is that the device must already be mounted. LOL !!

    ReplyDelete

Please leave a comment if you find this blog helpful or interesting! I'd love to hear from you!