# mount iso file



## register88 (Jun 21, 2009)

I want mount the dvd.iso file, when i use the mdconfig, it always show this warnings:

root@FreeBSD64/samba/movie# mdconfig -a -t vnode -f Museum2009.iso -u 0
mdconfig: ioctl(/dev/mdctl): Permission denied

root@FreeBSD64/samba/movie# ls -lt /dev/mdctl 
crw-------  1 root  wheel    0,  71  6 21 09:40 /dev/mdctl

My system is FreeBSD/amd64/7.2-stable.

I can use the virtualbox mount the dvd.iso file to guest OS cdrom drive(and watch the dvd), so i think the problem shall not be the dvd.iso file.

How to mount the dvd.iso file on FreeBSD?

Please help, thank you.


----------



## mk (Jun 21, 2009)

first check is dvd.iso already accessed by other process, then change -u 0 let say -u 55 and mount /dev/md55


----------



## SirDice (Jun 21, 2009)

register88 said:
			
		

> I want mount the dvd.iso file, when i use the mdconfig, it always show this warnings:
> 
> root@FreeBSD64/samba/movie# mdconfig -a -t vnode -f Museum2009.iso -u 0
> mdconfig: ioctl(/dev/mdctl): Permission denied


Try without using -u. There may already be a /dev/md0.


----------



## register88 (Jun 21, 2009)

Hi, i tried
mdconfig -a -t vnode -f /samba/movie/Museum2009.iso
and
mdconfig -a -t vnode -f /samba/movie/Museum2009.iso -u 55
the result is same.

mdconfig: ioctl(/dev/mdctl): Permission denied

and my system have not and md[0-9]
ls -l /dev/md*
crw-------  1 root  wheel    0,  71  6 21 09:40 /dev/mdctl

Thank you, please help.


----------



## mk (Jun 21, 2009)

i receive permission denied when tried to use mdconfig as normal user, are you sure that you are root ?


----------



## register88 (Jun 22, 2009)

mk said:
			
		

> i receive permission denied when tried to use mdconfig as normal user, are you sure that you are root ?



Yes, i'm SURE


----------



## DutchDaemon (Jun 22, 2009)

Have you tried with -t cd9660?


----------



## register88 (Jun 22, 2009)

DutchDaemon said:
			
		

> Have you tried with -t cd9660?



What is that mean?
mount_cd9660?
no, i have not tried, can you tell me more, i want to try it.
please help, thank you.


----------



## DutchDaemon (Jun 22, 2009)

mdconfig(8)


```
To create an md(4) device out of an ISO 9660 CD image file (-a and -t
     vnode are implied), using the first available md(4) device, and then
     mount the new memory disk:

           mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt
```


----------



## SirDice (Jun 22, 2009)

What are the permissions on the file you are trying to mount?


----------



## register88 (Jun 22, 2009)

DutchDaemon said:
			
		

> mdconfig(8)
> 
> 
> ```
> ...



root@/samba/movie# mount -t cd9660 /dev/`mdconfig -f Museum2009.iso` /mnt
mdconfig: ioctl(/dev/mdctl): Permission denied
mount_cd9660: /dev: Block device required

Any idea, it will Permission denied?
ever do it as root.


----------



## register88 (Jun 22, 2009)

SirDice said:
			
		

> What are the permissions on the file you are trying to mount?



I'm sure the file system is mount as read and write permissions.
because i can read/write other file in this directory /samba/movie

root@/samba/movie# ls -l Museum2009.iso 
-rwxr-xr-x  1 samba  samba  4298829824  6 19 00:05 Museum2009.iso

root@/samba/movie# mount -v /samba
//SAMBA@PDC/SHARE on /samba (smbfs, fsid 0cff000a0a000000)


----------



## DutchDaemon (Jun 22, 2009)

Could you try copying the iso to a local filesystem and mounting from there?


----------



## register88 (Jun 23, 2009)

Sorry everyone, i know the problem now, the problem is the Museum2009.iso file is readonly.
this command can solve it:
mdconfig -a -t vnode -o readonly -f /samba/movie/Museum2009.iso

Thank all.


----------



## Carpetsmoker (Jun 23, 2009)

DutchDaemon said:
			
		

> Have you tried with -t cd9660?





			
				DutchDaemon said:
			
		

> mdconfig(8)
> 
> 
> ```
> ...



-t cd9660 is not a valid option for mdconfig(8), this is an option for mount(8), which is very different.

mdconfig just creates a memory disk, it does nothing with filesystems, for example:


```
# mdconfig -at vnode -f /ports/INDEX-7 
md0
# head -c 70 /dev/md0
accerciser-1.6.1|/usr/ports/accessibility/accerciser|/usr/local|Intera
```

As a sidenote, you should probably use UDF for DVD's, not cd9660...


----------

