Hi,

I'm trying to follow the pocket Linux guide to make a really basic floppy based distro. I'm trying to compile linux- as per the tutorial on ubuntu 9.04 with gcc-4.1. I tried using 2.6.* but it was just to big to fit on my floppy. Here is the error I'm running into:

gcc -D__KERNEL__ -I/root/dev/linux-2.4.37.9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fno-builtin-strpbrk -fno-builtin-sprintf -fomit-frame-pointer -Wno-pointer-sign -fno-delete-null-pointer-checks -pipe -mpreferred-stack-boundary=2 -march=i386 -fno-unit-at-a-time  -nostdinc -iwithprefix include -E -D__GENKSYMS__ signal.c
| /sbin/genksyms -p smp_ -k 2.4.37 > /root/dev/linux-2.4.37.9/include/linux/modules/signal.ver.tmp
/bin/sh: /sbin/genksyms: not found
make[2]: *** [/root/dev/linux-2.4.37.9/include/linux/modules/signal.ver] Error 127
make[2]: Leaving directory `/root/dev/linux-2.4.37.9/kernel'
make[1]: *** [_sfdep_kernel] Error 2
make[1]: Leaving directory `/root/dev/linux-2.4.37.9'
make: *** [dep-files] Error 2

So, genksyms is missing but I'm unsure on what it is and how to get it.

Please help!

James

Dani AI

Generated

A short, practical diagnosis and fixes (for ; thanks to for the pointer about headers).

The build error means the host tool genksyms isn’t present. For the 2.4 kernel series genksyms was shipped as part of the modutils/module-init tools and is required when symbol-versioning (CONFIG_MODVERSIONS) is used — if the tool isn’t available the build will fail. (tldp.org)

Quick fixes to try

  • Easiest: install the distribution package that provides genksyms (historically the modutils/module-init-tools package). On Debian/Ubuntu-era systems that usually supplies /sbin/genksyms. If your distro has the package, install it with your package manager. If a packaged build isn’t available, the modutils sources can be downloaded from the kernel archives and built. (kernel.org)

  • If you’re using a later kernel (2.6+), genksyms lives in the kernel tree under scripts/genksyms; building the kernel host tools (e.g., the scripts target or building scripts/genksyms) produces the genksyms binary used during the build. For those kernels you usually don’t need a separate modutils package — just ensure you run the kernel build steps that build host tools. (lwn.net)

Troubleshooting notes

  • Building modutils or genksyms from source requires standard build tools (make, gcc) and utilities like bison/flex; LFS and other docs list these dependencies. If you build genksyms yourself, either put the resulting binary on your PATH or create a symlink where the kernel expects it (the make output shows the exact path invoked). If you don’t need module version checks, turning off CONFIG_MODVERSIONS in your .config will also avoid the genksyms requirement. (linuxfromscratch.org)

If the above doesn’t resolve it, show the exact kernel config (.config) plus the PATH where make is running and the output of any install attempts; that narrows whether you need the modutils binary or to build the kernel-host tools.

Recommended Answers

All 3 Replies

I'm no expert but I seem to remember reading somewhere that you have to install all the kernel headers and source for the version of kernel your compiling...Did you?

I'm no expert but I seem to remember reading somewhere that you have to install all the kernel headers and source for the version of kernel your compiling...Did you?

Where can I get the headers for the version of Linux I'm compiling? I can only seem to find 2.6.* which is already installed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.