View previous topic :: View next topic |
Author |
Message |
xiaweitang Apprentice
Joined: 26 Feb 2010 Posts: 152
|
Posted: Mon Mar 01, 2010 6:43 am Post subject: Can't run programs in mounted iso file |
|
|
Code: | tux ~ # mount -t iso9660 -o loop,users mmm.iso /mnt/iso
tux ~ # /mnt/iso/install
bash: /mnt/iso/install: /bin/sh: bad interpreter: Permission denied
tux ~ # umount /mnt/iso
tux ~ # mount -t iso9660 -o loop,users,exec mmm.iso /mnt/iso
tux ~ # /mnt/iso/install
/mnt/iso/install: line 1241: .: /mnt/iso/update/install/: is a directory |
It seems from the last message that the install script itself is the problem. However, I have run it without a problem in other Linux machines. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Mon Mar 01, 2010 7:44 am Post subject: Re: Can't run programs in mounted iso file |
|
|
xiaweitang wrote: | Code: | tux ~ # mount -t iso9660 -o loop,users mmm.iso /mnt/iso
tux ~ # /mnt/iso/install
bash: /mnt/iso/install: /bin/sh: bad interpreter: Permission denied
tux ~ # umount /mnt/iso
tux ~ # mount -t iso9660 -o loop,users,exec mmm.iso /mnt/iso
tux ~ # /mnt/iso/install
/mnt/iso/install: line 1241: .: /mnt/iso/update/install/: is a directory |
It seems from the last message that the install script itself is the problem. However, I have run it without a problem in other Linux machines. |
What's the output of these?
Code: | $ ls -l /mnt/iso/install
$ file /mnt/iso/install
$ head /mnt/iso/install |
|
|
Back to top |
|
|
xiaweitang Apprentice
Joined: 26 Feb 2010 Posts: 152
|
Posted: Mon Mar 01, 2010 5:01 pm Post subject: |
|
|
Code: | tux ~ # ls -l /mnt/iso/install
-r-xr-xr-x 1 root root 43827 2009-06-29 16:11 /mnt/iso/install
tux ~ # file /mnt/iso/install
/mnt/iso/install: POSIX shell script text executable
tux ~ # head /mnt/iso/install
#!/bin/sh
#
# Name:
# install point of entry for MATLAB installation
#
# Usage:
# install -h | [-<arch>] [-debug] [ [-t] | [-x] ]
#
# Description:
# "install" is the point of entry for all MATLAB installations. |
|
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Mon Mar 01, 2010 10:42 pm Post subject: |
|
|
Can you also post the output for this command?
It seems like if your /bin/sh is messed or something. The script itself seems to be fine so it must be the interpreter which is failing. |
|
Back to top |
|
|
xiaweitang Apprentice
Joined: 26 Feb 2010 Posts: 152
|
Posted: Tue Mar 02, 2010 1:07 am Post subject: |
|
|
Code: | ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2010-02-27 13:22 /bin/sh -> bash |
I think that script must be run with sh, but it's linked to bash. Am I right? How can I get sh back? I hate bash! |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Tue Mar 02, 2010 8:19 am Post subject: |
|
|
xiaweitang wrote: | Code: | ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2010-02-27 13:22 /bin/sh -> bash |
I think that script must be run with sh, but it's linked to bash. Am I right? How can I get sh back? I hate bash! |
sh is symlinked to bash in 99% of the modern distros (in the rest it's probably linked to busybox). You have been probably using bash ever since you migrated to linux even if you think you hate it. The original bourne shell is rarely used nowadays, much less in linux. That's not the problem, in any case. Bash will run any sh script without problems, just like most shells around.
Are you sure the iso image is 100% correct? It seems like there's something messed up on it. |
|
Back to top |
|
|
boerKrelis Apprentice
Joined: 01 Jul 2003 Posts: 241 Location: The Netherlands
|
Posted: Tue Mar 02, 2010 10:14 am Post subject: |
|
|
Is your loop device mounted noexec, by any chance? 'mount' will tell you. |
|
Back to top |
|
|
xiaweitang Apprentice
Joined: 26 Feb 2010 Posts: 152
|
Posted: Wed Mar 03, 2010 9:31 pm Post subject: |
|
|
My iso file is on usb stick. And I run the following commands
Code: |
tux ~ # mount /dev/sdb2 /mnt/usb
tux ~ # ls /mnt/usb
lost+found mmm.iso
tux ~ # mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,noatime,errors=continue,data=writeback)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw,noatime,errors=continue)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
none on /proc/bus/usb type usbfs (rw,relatime,devgid=85,devmode=664)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/sdb2 on /mnt/usb type ext3 (rw)
tux ~ # mount -t iso9660 -o loop,users,exec /mnt/usb/mmm.iso /mnt/iso
tux liang # mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,noatime,errors=continue,data=writeback)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw,noatime,errors=continue)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
none on /proc/bus/usb type usbfs (rw,relatime,devgid=85,devmode=664)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/sdb2 on /mnt/usb type ext3 (rw)
/dev/loop0 on /mnt/iso type iso9660 (rw,nosuid,nodev) |
The last line says /dev/loop0 is rw, not rwx. Is that the cause of the problem? |
|
Back to top |
|
|
sam.reader n00b
Joined: 04 Mar 2010 Posts: 20
|
Posted: Thu Mar 04, 2010 8:49 am Post subject: |
|
|
I can't explain it in the technical language but it is possible to execute the programs directly from the ISO even without the need for mounting it by using the program Power ISO.
I regularly use it for purposes like this and it is very handy
Let me know if this works for you or not |
|
Back to top |
|
|
boerKrelis Apprentice
Joined: 01 Jul 2003 Posts: 241 Location: The Netherlands
|
Posted: Thu Mar 04, 2010 12:16 pm Post subject: |
|
|
xiaweitang wrote: |
The last line says /dev/loop0 is rw, not rwx. Is that the cause of the problem?
|
No. Neither is the fact that it's mounted nosuid (/mnt/iso/install is not setuid). |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9548 Location: beyond the rim
|
Posted: Fri Mar 05, 2010 4:23 pm Post subject: Re: Can't run programs in mounted iso file |
|
|
xiaweitang wrote: | It seems from the last message that the install script itself is the problem. |
Correct, but without knowing what the script tries to do at that step it's hard/impossible to say what the problem is. Anyway, the second error has nothing to do with the ISO, permissions or mount options.
Btw, using the "users" mount option on the commandline is rather pointless, it just causes confusion due to the other options implied by it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|