Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 07:20 PM
heavytull
 
Posts: n/a
Default loop module

the "loop" module on my linux box is not loaded itself when needed by mount.

when I type mount -o loop ...

While this module does not appear in the blacklist of modprobe
(/etc/modprobe.d/blacklist)

--
heavytull
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 07:21 PM
William Hunt
 
Posts: n/a
Default Re: loop module

On Fri, 15 Dec 2006, heavytull wrote:
> the "loop" module on my linux box is not loaded itself when needed by mount.
> when I type mount -o loop ...
> While this module does not appear in the blacklist of modprobe
> (/etc/modprobe.d/blacklist)


i'll bet you've gone and mucked with your kernel, hey?
so what happens if you force a modprobe loop ?
and what do you get out of:

$ grep -i loop /boot/config /proc/devices

--
William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 07:21 PM
heavytull
 
Posts: n/a
Default Re: loop module

William Hunt wrote:

> On Fri, 15 Dec 2006, heavytull wrote:
>> the "loop" module on my linux box is not loaded itself when needed by
>> mount. when I type mount -o loop ...
>> While this module does not appear in the blacklist of modprobe
>> (/etc/modprobe.d/blacklist)

>
> i'll bet you've gone and mucked with your kernel, hey?

you mean?
you mean that i custom tuned the kernel?
yes i'm doing so since long. but I don't think this is related to that. the
troubles with loop and some others started when i upgraded to Slack11


> so what happens if you force a modprobe loop ?

the module gets loaded and works fine

> and what do you get out of:
>
> $ grep -i loop /boot/config /proc/devices
>

/boot/config : file does not exist
grep -i loop /proc/devices : nothing




--
heavytull
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 07:21 PM
Henrik Carlqvist
 
Posts: n/a
Default Re: loop module

heavytull <heavytull@hotmail.com> wrote:
>>> the "loop" module on my linux box is not loaded itself when needed by
>>> mount. when I type mount -o loop ...
>>> While this module does not appear in the blacklist of modprobe
>>> (/etc/modprobe.d/blacklist)


I'm only guessing now, but this is what I would think is the
explanation: Blacklist is used by hotplug. Hotplug loads modules when it
finds new hardware. As there is no particular hardware associated with the
loopback module it won't be loaded by hotplug.

>> i'll bet you've gone and mucked with your kernel, hey?

> you mean?
> you mean that i custom tuned the kernel?
> yes i'm doing so since long. but I don't think this is related to that.


I think it does if the default kernel has loopback built in and not as a
module.

>> so what happens if you force a modprobe loop ?


> the module gets loaded and works fine


So you have 3 choices:

1) Manually load the module before doing a loopback mount and then maybe
manually unload the module after umount.

2) Allways have the module loaded, maybe from /etc/rc.d/rc.modules.

3) If you like the automatic solution nr 2 above you might just as well
build a kernel with loopback support built in.

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc8(at)uthyres.com Examples of addresses which go to spammers:
root@variousus.net root@localhost

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 07:21 PM
Peter
 
Posts: n/a
Default Re: loop module

On Sat, 16 Dec 2006 00:23:23 +0100, heavytull wrote:

> William Hunt wrote:
>
>> On Fri, 15 Dec 2006, heavytull wrote:
>>> the "loop" module on my linux box is not loaded itself when needed by
>>> mount. when I type mount -o loop ...
>>> While this module does not appear in the blacklist of modprobe
>>> (/etc/modprobe.d/blacklist)

>>
>> i'll bet you've gone and mucked with your kernel, hey?

> you mean?
> you mean that i custom tuned the kernel?
> yes i'm doing so since long. but I don't think this is related to that. the
> troubles with loop and some others started when i upgraded to Slack11
>
>
>> so what happens if you force a modprobe loop ?

> the module gets loaded and works fine
>
>> and what do you get out of:
>>
>> $ grep -i loop /boot/config /proc/devices
>>

> /boot/config : file does not exist
> grep -i loop /proc/devices : nothing
>


Are you using loop for an encrypted file system? If so, note that
cryptoloop is deprecated and not recommended. device mapper is used now
and you will also need the dm-mod module. You also need to make sure the
relevant encryption modules (e.g. aes-256) are loaded

Exactly what is your mount command? Here is my routine for loading an
encrypted fs.

~/stuff is the encrypted fs as a file.
~/mnt/stuff is the mount location.

# losetup /dev/loop0 ~/stuff
# cryptsetup create -h plain stuff /dev/loop0
# mount -t ext2 /dev/mapper/stuff ~/mnt/stuff

using cryptoloop, the mount command would look like this:

# mount -t ext2 ~/stuff ~/mnt/stuff -o loop,encryption=aes-256,rw

I am not even sure the mount command supports cryptoloop anymore.
You may need to upgrade and use device mapper.
--
Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 07:21 PM
heavytull
 
Posts: n/a
Default Re: loop module

Peter wrote:

> On Sat, 16 Dec 2006 00:23:23 +0100, heavytull wrote:
>
>> William Hunt wrote:
>>
>>> On Fri, 15 Dec 2006, heavytull wrote:
>>>> the "loop" module on my linux box is not loaded itself when needed by
>>>> mount. when I type mount -o loop ...
>>>> While this module does not appear in the blacklist of modprobe
>>>> (/etc/modprobe.d/blacklist)
>>>
>>> i'll bet you've gone and mucked with your kernel, hey?

>> you mean?
>> you mean that i custom tuned the kernel?
>> yes i'm doing so since long. but I don't think this is related to that.
>> the troubles with loop and some others started when i upgraded to Slack11
>>
>>
>>> so what happens if you force a modprobe loop ?

>> the module gets loaded and works fine
>>
>>> and what do you get out of:
>>>
>>> $ grep -i loop /boot/config /proc/devices
>>>

>> /boot/config : file does not exist
>> grep -i loop /proc/devices : nothing
>>

>
> Are you using loop for an encrypted file system?

no
> If so, note that
> cryptoloop is deprecated and not recommended. device mapper is used now
> and you will also need the dm-mod module. You also need to make sure the
> relevant encryption modules (e.g. aes-256) are loaded
>
> Exactly what is your mount command? Here is my routine for loading an
> encrypted fs.
>
> ~/stuff is the encrypted fs as a file.
> ~/mnt/stuff is the mount location.
>
> # losetup /dev/loop0 ~/stuff
> # cryptsetup create -h plain stuff /dev/loop0
> # mount -t ext2 /dev/mapper/stuff ~/mnt/stuff
>
> using cryptoloop, the mount command would look like this:
>
> # mount -t ext2 ~/stuff ~/mnt/stuff -o loop,encryption=aes-256,rw
>
> I am not even sure the mount command supports cryptoloop anymore.
> You may need to upgrade and use device mapper.


--
heavytull
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 07:21 PM
heavytull
 
Posts: n/a
Default Re: loop module

Henrik Carlqvist wrote:

> heavytull <heavytull@hotmail.com> wrote:
>>>> the "loop" module on my linux box is not loaded itself when needed by
>>>> mount. when I type mount -o loop ...
>>>> While this module does not appear in the blacklist of modprobe
>>>> (/etc/modprobe.d/blacklist)

>
> I'm only guessing now, but this is what I would think is the
> explanation: Blacklist is used by hotplug. Hotplug loads modules when it
> finds new hardware. As there is no particular hardware associated with the
> loopback module it won't be loaded by hotplug.
>
>>> i'll bet you've gone and mucked with your kernel, hey?

>> you mean?
>> you mean that i custom tuned the kernel?
>> yes i'm doing so since long. but I don't think this is related to that.

>
> I think it does if the default kernel has loopback built in and not as a
> module.
>

no, i have always built loop as module.

I told that this problem started since i upgraded to slack11. thought I'm
not 100% sure.

>>> so what happens if you force a modprobe loop ?

>
>> the module gets loaded and works fine

>
> So you have 3 choices:
>
> 1) Manually load the module before doing a loopback mount and then maybe
> manually unload the module after umount.
>
> 2) Allways have the module loaded, maybe from /etc/rc.d/rc.modules.
>
> 3) If you like the automatic solution nr 2 above you might just as well
> build a kernel with loopback support built in.
>
> regards Henrik


