tking2 / volatility

Automatically exported from code.google.com/p/volatility
GNU General Public License v2.0
0 stars 1 forks source link

Linux Profiles #398

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I keep getting the below error when creating a linux profile.  This is using 
Mint 14 but the same error occurs when using ubuntu 12.04.

mike@mike-virtual-machine ~/Downloads/volatility-2.2/tools/linux $ sudo make
make -C //lib/modules/3.5.0-17-generic/build CONFIG_DEBUG_INFO=y M= modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
make[2]: *** No rule to make target 
`/usr/src/linux-headers-3.5.0-17-generic/arch/x86/syscalls/syscall_32.tbl', 
needed by `arch/x86/syscalls/../include/generated/asm/unistd_32.h'.  Stop.
make[1]: *** [archheaders] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
make: *** [dwarf] Error 2
mike@mike-virtual-machine ~/Downloads/volatility-2.2/tools/linux $ 

I used apt-get install linux headers to update the kernel.

Any help

Original issue reported on code.google.com by wopmike2...@gmail.com on 31 Mar 2013 at 12:09

GoogleCodeExporter commented 9 years ago
Hi Mike, 

Could you please check out the latest code from the svn repository and run make 
again? Also, don't do it as sudo, sometimes that messes up the user 
environment. 

$ svn checkout https://volatility.googlecode.com/svn/trunk/ volatility 

If that still doesn't work can you paste the output of ls /boot/System* and 
uname -a?

Original comment by michael.hale@gmail.com on 31 Mar 2013 at 1:38

GoogleCodeExporter commented 9 years ago
Mike,

Here is my ls of boot/system and uname -a.  i am not really sure what you
want me to do at the svn repository.  I went there and checked out the code
but not sure what to do from there. Forgive my ignorance I am still
learning.

abi-3.5.0-23-generic         memtest86+_multiboot.bin
abi-3.5.0-26-generic         System.map-3.5.0-23-generic
config-3.5.0-23-generic      System.map-3.5.0-26-generic
config-3.5.0-26-generic      vmlinuz-3.5.0-23-generic
grub                         vmlinuz-3.5.0-23-generic.efi.signed
initrd.img-3.5.0-23-generic  vmlinuz-3.5.0-26-generic
initrd.img-3.5.0-26-generic  vmlinuz-3.5.0-26-generic.efi.signed
memtest86+.bin

mike@ubuntu:/boot$ uname -a
Linux ubuntu 3.5.0-26-generic #42~precise1-Ubuntu SMP Mon Mar 11 22:17:58
UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Original comment by wopmike2...@gmail.com on 31 Mar 2013 at 3:38

GoogleCodeExporter commented 9 years ago
After checking out the code from svn, cd into tools/linux and type "make" again 
(but without sudo). The version of this Makefile is a bit different from the 
one supplied with volatility 2.2, so we just want to make sure you're testing 
with the latest code. 

Also, according to your uname -a output, the current running kernel is 
3.5.0-26-generic. When you installed linux-headers, what package exactly did 
you install? You may need to be specific and do "apt-get install 
linux-headers-3.5.0-26-generic" (if that's not what you already did). 

Original comment by michael.hale@gmail.com on 31 Mar 2013 at 8:36

GoogleCodeExporter commented 9 years ago
Mike,

I already used the "apt-get install linux-headers-3.5.0-26-generic as you
suggested.
I found the code under tools, i dont know how to change the code! I know
this is wrong!

Do I to go to the python 2.7 directory under the tools/linux and enter this
code?

I checked out the code her are my screen shots

mike@ubuntu:~$ obj-m += module.o
obj-m: command not found
mike@ubuntu:~$ KDIR ?= /
KDIR: command not found
mike@ubuntu:~$ KVER ?= $(shell uname -r)
No command 'shell' found, did you mean:
 Command 'lshell' from package 'lshell' (universe)
 Command 'spell' from package 'spell' (universe)
 Command 'bshell' from package 'avahi-ui-utils' (universe)
