Update README.md

This commit is contained in:
Ivan Davidov 2016-06-12 14:33:33 +03:00 committed by GitHub
parent 4cc1ee4a2d
commit cad1dec587

View File

@ -7,29 +7,18 @@ The script below uses **Linux kernel 4.6.2** and **BusyBox 1.24.2**. The source
After that simply run the below script. It doesn't require root privileges. In the end you should have a bootable ISO image named `minimal_linux_live.iso` in the same directory where you executed the script. After that simply run the below script. It doesn't require root privileges. In the end you should have a bootable ISO image named `minimal_linux_live.iso` in the same directory where you executed the script.
rm -rf work
mkdir work
cd work
rm -f linux-4.6.2.tar.xz
wget http://kernel.org/pub/linux/kernel/v4.x/linux-4.6.2.tar.xz wget http://kernel.org/pub/linux/kernel/v4.x/linux-4.6.2.tar.xz
rm -rf kernel tar -xvf linux-4.6.2.tar.xz
mkdir kernel cd linux-4.6.2
tar -xvf linux-4.6.2.tar.xz -C kernel
cd kernel/linux-4.6.2
make clean defconfig vmlinux make clean defconfig vmlinux
cd ../.. cd ..
rm -f busybox-1.24.2.tar.bz2
wget http://busybox.net/downloads/busybox-1.24.2.tar.bz2 wget http://busybox.net/downloads/busybox-1.24.2.tar.bz2
rm -rf busybox tar -xvf busybox-1.24.2.tar.bz2
mkdir busybox cd busybox-1.24.2
tar -xvf busybox-1.24.2.tar.bz2 -C busybox
cd busybox/busybox-1.24.2
make clean defconfig make clean defconfig
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
make busybox install make busybox install
rm -rf ../../rootfs cd _install
cp -R _install ../../rootfs
cd ../../rootfs
rm -f linuxrc rm -f linuxrc
mkdir dev proc sys mkdir dev proc sys
echo '#!/bin/sh' > init echo '#!/bin/sh' > init
@ -39,13 +28,10 @@ After that simply run the below script. It doesn't require root privileges. In t
echo 'mount -t sysfs none /sys' >> init echo 'mount -t sysfs none /sys' >> init
echo 'setsid cttyhack /bin/sh' >> init echo 'setsid cttyhack /bin/sh' >> init
chmod +x init chmod +x init
rm -f ../rootfs.cpio.gz find . | cpio -H newc -o | gzip > ../../rootfs.cpio.gz
cd ../rootfs cd ../../linux-4.6.2
find . | cpio -H newc -o | gzip > ../rootfs.cpio.gz make isoimage FDINITRD=../rootfs.cpio.gz
rm -f ../../minimal_linux_live.iso cp arch/x86/boot/image.iso ../minimal_linux_live.iso
cd ../kernel/linux-4.6.2 cd ..
make isoimage FDINITRD=../../rootfs.cpio.gz
cp arch/x86/boot/image.iso ../../../minimal_linux_live.iso
cd ../../..
Note that this produces very small live Linux OS with working shell only. The network support has been implemented properly in the [Minimal Linux Live](http://github.com/ivandavidov/minimal) project which is extensively documented and more feature rich, yet still produces very small live Linux ISO image. Note that this produces very small live Linux OS with working shell only. The network support has been implemented properly in the [Minimal Linux Live](http://github.com/ivandavidov/minimal) project which is extensively documented and more feature rich, yet still produces very small live Linux ISO image.