# Kernel does not know loop? [SOLVED]

## diefast

I executed mount -o loop -t file directory.

I received a message:

silverbeast atmel.binaries # mount  -o loop -t ext2 ramdisk_minimal /ramd

mount: Could not find any loop device. Maybe this kernel does not know

       about the loop device? (If so, recompile or `modprobe loop'.)

In my dev folder, I have loop0 through loop7. Why can't I use loopback to mount a file?

Thanks in advance,

RKLast edited by diefast on Tue Dec 13, 2005 10:39 pm; edited 1 time in total

----------

## outspoken

 *diefast wrote:*   

> I executed mount -o loop -t file directory.
> 
> I received a message:
> 
> silverbeast atmel.binaries # mount  -o loop -t ext2 ramdisk_minimal /ramd
> ...

 

correct... loop is not in yout kernel by default. to set it up go into your kernal and enable it in the Device Drivers > Block Devices section.

you can check if it is enable or not by doing 'grep -i loop /usr/src/linux/.config' and check for 'CONFIG_BLK_DEV_LOOP=y' for enabled or '# CONFIG_BLK_DEV_LOOP is not set' for not disabled...

on a sidenote, a retired machine of mine is named silverbeast, named so as it was the first computer i case modded and what i did was brush all the aluminum to a shiny silver.

----------

## NeddySeagoon

diefast,

Do

```
grep LOOP /usr/src/linux/.config
```

output that includes 

CONFIG_BLK_DEV_LOOP=m or 

CONFIG_BLK_DEV_LOOP=y is a good sign

If you have the former, you need to

```
modprobe loop
```

 to be able to use it but it can be automated.

----------

## diefast

 *NeddySeagoon wrote:*   

> diefast,
> 
> Do
> 
> ```
> ...

 

my CONFIG_BLK_DEV_LOOP=n.

I went to /usr/src/linux and did make menuconfig and set it to module.

I recompiled the kernel and installed it in boot. Everything works now. 

Thank you for your help,

Roman

----------

## outspoken

 *diefast wrote:*   

>  *NeddySeagoon wrote:*   diefast,
> 
> Do
> 
> ```
> ...

 

glad its working... guess i need to work on making my solutions more clear! ;P

----------

## diefast

 *outspoken wrote:*   

>  *diefast wrote:*    *NeddySeagoon wrote:*   diefast,
> 
> Do
> 
> ```
> ...

 

Your info helped quite well. My problem was that I kept finding other loop named programs aka. cloop, cowloop.

I did not know, if I needed these programs at all. Instead I found from you, that I needed to go into the kernel and enable block devices->loopback support.

I am not quite sure what loopback does, as I am searching for the info at this time.

Thanks again,

Roman

----------

## NeddySeagoon

diefast,

The kernel loopback option allows you to mount a file as if it were a partition.

For example  

```
mount -o loop -t iso9660 /path/to/*.iso /mnt/floppy
```

mouts an iso image file on the mountpoint /mnt/floppy.

you can now use the file as if it was a real CD in your CD drive.

This works for any filesystem in a file - yoiu can create an empty file, make a filesystem in it and mount it.

All the usual operations are available. The two most comon uses and for *.iso files and making a custom initrd file.

An initrd file is a root filesystem within a file.

----------

## diefast

 *NeddySeagoon wrote:*   

> diefast,
> 
> The kernel loopback option allows you to mount a file as if it were a partition.
> 
> For example  
> ...

 

Thanks - Good to know.

RK

----------

