# Unable to mount mdf or iso files (SOLVED)

## GoofballJM1

I have been messing with this for days and can't get a straight answer.  I am trying to mount an MDF file or an ISO file on my machine.  Unfortunately, regardless of the format, I am getting the same error message.  the loop module is loaded in RAM and I still keep getting this message regardless of the format:

```
hostname@user # mount -t iso9660 ~/image.iso  /mnt/folder/ -o loop=/dev/loop0

mount: wrong fs type, bad option, bad superblock on /dev/loop0,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so
```

Any ideas.  cdemu doesn't work either.  I just want to mount this temporarily, so I don't want a huge graphical application to do a simple task I should be able to do from the command line.  I have a RAM drive enabled in the kernel, that could be tying up the loop block device.  Any and all ideas are welcome.

----------

## Sadako

What does dmesg report after the error?

What about manually setting up the loop via losetup, and mounting that, and trying something other than /dev/loop0 as eight of them should be available by default.

----------

## LesCoke

try:  mount -o loop -t iso9660 ~/image.iso  /mnt/folder

mount will automatically select an available loop device.

The only case that I know of where I need to specify a particular loop device is when I use losetup to attach a loop device to an image file that is being accessed as a device instead of being mounted, even then:  losetup -sf image.iso   causes losetup to automatically select an available loop device and display the allocated device name.

Les

----------

## GoofballJM1

Thanks for the advice:

Same issue when I tried your suggestion.  I had tried it earlier this week without any luck.

```
mount -o loop -t iso9660 ~/image.iso /mnt/folder/

mount: wrong fs type, bad option, bad superblock on /dev/loop0,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so
```

here's the output of my dmesg

```
csi 0:0:0:0: CD-ROM            CDEmu    Virt. CD/DVD-ROM 0.01 PQ: 0 ANSI: 0

scsi 0:0:0:0: Attached scsi generic sg0 type 5

sr0: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray

Uniform CD-ROM driver Revision: 3.20

sr 0:0:0:0: Attached scsi CD-ROM sr0

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

FAT: bogus number of FAT structure

VFS: Can't find a valid FAT filesystem on dev loop0.

FAT: bogus number of FAT structure

VFS: Can't find a valid FAT filesystem on dev loop0.

Unable to identify CD-ROM format.

SMB connection re-established (-5)

Unable to identify CD-ROM format.

SMB connection re-established (-5)

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

Unable to identify CD-ROM format.

SMB connection re-established (-5)

Unable to identify CD-ROM format.
```

Strange, even though I'm telling mount that the filesystem is iso9660, it is looking for a FAT filesystem.

----------

## LesCoke

I see in your dmesg output that you have cdemu.  cdemu will allow you to bypass alot of the loop stuff and allow you to mount the emulated cdrom just like a physical device.

I'm thinking that the ~/image.iso is not a regular iso9660 image.  Do you know how the image was created?  

try: od -Ad -c ~/image.iso | more

if this is an iso9660 image you should see something like the following:

```
0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0

*

0032768 001 C D 0 0 1 001 \0

...

```

pay particular attention to the address that appears for 32768, an iso9660 image should have 32768.   If the file was a nero .nrg image it can be other values typically 339968.  To correct for this we need to skip the extra bytes at the beginning of the image file.  In this case 339968-32768=307200, so offset=307200 needs to be added to the mount command as follows:

mount -o loop,offset=307200 -t iso9660 ~/image.iso /mnt/folder

Depending on what you see using the od command, you may find that you have something other than an iso9660 image, could it be a raw image?

if the address number from od does not subtract to a number that is evenly divisible by 2048, you most likely have a raw image.  CDEmu should be able to mount a raw image to one of it's virtual devices that you then should be able to mount just like you would the physical cdrom device.

The 307200 offset trick seems to only work for certain nero images, a program called nrg4iso can possibly convert such files.  There is also an mdf2iso program as well.  But I think CDEmu should handle both as is.

Les

----------

## GoofballJM1

I was able to successfully mount the image.  I had an MDF of the same file, that I converted to ISO using mdf2iso.  The image mounted successfully!  Thanks for your help!

----------