--
heavytull
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 07:21 PM
William Hunt
 
Posts: n/a
Default Re: loop module

On Sat, 16 Dec 2006, heavytull wrote:

> William Hunt wrote:
>> On Fri, 15 Dec 2006, heavytull wrote:
>>> the "loop" module on my linux box is not loaded itself when needed by
>>> mount. when I type mount -o loop ...

[...]
>> i'll bet you've gone and mucked with your kernel, hey?

> you mean?
> you mean that i custom tuned the kernel?


Right, tuned, tinkered, or trashed it, ie, not one of the reliable
pre-built distribution jobbers passed out by slackware inc. That's
a uesful bit to know for understanding your problem, what you are
trying to ask, helps narrows things down.

> yes i'm doing so since long. but I don't think this is related to that. the
> troubles with loop and some others started when i upgraded to Slack11


It is not only related, but in fact key and central to your issue.
This is not to be ashamed of, many people muck with their kernels,
myself i have too. But as we see here:

[...]
>> $ grep -i loop /boot/config /proc/devices
>>

> /boot/config : file does not exist
> grep -i loop /proc/devices : nothing
>


.... you've gone and removed the very feature you're now looking
for a solution to make it work just the way you want, like it did
before some round of upgrades. But since it used to work,
it's a good guess that some upgraded component is responsible for
the change in behaviour, be it bug, bugfix, or feature. Other
possibilities still exist, (eg., are you giving mount a -t arg ?
have you mucked with your /etc/mtab too ?) , but as in any case,
the first thing to do is look at our friend and yours, the manual.

yes, RTFM.

you -did- RTFM, didn't you?
i mean, -everybody- here knows to always RTFM, don't they?

Maybe you missed the section in RTFM mount(8) titled 'THE LOOP DEVICE',
where it says, "see losetup(8)." Or maybe you saw that and actually did
RTFM losetup(8) but just missed the part in RTFM losetup(8) where it
says:
"
If you are using the loadable module you must have the
module loaded first with the command

# insmod loop.o
"

hmmmmmmmmmmmmmmmmmmmmmm.




Well it seems to me that whether it worked that way before or not is
moot, that the way it works now -is- the correct way according to the
fine manual. myself i don't know enough about kernel autoloading
modules to guess why that is what it is. It just is what it is.

So it seems to me that you've got a few options,

(a) the live-with-it option:
explicitly insmod loop.o before mount -o loop.

(b) the easy option, aka the slackware way:
don't rip loop.o out of your kernel if you want to use it.

(c) the hard option, aka the obstinate way:
dig out the losetup and kernel module autoloader code and
see what's changed and if anything can be done about it.

(d) the smart option, aka the Bozo way:
create a little alias script for mount, which checks the
arguments for "-o loop" and does the insmod loop.o as needed,
befor calling /sbin/mount to finish the job.

myself i would go (b) but would suggest you do (d) because it
is minimally invasive, trivial to implement, and should let
you do exactly what you want without further concern. well,
at least until the next upgrade :*)

HTH and RTFM!
--
William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 07:21 PM
William Hunt
 
Posts: n/a
Default Re: loop module

On Sat, 16 Dec 2006, heavytull wrote:
> Henrik Carlqvist wrote:
>> heavytull <heavytull@hotmail.com> wrote:

[...]
>>>> i'll bet you've gone and mucked with your kernel, hey?
>>> you mean?
>>> you mean that i custom tuned the kernel?
>>> yes i'm doing so since long. but I don't think this is related to that.

>> I think it does if the default kernel has loopback built in and not as a
>> module.
>>

> no, i have always built loop as module.


yes, but why?


--
William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 07:21 PM
heavytull
 
Posts: n/a
Default Re: loop module

William Hunt wrote:

> On Sat, 16 Dec 2006, heavytull wrote:
>
>> William Hunt wrote:
>>> On Fri, 15 Dec 2006, heavytull wrote:
>>>> the "loop" module on my linux box is not loaded itself when needed by
>>>> mount. when I type mount -o loop ...

