Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

Preparing Busybox
 
Introduction
Here we need Busybox in two situations:
- inside an initramfs for a custom rescue system
- on a xen virtual disk for a very basic guest system
 
Requirements
If you're building a static version of Busybox on a Redhat system, you'll probably need this,
rpm -q glibc-static
 
Building
Get Busybox (http://busybox.net/downloads/), configure and compile it,
wget http://busybox.net/downloads/busybox-1.16.2.tar.bz2
tar xjf busybox-1.16.2.tar.bz2
cd busybox-1.16.2/
make distclean
#make allyesconfig
make defconfig
mv -f .config .config.def
sed 's/# CONFIG_STATIC is not set/CONFIG_STATIC=y/' .config.def > .config
make
ldd busybox
rm -rf ../tmp/
mkdir ../tmp/
make CONFIG_PREFIX=../tmp install
cd ../
Note. busybox here is statically linked
Note. we're not doing a setuid root against the busybox binary (we're using it as root anyway)
 
Troubleshooting
Note. with busybox-1.17.2 we got some errors like,
networking/libiproute/iplink.c:336: error: 'IFLA_LINKINFO' undeclared (first use in this function)
 
Note. if you need to reinstall, simply,
cd busybox-1.16.2/
rm -rf ../tmp/
mkdir ../tmp/
  make CONFIG_PREFIX=../tmp install
cd ../
 
References
Busybox : http://busybox.net/
 

(obsolete, see the new doc)