Skip to content

Instantly share code, notes, and snippets.

@paranlee
Last active June 20, 2021 03:14
Show Gist options
  • Select an option

  • Save paranlee/f4695eb5338ab8f6bd2a36f1b58b6bbd to your computer and use it in GitHub Desktop.

Select an option

Save paranlee/f4695eb5338ab8f6bd2a36f1b58b6bbd to your computer and use it in GitHub Desktop.
dd if=/dev/zero of=root.bin bs=1M count=64
mkfs.ext2 -F root.bin
mkdir mnt
sudo mount -o loop root.bin mnt
cd mnt
sudo mkdir -p bin etc dev lib proc sbin tmp usr usr/bin usr/lib usr/sbin
sudo cp ~/busybox/busybox bin
sudo ln -s ../bin/busybox sbin/init
sudo ln -s ../bin/busybox bin/sh
cd ..
sudo umount mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment