# mounting an iso

## bingobob

ok, this problem has been bugging the hell out of me for weeks.

I would like to mount an iso file.

```

ess iso # mount -o loop -t iso9660 foo.iso /mnt/iso

mount: Not a directory

ess iso # 

ess iso # ls -al /mnt/iso

total 8

drwxr-xr-x  2 root root 4096 Jul 17 18:06 .

drwxr-xr-x  8 root root 4096 Jul 17 17:26 ..

```

Anyone help, I am really stuck. I am root, the iso and the mount point exist. The iso is valid (i tried with another one). Loopback seems to be enabled in the kernel.

----------

## gnuageux

mount -t iso9660 /dev/cdroms/cdrom0 /mnt/cdrom is how Ive seen this done. (of course you can change the mnt points)

----------

## miqorz

That's for mounting a burnt iso to a disk, this is for mounting a .iso file..

Not on a disk.

----------

## bennettp

The -t is not usually needed.

I had the same preoblem when I moved to gentoo. Make sure you enable

Device Drivers -> Block Devices -> Loopback device support

in your kernel config.

EDIT: Oops, You say you've already done this  :Smile: 

----------

## bennettp

I just made a test iso and mounted it succesfully with:

$ mount foo.iso img/ -o loop

Make sure the module is loaded (if applicable) and make sure the /dev/loop devices exist.

(My /dev contains "/dev/loop/[0-9]" with symlinks "/dev/loop[0-9] -> loop/[0-9]". I use udev).

----------

## bingobob

wow, u chaps are quick !!! I went to make a cup of tea and have got 4 replies on this.

OK, i will try the new command..

```

ess iso # mount foo.iso /mnt/iso/ -o loop

mount: Not a directory

ess iso # 

```

no luck.

```

ess iso # ls -al /dev/loop*

lrwxrwxrwx  1 root root 6 Jul 23 18:36 /dev/loop0 -> loop/0

lrwxrwxrwx  1 root root 6 Jul 23 18:36 /dev/loop1 -> loop/1

lrwxrwxrwx  1 root root 6 Jul 23 18:36 /dev/loop2 -> loop/2

lrwxrwxrwx  1 root root 6 Jul 23 18:36 /dev/loop3 -> loop/3

lrwxrwxrwx  1 root root 6 Jul 23 18:36 /dev/loop4 -> loop/4

lrwxrwxrwx  1 root root 6 Jul 23 18:36 /dev/loop5 -> loop/5

lrwxrwxrwx  1 root root 6 Jul 23 18:36 /dev/loop6 -> loop/6

lrwxrwxrwx  1 root root 6 Jul 23 18:35 /dev/loop7 -> loop/7

/dev/loop:

total 0

drwxr-xr-x   2 root root    0 Jul 11 22:02 .

drwxr-xr-x  18 root root    0 Jul 24 08:23 ..

brw-rw----   1 root disk 7, 0 Jul 11 22:02 0

brw-rw----   1 root disk 7, 1 Jul 11 22:02 1

brw-rw----   1 root disk 7, 2 Jul 11 22:02 2

brw-rw----   1 root disk 7, 3 Jul 11 22:02 3

brw-rw----   1 root disk 7, 4 Jul 11 22:02 4

brw-rw----   1 root disk 7, 5 Jul 11 22:02 5

brw-rw----   1 root disk 7, 6 Jul 11 22:02 6

brw-rw----   1 root disk 7, 7 Jul 11 22:02 7

ess iso # 

```

Loopback is enabled in the kernel (not as a module as a *). Lemme just double check....

```

ess linux # cat .config | grep LOOP    

CONFIG_BLK_DEV_LOOP=y

# CONFIG_BLK_DEV_CRYPTOLOOP is not set

ess linux # 

```

Arrrhhh, what am i doing wrong?

----------

## bingobob

anyone?

----------

## ctford0

Are you sure this is a valid iso image and its not corrupted?  could you run checksum on it? 

Second, maybe try:

```
mount -o loop=/dev/loop0 file.iso /mnt/iso
```

chris

----------

## bingobob

Well, this is still not playing ball!

I took the iso in question to a windows machine to test it, by extraction and it works fine. I also tried another iso file altogether on gentoo but no luck (same results).

I tried reformatting the command as u specified also, nada.

What now?

----------

## jayc

Sounds like the /mnt/iso directory does not exist.  mkdir first if you haven't already.

----------

## bingobob

Thanks but....

```

bash-2.05b$ ls -al /mnt/   

total 32

drwxr-xr-x   8 root root 4096 Jul 17 17:26 .

drwxr-xr-x  18 root root 4096 Jun 27 17:03 ..

-rw-r--r--   1 root root    0 Jul 12 10:18 .keep

drwxr-xr-x   2 root root 4096 Jul 14 21:16 aqs-share

drwx------   2 root root 4096 Apr 12 23:28 cdrom

drwx------   2 root root 4096 Apr 12 23:28 floppy

drwxr-xr-x   2 root root 4096 Jul 17 18:06 iso

drwxr-xr-x   2 root root 4096 Jul 17 17:26 iso1

drwxr-xr-x   2 root root 4096 Jul  9 14:21 loop

bash-2.05b$ 

```

next....?

----------

## ctford0

You obviously have something wrong with your installation.  Mounting a loop device has always worked on this end with the commands previously suggest....

Are you running any unstable packages that would matter?  Which kernel are you using?  udev/devfs?

chris

----------

## bingobob

I still havent got this to work!

Heres the kernel ver.

No unstable stuff AFAIK.

cheers

bb

```

uname -a

Linux ess 2.6.7-gentoo-r11 #12 Thu Jul 29 14:27:40 CEST 2004 i686 Pentium II (Deschutes) GenuineIntel GNU/Linux

```

----------

