# Unable to mount ISO, invalid argument



## raxterz (Sep 3, 2010)

Hello,  I am trying to mount a dual layer dvd ISO image under PC-BSD 8.0 and am having some problems.   I have been searching all night for answers and have found none.  Here's what I've tried:


```
sudo mdconfig -a -t vnode -f myiso.iso
```

(also tried with '-u 0' option added)

it seems to associate the md device or whatever successfully, at least there are no error messages.

then I try:

```
sudo mount -t cd9660 /dev/md0 /media/iso
```
or

```
sudo mount_cd9660 /dev/md0 /media/iso
```

they both give me the save error message:

```
mount_cd9660: /dev/md0: Invalid argument
```

I also tried this, as root:

```
mount_cd9660 -o ro /dev/`mdconfig -a -t vnode -f myiso.iso` /media/iso
```

but still the same error message.  can anyone please help me with this or point me in the direction of some information that might help?  Or does anyone know another way to mount isos?  I dont have any blank dual layer dvds, so i cant burn the image to dvd.  any help would be much appreciated. thanks in advance!


----------



## DutchDaemon (Sep 3, 2010)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-virtual.html#AEN26252


----------



## wblock@ (Sep 3, 2010)

raxterz said:
			
		

> Hello,  I am trying to mount a dual layer dvd ISO image under PC-BSD 8.0 and am having some problems.   I have been searching all night for answers and have found none.  Here's what I've tried:
> 
> 
> ```
> ...



See if it's really the right kind of filesystem:
`# file -s /dev/md0`

Might need to use md1 or a higher number if you've forgotten to remove previous md devices.


----------



## gordon@ (Sep 3, 2010)

You can also use tar(1) to read the iso:

```
tar tf myiso.iso
```

We have a very cool tar implementation.


----------



## raxterz (Sep 4, 2010)

wblock said:
			
		

> See if it's really the right kind of filesystem:
> `# file -s /dev/md0`
> 
> Might need to use md1 or a higher number if you've forgotten to remove previous md devices.



Thanks for the reply.  I used the command you specified and it gave me the following output:

```
/dev/md0: data
```
I'm guessing this means its not in ISO format, like it should be?  The only thing I can think would cause this is the ISO being corrupt somehow, but im not sure.

Also, between each time I ran the mdconfig command to create the md device, I ran 'mdconfig -du0' to remove the vnode I had created earlier.  That way I wasnt creating multiple devices or whatever.  (I think this is the correct way to do this)



			
				DutchDaemon said:
			
		

> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-virtual.html#AEN26252


Not sure if you didn't read my post correctly or maybe I am just confused, but this is almost precisely what I had tried already (actually read that linked page prior to posting).  Just for kicks, I tried it again, but got the same error message and result as before.  Thanks anyways though.



			
				gordon@ said:
			
		

> You can also use tar(1) to read the iso:
> 
> ```
> tar tf myiso.iso
> ...



This is very helpful, thank you!  I ran that command and it gave me absolutely no output.  I'm guessing this is confirmation that my ISO has become corrupt somehow?  I will try to rebuild the image or copy it from it's original source again to see if it will work then.  I will post back to update whether or not I get it working.

Thank you everyone for your replies!


----------



## raxterz (Sep 4, 2010)

Okay, unfortunately, I have recopied the ISO file and i am fairly certain that it is not corrupt or anything.  however, when I try to mount it using the commands as before, it still gives me the Invalid Argument error.  I have no idea what the problem is here.  Can anyone recommend any other programs I could use that will mount or extract ISOs?  Is there a Daemon Tools or Alcohol 120% equivalent for BSD?  I am stuck...

The only other option I can think of is going to the store and buying a dual layer DVD just to burn this ISO...and I dont want to do that because there has to be an easier way!


----------



## graudeejs (Sep 4, 2010)

have you tried to mount it with *-t udf*?


----------



## Galactic_Dominator (Sep 4, 2010)

does the md5 of the disc and iso match?


----------



## gordon@ (Sep 5, 2010)

It really sounds like a corrupt ISO if neither mdconfig(8) nor tar(1) let you read it.


----------



## rusty (Sep 5, 2010)

raxterz said:
			
		

> Okay, unfortunately, I have recopied the ISO file and i am fairly certain that it is not corrupt or anything.  however, when I try to mount it using the commands as before, it still gives me the Invalid Argument error.  I have no idea what the problem is here.  Can anyone recommend any other programs I could use that will mount or extract ISOs?  Is there a Daemon Tools or Alcohol 120% equivalent for BSD?  I am stuck...
> 
> The only other option I can think of is going to the store and buying a dual layer DVD just to burn this ISO...and I dont want to do that because there has to be an easier way!



A bit of hassle but what I've done a few times is copy the .iso to a partition I can share with Linux, boot a linux livecd, mount the partition and then the .iso, create a new .iso from there.
Move that back to the shared partition and then try it from within FreeBSD.

Example of the difference;

```
[CMD="$"]file rld-fou3.iso[/CMD]
rld-fou3.iso: data

[CMD="$"]file Fallout3.iso[/CMD]
Fallout3.iso: ISO 9660 CD-ROM filesystem data 'CDROM
```


----------



## richardpl (Sep 5, 2010)

FreeBSD's cd9660 implementation can not handle all versions from wild. I encounter several such ISO files now and than ...
I really do not care if I can not mount it in FreeBSD because there are programs which can (workarounds).


----------



## raxterz (Sep 9, 2010)

*Found another way...*

Hey, thanks for all the replies guys.  What I ended up doing was: boot into windows, mounted the ISO, then just copied the files from the ISO to my hard drive, then rebooted into FreeBSD.  Not sure why it wouldnt mount that one.  On a second note, I've since been mounting other ISOs (dual layer dvd images included) on my FreeBSD system with no problems whatsoever with the following commands:

```
mdconfig -a -t vnode -f myiso.iso

mount -t cd9660 /dev/md0 /mnt/iso
```




			
				killasmurf86 said:
			
		

> have you tried to mount it with *-t udf*?


I _think_ I tried this, but to be honest I cant completely remember.  I will remember to try that format as well if I have problems again.  Thanks.



			
				Galactic_Dominator said:
			
		

> does the md5 of the disc and iso match?


I did not bother checking this, although I probably should have.  So I don't know if the sums matched up.  Thanks though.


----------