> [...]
>>> i'll bet you've gone and mucked with your kernel, hey?

>> you mean?
>> you mean that i custom tuned the kernel?

>
> Right, tuned, tinkered, or trashed it, ie, not one of the reliable
> pre-built distribution jobbers passed out by slackware inc. That's
> a uesful bit to know for understanding your problem, what you are
> trying to ask, helps narrows things down.
>
>> yes i'm doing so since long. but I don't think this is related to that.
>> the troubles with loop and some others started when i upgraded to Slack11

>
> It is not only related, but in fact key and central to your issue.
> This is not to be ashamed of, many people muck with their kernels,
> myself i have too. But as we see here:
>
> [...]
>>> $ grep -i loop /boot/config /proc/devices
>>>

>> /boot/config : file does not exist
>> grep -i loop /proc/devices : nothing
>>

>
> ... you've gone and removed

what????? config?
I have never removed it. probably it has been removed when I upgraded ST
or never existed in slack 10.2 or 11




> the very feature you're now looking
> for a solution to make it work just the way you want, like it did
> before some round of upgrades. But since it used to work,
> it's a good guess that some upgraded component is responsible for
> the change in behaviour, be it bug, bugfix, or feature. Other
> possibilities still exist, (eg., are you giving mount a -t arg ?
> have you mucked with your /etc/mtab too ?) , but as in any case,
> the first thing to do is look at our friend and yours, the manual.
>
> yes, RTFM.
>
> you -did- RTFM, didn't you?

i did;
they also talk about how to custom tune the kernel.

> i mean, -everybody- here knows to always RTFM, don't they?
>
> Maybe you missed the section in RTFM mount(8) titled 'THE LOOP DEVICE',
> where it says, "see losetup(8)." Or maybe you saw that and actually did
> RTFM losetup(8) but just missed the part in RTFM losetup(8) where it
> says:
> "
> If you are using the loadable module you must have the
> module loaded first with the command
>
> # insmod loop.o
> "
>
> hmmmmmmmmmmmmmmmmmmmmmm.
>
>
>
>
> Well it seems to me that whether it worked that way before or not is
> moot, that the way it works now -is- the correct way according to the
> fine manual.

well I'm not sure actually whether I built it in or not.
It was probably built in. I actually think that's it because I was having a
problem with it, It was working fine at the beginning but after some time I
noticed the loop devices were never released, so after having mounted and
unmounted 6 or 7 times I couldn't do anything. I had to kill the process
which was sucking the loop device and didn't want to release.
So at my later update of kernel i might have decided to build the loop as
module.


> myself i don't know enough about kernel autoloading
> modules

I need to study how auto loader works.


> to guess why that is what it is. It just is what it is.
>
> So it seems to me that you've got a few options,
>
> (a) the live-with-it option:
> explicitly insmod loop.o before mount -o loop.
>
> (b) the easy option, aka the slackware way:
> don't rip loop.o out of your kernel if you want to use it.
>
> (c) the hard option, aka the obstinate way:
> dig out the losetup and kernel module autoloader code and
> see what's changed and if anything can be done about it.
>
> (d) the smart option, aka the Bozo way:
> create a little alias script for mount, which checks the
> arguments for "-o loop" and does the insmod loop.o as needed,
> befor calling /sbin/mount to finish the job.
>
> myself i would go (b) but would suggest you do (d) because it
> is minimally invasive, trivial to implement, and should let
> you do exactly what you want without further concern. well,
> at least until the next upgrade :*)

but you say it is the bozo option.
I don't like that I prfer my option above first then i'll do the job.

anyway you seem a bit angry at people who custom tune their linux box,
probably you don't know that this is the advantage of Open src OS over
closed src OS.
how would you do if you had hardware that stable driver was released
yesterday? stay with the unstable one shipped with your distro? wait for
the next release of your distro?
or remove the old one and install the new one? then probably you'll have to
put your hands into the kernel. this often happens.



>
> HTH and RTFM!


--
heavytull
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:29 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544