
init= to boot, and you're done.cpio , tar , gzip , advdef and mkisofs . They can most likely be installed using your package manager, if they are not already installed. Please do it for a start. mkdir vim-as-pid-1 cd vim-as-pid-1 mkdir /tmp/isomount mkdir extract wget http://distro.ibiblio.org/tinycorelinux/5.x/x86/release/Core-current.iso mount Core-current.iso /tmp/isomount/ -o loop,ro cp -a /tmp/isomount/boot /tmp/ /tmp/boot with the bootloader and the core.gz file. Do not forget to unmount it: umount /tmp/isomount /tmp/boot further when we put everything together in an ISO file.core.gz will be extracted - the root directory of the file system: cd extract zcat and cpio to extract the file system root from core.gz : zcat /tmp/boot/core.gz | cpio -i -H newc -d # ls bin dev etc home init lib linuxrc mnt opt proc root run sbin sys tmp usr var bin/ directory cp ~/vim bin/ boot.msg in the /tmp/boot/isolinux/ directory: # vim /tmp/boot/isolinux/boot.msg ^L _ ( - Boot to Vim //\ Vim as Pid 1, because Awesome! v_/_ https://raymii.org/ Press <Enter> to begin or F2, F3, or F4 to view boot options. vim etc/inittab ::sysinit:/etc/init.d/rcS tty1::respawn:/sbin/getty 38400 tty1 ::sysinit:/bin/vim tty1::respawn:/bin/vim extract . Next, we’ll use the following command to build a new tinycore.gz file, which our ISO will use as initramfs : find | cpio -o -H newc | gzip -2 > ../tinycore.gz core.gz to the /tmp/boot , which we copied earlier: cp ../tinycore.gz /tmp/boot/core.gz mkdir /tmp/newiso /tmp/boot directory into it: cp -a /tmp/boot /tmp/newiso/ mkisofs : cd /tmp/ mkisofs -l -J -R -V Boot_To_Vim -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o Boot_to_Vim.iso newiso /tmp called Boot_to_Vim.iso : ls -la /tmp/Boot_to_Vim.iso -rw-r--r-- 1 root root 11044864 Sep 17 08:05 /tmp/Boot_to_Vim.iso 
:!sh in command mode. To turn off use the command :!halt .Source: https://habr.com/ru/post/237213/
All Articles