Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to build a rootfs for an embedded A10 board. This will be matched up against 3.0.62+ modules and a corresponding vmlinux image.

I've been trying for a few days to get a rootfs set up for a 3.x kernel using sid.

Attempting to install using debootstrap, ie:

sudo debootstrap --foreign --verbose --arch=armel --include=vim-nox,openssh-server,ntupdate,less --exclude=nano sid . http://ftp.au.debian.org/debian

is just giving me a build which expects the same kernel version as the host system.

So, for example, when I sudo chroot into the new rootfs, I get:

root@njord:/lib/modules# depmod
ERROR: could not open directory /lib/modules/2.6.32-5-amd64: No such file or directory

which is searching for modules corresponding to the host system, not the kernel image / modules installed.

I feel like I must be missing something very obvious here. Is there some flag I can set (either in the rootfs itself, or in the debootstrap phase) which sets the target kernel version to one that is different from the host?

share|improve this question

What are you trying to accomplish by running depmod inside the chroot? If you don't specify a version, then yes, it will use the version of the running kernel as documented in man depmod:

       depmod [-b basedir] [-e] [-E Module.symvers] [-F System.map] [-n] [-v]
              [-A] [-P prefix] [-w] [version]

       depmod [-e] [-E Module.symvers] [-F System.map] [-m] [-n] [-v]
              [-P prefix] [-w] [version] [filename...]


       If a version is provided, then that kernel version's module directory
       is used rather than the current kernel version (as returned by uname
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.