You are not logged in.

#1 2007-08-27 13:32:12

vomix
Member
From: Belgium
Registered: 2007-05-02
Posts: 84

Trying to make an "iso-mount-script"!

Hi,

I'm trying to make a little script to mount *.iso files easily in thunar, but it doesn't work!

Here we go:

fstab line:

/home/eko/.iso /media/iso iso9660 noauto,user,ro,loop 0 0

the script:

#!/bin/sh
umount /media/iso
rm -f ~/.iso
ln -s "$@" ~/.iso
mount /media/iso

When I execute the script, the link is done, but nothing's mounted!

And when I'm typing "mount -v ~/.iso" in my terminal, I get this error:

mount: going to use the loop device /dev/loop0
ioctl: LOOP_SET_FD: Invalid argument
mount: failed setting up loop device

Any tips?

Thanks in advance.

Last edited by vomix (2007-08-27 13:54:55)

Offline

#2 2007-08-27 21:58:59

retsaw
Member
From: London, UK
Registered: 2005-03-22
Posts: 132

Re: Trying to make an "iso-mount-script"!

It should work.  Doing a Google search on that error message indicates that it might be a problem with the filesystem the the iso is on.  Is your ~/ mounted using NFS?

Offline

#3 2007-08-28 08:54:38

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Trying to make an "iso-mount-script"!

Just tried it and it works fine for me (local ext3 partition).


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#4 2007-08-28 12:42:35

vomix
Member
From: Belgium
Registered: 2007-05-02
Posts: 84

Re: Trying to make an "iso-mount-script"!

That's really weird!

I'm also using local ext3 FS...

And I've no problems when I use the following command (with fstab line commented):

mount -o loop -t iso9660 /path/to/iso/file/.iso /media/iso/

hmm

Offline

#5 2007-08-28 21:36:30

decaturguy
Member
From: Sweden
Registered: 2006-11-28
Posts: 117

Re: Trying to make an "iso-mount-script"!

Nautilus scripts to mount and unmount, i hope this can help you with your script.
This scripts are NOT mine found it somewhere i can't remember maybe Archlinux Forum smile

#!/bin/bash 
# 
for I in "$*" 
do 
foo=`gksudo -u root -k -m "enter your password for root terminal 
access" /bin/echo "got r00t?"` 
sudo mkdir /media/"$I" 
sudo mount -o loop -t iso9660 "$I" /media/"$I" && nautilus /media/"$I" --no-desktop 
done 
done 
exit0
#!/bin/bash 
# 
for I in "$*" 
do 
foo=`gksudo -u root -k -m "enter your password for root terminal 
access" /bin/echo "got r00t?"` 
sudo umount "$I" && zenity --info --text "Successfully unmounted /media/$I/" && sudo rmdir "/media/$I/" 
done 
done 
exit0

Offline

#6 2007-09-02 19:13:53

mezoko
Member
Registered: 2005-03-26
Posts: 310
Website

Re: Trying to make an "iso-mount-script"!

Works for me expect I can't get it to mount anything using thunar? How do you setup thunar?


"The only thing we have to fear is fear itself." - Franklin D. Roosevelt

Offline

#7 2007-09-02 21:55:15

decaturguy
Member
From: Sweden
Registered: 2006-11-28
Posts: 117

Re: Trying to make an "iso-mount-script"!

mezoko wrote:

Works for me expect I can't get it to mount anything using thunar? How do you setup thunar?

I don't use thunar but i found you  HOW-TO: Mount ISO script for Thunar here is the link http://ubuntuforums.org/showthread.php?t=380602

Offline

Board footer

Powered by FluxBB