mount iso file

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

mount iso file

Postby register88 » 21 Jun 2009, 06:58

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.
register88
Junior Member
 
Posts: 21
Joined: 22 May 2009, 03:17

Postby mk » 21 Jun 2009, 08:05

first check is dvd.iso already accessed by other process, then change -u 0 let say -u 55 and mount /dev/md55
mk
Member
 
Posts: 300
Joined: 27 Nov 2008, 13:06

Postby SirDice » 21 Jun 2009, 08:10

register88 wrote: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.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16196
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby register88 » 21 Jun 2009, 10:00

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.
register88
Junior Member
 
Posts: 21
Joined: 22 May 2009, 03:17

Postby mk » 21 Jun 2009, 14:01

i receive permission denied when tried to use mdconfig as normal user, are you sure that you are root ?
mk
Member
 
Posts: 300
Joined: 27 Nov 2008, 13:06

Postby register88 » 22 Jun 2009, 02:23

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


Yes, i'm SURE
register88
Junior Member
 
Posts: 21
Joined: 22 May 2009, 03:17

Postby DutchDaemon » 22 Jun 2009, 09:09

Have you tried with -t cd9660?
User avatar
DutchDaemon
Old Fart
 
Posts: 10467
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby register88 » 22 Jun 2009, 10:06

DutchDaemon wrote: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.
register88
Junior Member
 
Posts: 21
Joined: 22 May 2009, 03:17

Postby DutchDaemon » 22 Jun 2009, 10:08

[man=8]mdconfig[/man]

Code: Select all
     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
User avatar
DutchDaemon
Old Fart
 
Posts: 10467
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby SirDice » 22 Jun 2009, 10:13

What are the permissions on the file you are trying to mount?
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16196
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby register88 » 22 Jun 2009, 10:53

DutchDaemon wrote:[man=8]mdconfig[/man]

Code: Select all
     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


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
Junior Member
 
Posts: 21
Joined: 22 May 2009, 03:17

Postby register88 » 22 Jun 2009, 11:01

SirDice wrote: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)
register88
Junior Member
 
Posts: 21
Joined: 22 May 2009, 03:17

Postby DutchDaemon » 22 Jun 2009, 11:12

Could you try copying the iso to a local filesystem and mounting from there?
User avatar
DutchDaemon
Old Fart
 
Posts: 10467
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby register88 » 23 Jun 2009, 02:45

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.
register88
Junior Member
 
Posts: 21
Joined: 22 May 2009, 03:17

Postby Carpetsmoker » 23 Jun 2009, 13:28

DutchDaemon wrote:Have you tried with -t cd9660?


DutchDaemon wrote:[man=8]mdconfig[/man]

Code: Select all
     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


-t cd9660 is not a valid option for [man=8]mdconfig[/man], this is an option for [man=8]mount[/man], which is very different.

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

Code: Select all
# 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...
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
User avatar
Carpetsmoker
Member
 
Posts: 905
Joined: 16 Nov 2008, 19:07
Location: Eindhoven, Netherlands


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests