volatilityfoundation / volatility

An advanced memory forensics framework
http://volatilityfoundation.org/
GNU General Public License v2.0
7.17k stars 1.27k forks source link

Error with make in /volatility/tools/linux #807

Open shagunjain123 opened 2 years ago

shagunjain123 commented 2 years ago

I am trying to create module.dwarf in~/volatility/tools/linux so that I can create a linux profile but getting below error:

make -C //lib/modules/5.11.0-36-generic/build CONFIG_DEBUG_INFO=y M="/home/shagunjain/volatility/tools/linux" modules make[1]: Entering directory '/usr/src/linux-headers-5.11.0-36-generic'

ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it.

make[1]: [Makefile:745: include/config/auto.conf] Error 1 make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-36-generic' make: [Makefile:10: dwarf] Error 2

Please help in resolving this error.

sparticvs commented 2 years ago

You need to have the sources installed on your system. Depending on the distro, you may be able to just do yum install kernel-devel and get what you need.

shagunjain123 commented 2 years ago

This does not help.

I am using Ubuntu 20.04.3 LTS 64-bit And now I am getting this error:

shagunjain@ubuntu:~/Downloads/volatility-master/tools/linux$ make make -C //lib/modules/5.11.0-37-generic/build CONFIG_DEBUG_INFO=y M="/home/shagunjain/Downloads/volatility-master/tools/linux" modules make[1]: Entering directory '/usr/src/linux-headers-5.11.0-37-generic' CC [M] /home/shagunjain/Downloads/volatility-master/tools/linux/module.o MODPOST /home/shagunjain/Downloads/volatility-master/tools/linux/Module.symvers ERROR: modpost: missing MODULE_LICENSE() in /home/shagunjain/Downloads/volatility-master/tools/linux/module.o make[2]: [scripts/Makefile.modpost:124: /home/shagunjain/Downloads/volatility-master/tools/linux/Module.symvers] Error 1 make[2]: Deleting file '/home/shagunjain/Downloads/volatility-master/tools/linux/Module.symvers' make[1]: [Makefile:1753: modules] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-37-generic' make: [Makefile:10: dwarf] Error 2

shagunjain123 commented 2 years ago

@gleeda Please support

cgreenland commented 2 years ago

Getting the same error as @shagunjain123's second post on Ubuntu 20.04.2 with gcc 9.3.0. Runs just fine on Ubuntu 18.04 with gcc 7.5.0, but that's not the kernel I'm trying to profile.

casualscripter commented 2 years ago

Adding MODULE_LICENSE("GPL"); as the last line in "module.c" worked for me.

nicl4ssic commented 2 years ago

make -C //lib/modules/5.10.0-kali9-amd64/build CONFIG_DEBUG_INFO=y M="/home/kali/Documents/Tools/volatility/tools/linux" modules make[1]: //lib/modules/5.10.0-kali9-amd64/build: No such file or directory. Stop. make: [Makefile:10: dwarf] Error 2

Please help, i'm using Kali Linux and when I try to "make" this was an error appeared

robertjamison commented 2 years ago

Adding MODULE_LICENSE("GPL"); as the last line in "module.c" worked for me.

This also worked for me.

sparrownut commented 1 year ago

MODULE_LICENSE("GPL");

it's work!

JessyGothik commented 1 year ago

I have the same problem:

make -C //lib/modules/5.15.0-60-generic/build CONFIG_DEBUG_INFO=y M="" modules make[1]: Entering directory '/usr/src/linux-headers-5.15.0-60-generic' SYNC include/config/auto.conf.cmd YACC scripts/kconfig/parser.tab.[ch] /bin/sh: 1: bison: not found make[3]: [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127 make[2]: [Makefile:622: syncconfig] Error 2 make[1]: [Makefile:742: include/config/auto.conf.cmd] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-60-generic' make: [Makefile:10: dwarf] Error 2

Can you help me, please?

I tried to test adding "MODULE_LICENSE("GPL");" in the last line, but, I still have the same problem.

fmr716 commented 1 year ago

Hello @JessyGothik ,

It seems that you don't have bison installed on your OS.

Try to run the following command: sudo apt-get install bison

It will download bison on your sistem and your problem will end. It does not mean that you can have more problems in the future but try to execute the command and see if that works for you.

Ne1h commented 3 months ago

i got this problem

make -C //lib/modules/5.18.0-kali5-amd64/build CONFIG_DEBUG_INFO=y M="/home/kali/volatility/tools/linux" modules make[1]: //lib/modules/5.18.0-kali5-amd64/build: No such file or directory. Stop. make: [Makefile:10: dwarf] Error 2

Muhammeday9un commented 2 months ago

help please. Has anyone solved this damn problem?

Lloydy86 commented 2 months ago

i also have the same Error 2

JessyGothik commented 1 month ago

Hello @JessyGothik ,

It seems that you don't have bison installed on your OS.

Try to run the following command: sudo apt-get install bison

It will download bison on your sistem and your problem will end. It does not mean that you can have more problems in the future but try to execute the command and see if that works for you.

I have a problem with CentOS 7. How, I have the next message on CentOS:

[dfir@localhost linux]$ make
make -C //lib/modules/3.10.0-957.el7.x86_64/build CONFIG_DEBUG_INFO=y M="/home/dfir/volatility-master/tools/linux" modules
make: *** //lib/modules/3.10.0-957.el7.x86_64/build: No such file or directory.  Stop.
make: *** [dwarf] Error 2

Can you help me?