yellowchicken Posted September 11, 2004 Report Share Posted September 11, 2004 Is there any vitural CD/DVD program that we can mount cd image (.iso ...) and use like a CD/DVD drive? Like this program for windows: http://www.daemon-tools.cc/dtcc/portal/portal.php Thanks Quote Link to comment Share on other sites More sharing options...
feralertx Posted September 11, 2004 Report Share Posted September 11, 2004 No extra program needed to do that ! All you need to do is mount your iso image in a directory of your choice, yeah, its that simple ! For example, we are mounting the file Mandrake_DVD.iso into the MDKDVD directory on my home partition, so we do (as root): mount -o loop -t iso9660 Mandrake_DVD.iso /home/feralertx/MDKDVD And thats about it, you can use the MDKDVD directory as you like. :lol: :lol: Quote Link to comment Share on other sites More sharing options...
yellowchicken Posted September 12, 2004 Author Report Share Posted September 12, 2004 :D thanks!! Quote Link to comment Share on other sites More sharing options...
papaschtroumpf Posted September 13, 2004 Report Share Posted September 13, 2004 (edited) Is there a way to make the mount point mountable by a user rather than root? I want to create a /mnt/iso mount point where a user can mount an iso file from the hardrive (specifically this is to be able to play homeworld without having to insert a CD, but I want /mnt/iso to be the generic mount point for iso in loopback). when I try to do the mount it tells me that only root can do that. Do I need to add something like that to my fstab: dev/loop0 /mnt/iso auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0 how do I know which loop device to use? EDIT: I do not want to dedicate a permanent mount point to the iso (i.e. not do something like adding "/full/path/isoimage.iso /mnt/iso iso9660 loop,user,noauto 0 0" to fstab Edited September 13, 2004 by papaschtroumpf Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted September 13, 2004 Report Share Posted September 13, 2004 You could use /dev/loop9 for example. I guess other tools using loop devices are unlikely to conflict with the use of loop9; they'd rather use loop0, I suppose. So yes, you could add a line like that to /etc/fstab: /dev/loop9 /mnt/img udf,iso9660,vfat,msdos user,ro,... Then you could have a "mymount.sh" script like that #!/bin/bash # $1: file (.iso, .img...) to mount losetup /dev/loop9 "$1" mount /mnt/img And "myumount.sh" script like that #!/bin/bash umount /dev/loop9 losetup -d /dev/loop9 I don't know if losetup requires root's privileges. You may have to configure sudo for allowing losetup without a password, and then add sudo in front of the lines beginning with losetup. Then you only have to configure your favourite file-manager to execute mymount.sh when you "open" a .iso or .img file. And put a shortcut icon somewhere for the umount part. But if you do this, be sure to add some security to the scripts: don't mount if already mounted; don't umount if not mounted. Yves. Quote Link to comment Share on other sites More sharing options...
papaschtroumpf Posted September 13, 2004 Report Share Posted September 13, 2004 Sounds like the right track. losetup can't be ran as a user though, and I keep reading that letting users losetup is a security risk. Maybe I'm going to be stuck to have a dedicated entry for each iso in the fstab file, each with its own mount point. Yuck! Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted September 14, 2004 Report Share Posted September 14, 2004 (edited) Letting users use losetup is not a security risk if: - you check that "$1" is, and ONLY is, ONE file ([ -f "$1" ]); - you give access to losetup with sudo, and only for parameters "/dev/loop9 *" and "-d /dev/loop9"; - you take care of /etc/fstab options, such as nodev,noexec... - you make sure /dev/loop9 is not mounted, nor attached, before trying to attach&mount it. Yves. Edited September 14, 2004 by theYinYeti Quote Link to comment Share on other sites More sharing options...
papaschtroumpf Posted September 15, 2004 Report Share Posted September 15, 2004 (edited) is it more secure than adding the following to my sudoers file: papaschtroumpf ALL=/bin/mount -t iso9660 *.iso /mnt/iso/ -o loop\,ro\,user or even: papaschtroumpf ALL = NOPASSWD: /bin/mount -t iso9660 *.iso /mnt/iso/ -o loop\,ro\,user it seems that either way I'm letting user papaschtroumpf mount any iso with user permissions. The game startup script then looks like: #!/bin/sh # Shell script wrapper for running Homeworld with the proper library search # location and mounting the ISO so you don't need to insert the disk # remove any previous mount sudo umount /mnt/iso # mount the ISO and make sure we point the game to it sudo mount -t iso9660 homeworld-linux.iso /mnt/iso/ -o loop,ro,user export HW_CDROM=/mnt/iso # launch the game LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH ./homeworld.bin $* # now unmount the ISO sudo umount /mnt/iso Edited September 15, 2004 by papaschtroumpf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.