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
Here is what you need:
- BusyBox static compiled from
https://busybox.net/downloads/binaries/1.28.1-defconfig-multiarch/busybox-x86_64 - a build of syslinux
https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/ - glibc, glibc-common, glibc-utils, glibc-minimal-langpack from
https://dl.fedoraproject.org/pub/fedora/linux/releases/29/Everything/x86_64/os/Packages/g/ - zlib from
https://dl.fedoraproject.org/pub/fedora/linux/releases/29/Everything/x86_64/os/Packages/z/
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
Post a Comment