Fixes ldlinux.c32 Bug and Compiling Errors
The old way of creating the image used to require the user to manually add Syslinux Features like isolinux.bin and ldlinux.c32, which without them, the system wouldn't boot. Now the small instruction guide will move the required files with the Kernel and Rootfs. Also fixed a small user error when generating the Rootfs by changing "find . | cpio -R +0:+0 -H newc -o | gzip > ../../rootfs.cpio.gz" to "find . | cpio -R root:root -H newc -o | gzip > ../../rootfs.cpio.gz"
This commit is contained in:
parent
d2b2366cf6
commit
2c52814722
31
README.md
31
README.md
@ -7,10 +7,13 @@ The script below uses **Linux kernel 4.7.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.
|
||||||
|
|
||||||
wget http://kernel.org/pub/linux/kernel/v4.x/linux-4.7.2.tar.xz
|
wget http://kernel.org/pub/linux/kernel/v4.x/linux-4.7.6.tar.xz
|
||||||
wget http://busybox.net/downloads/busybox-1.24.2.tar.bz2
|
wget http://busybox.net/downloads/busybox-1.24.2.tar.bz2
|
||||||
tar -xvf linux-4.7.2.tar.xz
|
wget http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz
|
||||||
|
mkdir isoimage
|
||||||
|
tar -xvf linux-4.7.6.tar.xz
|
||||||
tar -xvf busybox-1.24.2.tar.bz2
|
tar -xvf busybox-1.24.2.tar.bz2
|
||||||
|
tar -xvf syslinux-6.03.tar.xz
|
||||||
cd busybox-1.24.2
|
cd busybox-1.24.2
|
||||||
make distclean defconfig
|
make distclean defconfig
|
||||||
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
|
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
|
||||||
@ -26,10 +29,28 @@ 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 > ../../rootfs.cpio.gz
|
find . | cpio -R root:root -H newc -o | gzip > ../../rootfs.cpio.gz
|
||||||
cd ../../linux-4.7.2
|
cd ../../linux-4.7.6
|
||||||
make mrproper defconfig bzImage
|
make mrproper defconfig bzImage
|
||||||
make isoimage FDINITRD=../rootfs.cpio.gz
|
cp arch/x86/boot/bzImage \
|
||||||
cp arch/x86/boot/image.iso ../minimal_linux_live.iso
|
../isoimage/kernel
|
||||||
cd ..
|
cd ..
|
||||||
|
cd isoimage
|
||||||
|
cp ../syslinux-6.03/bios/core/isolinux.bin .
|
||||||
|
cp ../syslinux-6.03/bios/com32/elflink/ldlinux/ldlinux.c32 .
|
||||||
|
cp kernel ./kernel.xz
|
||||||
|
cp ../rootfs.cpio.xz ./rootfs.xz
|
||||||
|
echo 'default kernel.xz initrd=rootfs.xz vga=ask' > ./isolinux.cfg
|
||||||
|
genisoimage \
|
||||||
|
-J \
|
||||||
|
-r \
|
||||||
|
-o ../minimal_linux_live.iso \
|
||||||
|
-b isolinux.bin \
|
||||||
|
-c boot.cat \
|
||||||
|
-input-charset UTF-8 \
|
||||||
|
-no-emul-boot \
|
||||||
|
-boot-load-size 4 \
|
||||||
|
-boot-info-table \
|
||||||
|
./
|
||||||
|
isohybrid -u ../minimal_linux_live.iso 2>/dev/null || true
|
||||||
|
|
||||||
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user