Linux Install fails due to noexec mount option on CDROM/DVD

Linux Install fails due to noexec mount option on CDROM/DVD

Published 02/20/2009 12:24 AM   |    Updated 05/04/2010 08:48 AM


Certain Linux distributions have a default setting for CDROM/DVD devices where a "noexec" option is used when mounting the device.  This causes the installer to fail with the following error:


-bash: ./cvpkgadd: /bin/sh: bad interpreter: Permission denied

 

Cause:


Some Linux systems have enhanced security that mount CDROM/DVD devices with the "noexec" option.   This prevents applications/scripts from being executed directly from the device when mounted.

 

Resolution:


To resolve this issue, turn off the "noexec" option after the CD/DVD is mounted.  This can be done using the mount command with the "remount" option combined with the "exec" option.  This will then allow the installer to run directly from the CD/DVD.


Here is an example ot the command.


First, here is a device mounted with the noexec option:


zephyr:~ # mount | grep DISC2
/dev/hdb on /media/DISC2 type subfs (ro,noexec,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8)
zephyr:~ #
 


Here is an attempt to run the installer:


zephyr:~ # cd /media/DISC2/galaxy/
zephyr:/media/DISC2/galaxy # ./cvpkgadd
-bash: ./cvpkgadd: /bin/sh: bad interpreter: Permission denied
zephyr:/media/DISC2/galaxy #


Here is the command to remove the "noexec" option on the mounted CD/DVD:


zephyr:/media/DISC2/galaxy # mount -o remount,exec /media/DISC2
zephyr:/media/DISC2/galaxy # mount | grep DISC2
/dev/hdb on /media/DISC2 type subfs (ro,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8)
zephyr:/media/DISC2/galaxy #


The "noexec" option is no longer there, and the installer will now run.

请使用浏览器的分享功能分享到微信等