Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Busybox static problem #306

Closed
amirmohammadeftekhar opened this issue Jan 31, 2025 · 4 comments · May be fixed by IntelLabs/kafl.targets#47
Closed

Busybox static problem #306

amirmohammadeftekhar opened this issue Jan 31, 2025 · 4 comments · May be fixed by IntelLabs/kafl.targets#47

Comments

@amirmohammadeftekhar
Copy link

I'm using Debian 12 and I've installed busybox-static, but I get this error:
Error: Binary at /usr/bin/busybox is not static. Try 'apt install busybox-static'.

@Wenzel
Copy link
Contributor

Wenzel commented Jan 31, 2025

Hi @amirmohammadeftekhar
This message originates from this script:
https://github.com/IntelLabs/kafl.targets/blob/master/linux-user/scripts/gen_initrd.sh#L100

You need to check why the busybox binary is not static.

I just spined a Docker 12 container, installed busybox-static package and it's a statix executable:

root@43479522935d:/# ldd /usr/bin/busybox 
	not a dynamic executable
root@43479522935d:/# file /usr/bin/busybox 
/usr/bin/busybox: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=0ccb1a8ae9e516a28b1de29f8cfb9baed2b6fc32, for GNU/Linux 3.2.0, stripped
root@43479522935d:/# 

@amirmohammadeftekhar
Copy link
Author

amirmohammadeftekhar commented Feb 1, 2025

@Wenzel I get an output as the same as yours:

eftekhar@debian:~$ file /usr/bin/busybox 
/usr/bin/busybox: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=0ccb1a8ae9e516a28b1de29f8cfb9baed2b6fc32, for GNU/Linux 3.2.0, stripped
eftekhar@debian:~$ ldd /usr/bin/busybox 
	not a dynamic executable
eftekhar@debian:~$ 

@Wenzel
Copy link
Contributor

Wenzel commented Feb 2, 2025

ok, interesting

@amirmohammadeftekhar can you try out this branch please ?
IntelLabs/kafl.targets#47

@amirmohammadeftekhar
Copy link
Author

@Wenzel I just switched to Ubuntu 22 from Debian 12, and the problem is solved. I cannot test it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants