BTFS is a software that can act as /init to create a run-time environment before executing the actual init command.
To utilize BTFS, it should be installed as /init on an initramfs. During the boot process, the program executes specific actions based on certain conditions. Firstly, if / isn't a tmpfs or a ramfs or if the program isn't init (pid == 1), it refuses to run. If / isn't a tmpfs, it mounts a tmpfs on an empty /newroot* and extracts all cpio files (*.co *.cgz *.cbz2) under ARCHIVE_DIR (/) to the tmpfs. It then moves all other files on / to the tmpfs and remounts /newroot as the root filesystem. Finally, it chroots.
If the condition is that / is the root filesystem, the software extracts all cpio files (*.co *.cgz *.cbz2) under ARCHIVE_DIR (/) to / instead. After these actions, BTFS opens /dev/console. Furthermore, if there's a root= argument to the kernel, and it isn't /dev/ram*, the software executes /sbin/boot_other as init (change with option boot_other=). If there is no root argument, it executes /sbin/init (change with option init=).
Overall, BTFS is a helpful software that simplifies the process of constructing a run-time environment before running the actual init. Its ability to extract cpio files and create a tmpfs filesystem as the new root adds value. However, it's essential to take note of the specific conditions under which BTFS executes particular actions.
Version 1.2: N/A