General TC > General TC Talk

Custom kernel won’t boot: “modprobe: can’t load module lzo_decompress…”

<< < (2/3) > >>

gutmensch:
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: ---/sbin/depmod -a -b /tmp/rootfs 3.0.3-custom

--- End code ---
no need for chroot.

theYinYeti:
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.

gutmensch:
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

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 ;)

theYinYeti:
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 ;-)

gutmensch:
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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version