Minimal Root-FS frankensteinian style (part 1)

Ever wanted to create your own minimal chroot/rootfs with runs java and/or basic glibc applications ?

Here is what you need:


to install busybox execute:

export FSROOT=/home/build/.../rootfs
mkdir -p $FSROOT/usr/bin $FSROOT/usr/sbin
cd $FSROOT && ln -s usr/bin bin
cd $FSROOT && ln -s usr/sbin sbin
cp busybox-x86_64 $FSROOT/bin/busybox
chmod +x $FSROOT/bin/busybox
chroot $FSROOT /bin/busybox --install -s

so a simple "chroot $FSROOT /bin/sh" should work for you.


--tbc

Comments