Tiny Core Linux

General TC => General TC Talk => Topic started by: theYinYeti on March 19, 2012, 02:35:11 PM

Title: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: theYinYeti on March 19, 2012, 02:35:11 PM
Hi. Full message is “modprobe: can’t load module lzo_decompress (source/lib/lzo/lzo_decompress.ko): No such file or directory”.
I get this message twice just after the line saying “Starting udev daemon for hotplug support...Done”.

Unfortunately, I cannot search the forums because of a *-++)«*/»(+)! of a security measure :-(( I HATE SECURITY ZEALOTS! Sorry for the rant…

Of course I did enable the module, and insert it along with the others in the initrd. But of course, it is not under source/whatever… It is under /lib/modules… as should be! What did I do wrong? Where does this “source/” come from?

Yves.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: Rich on March 19, 2012, 04:03:08 PM
Hi theYinYeti
Can't search because of a security measure? Haven't heard that one before.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: theYinYeti on March 19, 2012, 04:13:25 PM
I swear I couldn’t search the phrase “lzo_decompress” before! I had a long message on a white background, that gave among other text a key-string and a link for “correcting the problem myself”. When following the link, I was told that I used “dangerous” words :-( It reminded me of the messages from the filter at work, like “Sorry, the page you want contains forbidden words from the "hacking" category” :-(

Anyway, the same search works now!  :o  … And yields nothing.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: gutmensch on March 19, 2012, 05:19:34 PM
I would guess you forgot to run depmod properly for the new modules in your custom initrd for your custom kernel, since lzo is normally builtin and not a module. Only copying the modules in place doesn't tell the kernel, they are available.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: theYinYeti on March 20, 2012, 04:39:44 AM
Thank you for the tip gutmensch :)
As this feature is needed anyway, I’ll compile it in the kernel instead. It may work. The error I have is strange nonetheless.

Do you know what are the minimum kernel features needed by Core, appart from your usual manage-the-peripherals things? I mean kernel features that wouldn’t normally be needed on, say, a Debian, but on which Core depends; I now know there is lzo_decompression, and there’s this zram & tmpfs-initrd stuff; are there others?

I almost forgot to ask: how do I run depmod? Indeed, I tried “chroot core.content/ depmod” before cpio’ing it again, but it complained that it could not find the modules for the running kernel… To be expected: the running kernel is not the one I just compiled. However, I cannot boot the new kernel so how do I make my now kernel the running kernel  :o

Yves.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: gutmensch on March 20, 2012, 05:20:58 AM
Well, it doesn't make much sense to differ between two kernel configs of two distros... each has its own idea of building up an OS. Some like it more modular, some like it complete. And since you also seem to be a little unexperienced in this whole kernel thing I'm not sure you would be able to squeeze the 2.3 MB Core kernel down safely. That really needs some experience and a perfect knowledge of hard- and software. E.g. LZO is optimized for simple and fast decompression, so the decoder will save you almost nothing when you disable it in the kernel.

The difference between a Core kernel and a Debian kernel is mostly just philosophy... there's nothing much you can rip out of one to be more like the other and as mentioned before, it's not useful either. When you build a custom kernel, you do it, because you have special hardware or software needs or you want realtime or something like that, not to make one kernel more like the other. OTOH the .config is somehow portable, so you could always use it again on another kernel version (causes trouble with major version differences though).

Supposing you're creating your new initramfs in /tmp/rootfs and you use your custom vmlinuz/bzImage kernel and your custom modules in /tmp/rootfs/lib/modules/3.0.3-custom/ and your kernel release version is called 3.0.3-custom, you would have to run
Code: [Select]
/sbin/depmod -a -b /tmp/rootfs 3.0.3-custom
no need for chroot.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: theYinYeti on March 20, 2012, 05:42:19 AM
Thank you gutmensch for bearing with me.

I am indeed unexperienced with kernel compiling, although I already did this a dozen times back in 2005 or so. I am however experienced with Linux, and I intend to learn more, so I have to get my hands dirty: there’s no better way to learn  :-)

I am very confident that my kernel will end up being much smaller than the default, because I compile it for a specific old laptop in a specific network environment: no wifi, no bluetooth, no ipv6, no v4l, no i2c, no sata, only ext2/3+fat+nfs(client) for filesystems, and so on… I don’t expect to have a working kernel at first try, though.

I’m sure that what you told me already will help me get much further :-)

Yves.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: gutmensch on March 20, 2012, 06:02:48 AM
I also had the need to create a "special" kernel/initramfs combination for only one specific machine and therefore I wrote a little script you can find in the Programming section
http://forum.tinycorelinux.net/index.php/topic,9028.0.html (http://forum.tinycorelinux.net/index.php/topic,9028.0.html)

It only incorporates the modules you need when running your system in a "normal" state, so you're basically able to reduce the size of the core.gz by about 60% (stripping the unused modules). It works even with extensions like filesystems-3.0.21-tinycore.tcz installed and just copies the loaded modules. Most of the things you mentioned aren't even in the kernel (vmlinuz), wireless, bluetooth, i2c, agp, v4l - it's all already stripped out to extensions, that's why I mean it will be a hard challenge to even get a few quids out of recompiling the kernel. There is also a kernel compile option make localmodconfig, which only compiles the locally used modules, but this will of course only work on the same machine like my script too ;)
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: theYinYeti on March 20, 2012, 06:11:04 AM
Yes I saw this localmodconfig feature (I didn’t see your script before, though). Unfortunately, this laptop is currently unable to boot TC due to lack of memory, so I compile the kernel in a virtual machine, that is only remotely similar to the actual laptop…
What you say about the default kernel is interesting! However I’ll still compile my own… because I can :D and I want ;-)
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: gutmensch on March 20, 2012, 06:21:35 AM
Uh just for interest, could you specify the hardware? How much memory? What processor? For a first test run you could just remove every module from the core.gz except for loop and squashfs and maybe some others you see loaded at boot time (lsmod) in your virtual machine - unpacking the core.gz takes most of the memory at boot time (not the kernel) and reducing that will help most first to get it running at least. Of course go ahead with the custom kernel as well, it's a good learning curve! :D
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: theYinYeti on March 20, 2012, 06:32:41 AM
In fact, this thread is a side-topic to http://forum.tinycorelinux.net/index.php/topic,12723.html
The laptop is a Toshiba 300CDS, with CD & floppy +1 USB port. CPU is a Pentium 133 MMX, and it has 32MB RAM, and a 2GB drive. Sound is Yamaha OPL3-SA2, video is Chips&Technologies, net is PCMCIA 3Com 589.
Title: Re: Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”
Post by: curaga on March 20, 2012, 07:59:21 AM
Maybe check ebay for a suitable ram module? 48mb would be much more comfortable ;)