# [solved] depmod: cannot read ELF header

## mijenix

Hi

compiled my kernel (gentoo-sources-3.7.10) don't know if it will boot and what the problem is.

Any ideas?

```

Kernel: arch/x86/boot/bzImage is ready  (#1)

  INSTALL drivers/char/kcopy/kcopy.ko

  DEPMOD  3.7.10-gentoo

depmod: cannot read ELF header from /lib64/modules/3.7.10-gentoo/modules.alias

depmod: cannot read ELF header from /lib64/modules/3.7.10-gentoo/modules.alias.bin

depmod: /lib64/modules/3.7.10-gentoo/modules.builtin is not an ELF file

depmod: /lib64/modules/3.7.10-gentoo/modules.builtin.bin is not an ELF file

depmod: /lib64/modules/3.7.10-gentoo/modules.ccwmap is not an ELF file

depmod: /lib64/modules/3.7.10-gentoo/modules.dep.bin is not an ELF file

depmod: cannot read ELF header from /lib64/modules/3.7.10-gentoo/modules.devname

depmod: /lib64/modules/3.7.10-gentoo/modules.inputmap is not an ELF file

depmod: /lib64/modules/3.7.10-gentoo/modules.ofmap is not an ELF file

depmod: cannot read ELF header from /lib64/modules/3.7.10-gentoo/modules.order

depmod: cannot read ELF header from /lib64/modules/3.7.10-gentoo/modules.seriomap

depmod: /lib64/modules/3.7.10-gentoo/modules.softdep is not an ELF file

depmod: /lib64/modules/3.7.10-gentoo/modules.symbols is not an ELF file

depmod: /lib64/modules/3.7.10-gentoo/modules.symbols.bin is not an ELF file

make: *** [_modinst_post] Error 1

```

cheersLast edited by mijenix on Fri Mar 29, 2013 3:19 pm; edited 3 times in total

----------

## BillWho

mijenix,

Try depmod -av to see if that works or provides any other useful info.

----------

## mijenix

 *BillWho wrote:*   

> mijenix,
> 
> Try depmod -av to see if that works or provides any other useful info.

 

```

depmod -av 

depmod: QM_MODULES: Function not implemented

```

----------

## BillWho

mijenix,

Is this a first kernel configuration or an oldconfig from a previous working version   :Question: 

Do you have the sys-apps/module-init-tools or sys-apps/kmod package   :Question: 

----------

## mijenix

 *BillWho wrote:*   

> mijenix,
> 
> Is this a first kernel configuration or an oldconfig from a previous working version  
> 
> Do you have the sys-apps/module-init-tools or sys-apps/kmod package  

 

First .config, I did a make distclean before and started from scratch. I don't have any modules in the kernel I always build the drivers into the kernel, so the kernel itself boots.

 *Quote:*   

> 
> 
> Calculating dependencies... done!
> 
> [ebuild  N    #] sys-apps/module-init-tools-3.16-r2  USE="-static" 
> ...

 

----------

## BillWho

mijenix,

To fix that block with kmod install these one at a time

```
emerge -1 --nodeps virtual/modutils

emerge -1 libxslt

emerge -1 --nodeps kmod 
```

You might want to try a depclean too.

----------

## mijenix

 *BillWho wrote:*   

> mijenix,
> 
> To fix that block with kmod install these one at a time
> 
> ```
> ...

 

Which one of those module tools is the gentoo standard and why are the needed ones not a dependencie of the gentoo-sources? Or do I miss a useflag?

----------

## mijenix

modutils is for 2.4.x and older, so i unmerged it and installed kmod, warnings gone.

thx, cheers

----------

## mijenix

but now I get this:

 *Quote:*   

> 
> 
> emerge --update --newuse --deep --with-bdeps=y @world
> 
> Calculating dependencies... done!
> ...

 

----------

## mijenix

I had to build kmod with tools useflag to satisfy the virtual/modutils dep

----------

## IceSunrise

 *mijenix wrote:*   

> I had to build kmod with tools useflag to satisfy the virtual/modutils dep

 

Hi mijenix,

Thanks a lot that you described your solution, it saved me some time  :Smile: 

----------

