Now using the latest available software versions.
This commit is contained in:
parent
6e1ebd5988
commit
c1e2c37fcf
16
README.md
16
README.md
@ -4,20 +4,20 @@ One script which generates fully functional live Linux ISO image with minimal ef
|
|||||||
|
|
||||||
The script below uses **Linux kernel 4.7.6**, **BusyBox 1.24.2** and **Syslinux 6.03**. The source bundles are downloaded and compiled automatically. If you are using [Ubuntu](http://ubuntu.com) or [Linux Mint](http://linuxmint.com), you should be able to resolve all build dependencies by executing the following command:
|
The script below uses **Linux kernel 4.7.6**, **BusyBox 1.24.2** and **Syslinux 6.03**. The source bundles are downloaded and compiled automatically. If you are using [Ubuntu](http://ubuntu.com) or [Linux Mint](http://linuxmint.com), you should be able to resolve all build dependencies by executing the following command:
|
||||||
|
|
||||||
sudo apt-get install wget bc build-essential gawk xorriso
|
sudo apt install wget make gawk gcc bc bison flex xorriso libelf-dev libssl-dev
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
wget http://kernel.org/pub/linux/kernel/v4.x/linux-4.7.6.tar.xz
|
wget http://kernel.org/pub/linux/kernel/v4.x/linux-4.19.12.tar.xz
|
||||||
wget http://busybox.net/downloads/busybox-1.24.2.tar.bz2
|
wget http://busybox.net/downloads/busybox-1.29.3.tar.bz2
|
||||||
wget http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz
|
wget http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz
|
||||||
mkdir isoimage
|
mkdir isoimage
|
||||||
tar -xvf linux-4.7.6.tar.xz
|
tar -xvf linux-4.19.12.tar.xz
|
||||||
tar -xvf busybox-1.24.2.tar.bz2
|
tar -xvf busybox-1.29.3.tar.bz2
|
||||||
tar -xvf syslinux-6.03.tar.xz
|
tar -xvf syslinux-6.03.tar.xz
|
||||||
cd busybox-1.24.2
|
cd busybox-1.29.3
|
||||||
make distclean defconfig
|
make distclean 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
|
||||||
cd _install
|
cd _install
|
||||||
rm -f linuxrc
|
rm -f linuxrc
|
||||||
@ -30,7 +30,7 @@ After that simply run the below script. It doesn't require root privileges. In t
|
|||||||
echo 'setsid cttyhack /bin/sh' >> init
|
echo 'setsid cttyhack /bin/sh' >> init
|
||||||
chmod +x init
|
chmod +x init
|
||||||
find . | cpio -R root:root -H newc -o | gzip > ../../isoimage/rootfs.gz
|
find . | cpio -R root:root -H newc -o | gzip > ../../isoimage/rootfs.gz
|
||||||
cd ../../linux-4.7.6
|
cd ../../linux-4.19.12
|
||||||
make mrproper defconfig bzImage
|
make mrproper defconfig bzImage
|
||||||
cp arch/x86/boot/bzImage ../isoimage/kernel.gz
|
cp arch/x86/boot/bzImage ../isoimage/kernel.gz
|
||||||
cd ../isoimage
|
cd ../isoimage
|
||||||
|
18
minimal.sh
18
minimal.sh
@ -1,16 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -ex
|
set -ex
|
||||||
KERNEL_VERSION=4.12.3
|
KERNEL_VERSION=4.19.12
|
||||||
BUSYBOX_VERSION=1.27.1
|
BUSYBOX_VERSION=1.29.3
|
||||||
SYSLINUX_VERSION=6.03
|
SYSLINUX_VERSION=6.03
|
||||||
wget -O kernel.tar.xz http://kernel.org/pub/linux/kernel/v4.x/linux-$KERNEL_VERSION.tar.xz
|
wget -O kernel.tar.xz http://kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.xz
|
||||||
wget -O busybox.tar.bz2 http://busybox.net/downloads/busybox-$BUSYBOX_VERSION.tar.bz2
|
wget -O busybox.tar.bz2 http://busybox.net/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2
|
||||||
wget -O syslinux.tar.xz http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-$SYSLINUX_VERSION.tar.xz
|
wget -O syslinux.tar.xz http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-${SYSLINUX_VERSION}.tar.xz
|
||||||
tar -xvf kernel.tar.xz
|
tar -xvf kernel.tar.xz
|
||||||
tar -xvf busybox.tar.bz2
|
tar -xvf busybox.tar.bz2
|
||||||
tar -xvf syslinux.tar.xz
|
tar -xvf syslinux.tar.xz
|
||||||
mkdir isoimage
|
mkdir isoimage
|
||||||
cd busybox-$BUSYBOX_VERSION
|
cd busybox-${BUSYBOX_VERSION}
|
||||||
make distclean defconfig
|
make distclean 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
|
||||||
@ -25,12 +25,12 @@ 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
|
||||||
find . | cpio -R root:root -H newc -o | gzip > ../../isoimage/rootfs.gz
|
find . | cpio -R root:root -H newc -o | gzip > ../../isoimage/rootfs.gz
|
||||||
cd ../../linux-$KERNEL_VERSION
|
cd ../../linux-${KERNEL_VERSION}
|
||||||
make mrproper defconfig bzImage
|
make mrproper defconfig bzImage
|
||||||
cp arch/x86/boot/bzImage ../isoimage/kernel.gz
|
cp arch/x86/boot/bzImage ../isoimage/kernel.gz
|
||||||
cd ../isoimage
|
cd ../isoimage
|
||||||
cp ../syslinux-$SYSLINUX_VERSION/bios/core/isolinux.bin .
|
cp ../syslinux-${SYSLINUX_VERSION}/bios/core/isolinux.bin .
|
||||||
cp ../syslinux-$SYSLINUX_VERSION/bios/com32/elflink/ldlinux/ldlinux.c32 .
|
cp ../syslinux-${SYSLINUX_VERSION}/bios/com32/elflink/ldlinux/ldlinux.c32 .
|
||||||
echo 'default kernel.gz initrd=rootfs.gz' > ./isolinux.cfg
|
echo 'default kernel.gz initrd=rootfs.gz' > ./isolinux.cfg
|
||||||
xorriso \
|
xorriso \
|
||||||
-as mkisofs \
|
-as mkisofs \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user