shell: command not found
KVER: command not found
mike@ubuntu:~$
mike@ubuntu:~$ -include version.mk
-include: command not found
mike@ubuntu:~$
mike@ubuntu:~$ all: dwarf
all:: command not found
mike@ubuntu:~$
mike@ubuntu:~$ dwarf: module.c
dwarf:: command not found
mike@ubuntu:~$ $(MAKE) -C $(KDIR)/lib/modules/$(KVER)/build
CONFIG_DEBUG_INFO=y M=$(PWD) modules
MAKE: command not found
KDIR: command not found
KVER: command not found
PWD: command not found
-C: command not found
mike@ubuntu:~$ dwarfdump -di module.ko > module.dwarf
dwarfdump ERROR:  can't open module.ko
mike@ubuntu:~$ $(MAKE) -C $(KDIR)/lib/modules/$(KVER)/build M=$(PWD) clean
MAKE: command not found
KDIR: command not found
KVER: command not found
PWD: command not found
-C: command not found
mike@ubuntu:~$
mike@ubuntu:~$ clean:
clean:: command not found
mike@ubuntu:~$ $(MAKE) -C $(KDIR)/lib/modules/$(KVER)/build M=$(PWD) clean
MAKE: command not found
KDIR: command not found
KVER: command not found
PWD: command not found
-C: command not found
mike@ubuntu:~$ rm -f module.dwarf
mike@ubuntu:~$ cd Desktop/
mike@ubuntu:~/Desktop$ cd ..
mike@ubuntu:~$ cd Downloads/
mike@ubuntu:~/Downloads$ cd volatility-2.2/
mike@ubuntu:~/Downloads/volatility-2.2$ cd tools/
mike@ubuntu:~/Downloads/volatility-2.2/tools$ cd linux/
mike@ubuntu:~/Downloads/volatility-2.2/tools/linux$ make
make -C //lib/modules/3.5.0-26-generic/build CONFIG_DEBUG_INFO=y
M=/home/mike/Downloads/volatility-2.2/tools/linux modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-26-generic'
  CC [M]  /home/mike/Downloads/volatility-2.2/tools/linux/module.o
/home/mike/Downloads/volatility-2.2/tools/linux/module.c:70:33: fatal
error: linux/net_namespace.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mike/Downloads/volatility-2.2/tools/linux/module.o]
Error 1
make[1]: *** [_module_/home/mike/Downloads/volatility-2.2/tools/linux]
Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-26-generic'
make: *** [dwarf] Error 2
mike@ubuntu:~/Downloads/volatility-2.2/tools/linux$

Original comment by wopmike2...@gmail.com on 31 Mar 2013 at 11:23

GoogleCodeExporter commented 9 years ago
All you need to do is this:

$ cd tools/linux
$ make 

You don't have to type each line from the Makefile separately into a bash shell 
;-)

Original comment by michael.hale@gmail.com on 31 Mar 2013 at 11:27

GoogleCodeExporter commented 9 years ago
ok here is a screen shot

mike@ubuntu:~$ cd Desktop/
mike@ubuntu:~/Desktop$ cd ..
mike@ubuntu:~$ cd Downloads/
mike@ubuntu:~/Downloads$ cd volatility-2.2/
mike@ubuntu:~/Downloads/volatility-2.2$ cd tools/
mike@ubuntu:~/Downloads/volatility-2.2/tools$ cd linux/
mike@ubuntu:~/Downloads/volatility-2.2/tools/linux$ make
make -C //lib/modules/3.5.0-26-generic/build CONFIG_DEBUG_INFO=y
M=/home/mike/Downloads/volatility-2.2/tools/linux modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-26-generic'
  CC [M]  /home/mike/Downloads/volatility-2.2/tools/linux/module.o
/home/mike/Downloads/volatility-2.2/tools/linux/module.c:70:33: fatal
error: linux/net_namespace.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mike/Downloads/volatility-2.2/tools/linux/module.o]
Error 1
make[1]: *** [_module_/home/mike/Downloads/volatility-2.2/tools/linux]
Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-26-generic'
make: *** [dwarf] Error 2
mike@ubuntu:~/Downloads/volatility-2.2/tools/linux$

Original comment by wopmike2...@gmail.com on 1 Apr 2013 at 12:02

GoogleCodeExporter commented 9 years ago
Mike,

Ok look at this, still same error.

mike@ubuntu:~$ svn checkout
https://volatility.googlecode.com/svn/trunk/tools/linux
A    linux/module.c
A    linux/Makefile
A    linux/pmem
A    linux/pmem/pmem.c
A    linux/pmem/Makefile
Checked out revision 3239.
mike@ubuntu:~$ cd Downloads/
mike@ubuntu:~/Downloads$ cd volatility-2.2/
mike@ubuntu:~/Downloads/volatility-2.2$ cd tools/
mike@ubuntu:~/Downloads/volatility-2.2/tools$ cd linux/
mike@ubuntu:~/Downloads/volatility-2.2/tools/linux$ make
make -C //lib/modules/3.5.0-26-generic/build CONFIG_DEBUG_INFO=y
M=/home/mike/Downloads/volatility-2.2/tools/linux modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-26-generic'
  CC [M]  /home/mike/Downloads/volatility-2.2/tools/linux/module.o
/home/mike/Downloads/volatility-2.2/tools/linux/module.c:70:33: fatal
error: linux/net_namespace.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mike/Downloads/volatility-2.2/tools/linux/module.o]
Error 1
make[1]: *** [_module_/home/mike/Downloads/volatility-2.2/tools/linux]
Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-26-generic'
make: *** [dwarf] Error 2
mike@ubuntu:~/Downloads/volatility-2.2/tools/linux$

Original comment by wopmike2...@gmail.com on 1 Apr 2013 at 12:18

GoogleCodeExporter commented 9 years ago
You're still using the old Makefile. You checked out the latest code into 
~/linux and then didn't use it. Instead you went into 
~/Downloads/volatility-2.2/tools/linux which is the same one you were using 
when you initially filled out this bug report 42 hours ago. 

Original comment by michael.hale@gmail.com on 1 Apr 2013 at 1:02

GoogleCodeExporter commented 9 years ago
Ok I got it. Sorry for the confusion on my part. It worked profile was
created. Thank you

Original comment by wopmike2...@gmail.com on 1 Apr 2013 at 1:32

GoogleCodeExporter commented 9 years ago
Awesome. Write back if you encounter any other issues. 

Original comment by michael.hale@gmail.com on 1 Apr 2013 at 3:57

GoogleCodeExporter commented 9 years ago
Hey michael, i am experiencing similar error (No rule to make target 
`/usr/src/linux-headers-3.5.0-26-generic/arch/x86/syscalls/syscall_32.tbl', 
needed by `arch/x86/syscalls/../include/generated/asm/unistd_32.h'.  Stop) , 
but i am not sure,if this is related, because i am just trying to run a hello 
world kernel module.

Original comment by dishantp...@gmail.com on 7 Apr 2013 at 2:34

GoogleCodeExporter commented 9 years ago
Also, i am trying to do a hello world kernel module work, using kubuntu 12.10 , 
kernel - 3.5.0-26-generic

Original comment by dishantp...@gmail.com on 7 Apr 2013 at 2:44

GoogleCodeExporter commented 9 years ago
Hi
while i had make my module am getting this error.
make[1]: *** No rule to make target `folder/VENKY/fold/code_new/kern-prog/mm'.  
Stop.
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-23-generic'

give me any solution to overcome this problem please do needful.

Original comment by desu7...@gmail.com on 30 Sep 2013 at 3:22

GoogleCodeExporter commented 9 years ago
i:

I had missing the following syscall_32.tbl file when I tried to build my 
module. 

I would really appreciate if anyone shows me how to fix this. I am using Ubuntu 
12.04.4 ,has 3.11.0-15 kernel

user-name@localhost:/usr/src/linux-headers-3.11.0-15-generic$ sudo make 
oldconfig
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
user-name@localhost:/usr/src/linux-headers-3.11.0-15-generic$ 
user-name@localhost:/usr/src/linux-headers-3.11.0-15-generic$ sudo make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: *** No rule to make target 
`/usr/src/linux-headers-3.11.0-15-generic/arch/x86/syscalls/syscall_32.tbl', 
needed by `arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'.  Stop.
make: *** [archheaders] Error 2
user-name@localhost:/usr/src/linux-headers-3.11.0-15-generic$ find . -name 
"syscall_32*"
user-name@localhost:/usr/src/linux-headers-3.11.0-15-generic$ cd ..
user-name@localhost:/usr/src$ find . -name "syscall_32*"
./linux-headers-3.2.0-59/arch/sh/include/asm/syscall_32.h
./linux-headers-3.11.0-15/arch/sh/include/asm/syscall_32.h
./linux-headers-3.11.0-17/arch/sh/include/asm/syscall_32.h
user-name@localhost:/usr/src$ 

Original comment by sent...@exacq.com on 21 Feb 2014 at 8:29