## Minimal Linux Live

Home Changes About Tutorial Emulator Download GitHub

#### Home

Minimal Linux Live is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library and Busybox userland utilities. Additional software can be included in the ISO image at build time by using a well-documented configuration file. Minimal Linux Live can be downloaded as a pre-built image, built from scratch or run in a web browser by using a JavaScript PC emulator.
Steps to follow if you want to build your own Minimal Linux Live ISO image file:

- Get the latest source code archive from the download section.
- Extract the source code archive. Note that even though the extracted scripts are relatively small in size (~1MB), you need ~2GB free disk space for the actual build process.
- Resolve the build dependencies (e.g. GCC, make, etc.). On Ubuntu you can use the following command:
  `sudo apt install wget make gawk gcc bc libelf-dev xorriso`
- Execute the script build_minimal_linux_live.sh and get some coffee. The whole build process should take less than 30 minutes on a modern computer.
- In the end you will find the generated ISO image file minimal_linux_live.iso in the same folder where you started the build process.

The default build process for version 28-Jan-2018 generates ~9MB ISO image on 64-bit host machines, but you can make the ISO image even smaller (~8MB) if you exclude the default overlay bundles from the main .config file.
If your build fails for some reason, most probably there are unresolved build dependencies. Please have in mind that the build dependencies can vary a lot depending on the Linux OS that you use and the software that you have already installed. If you still have troubles, you should be able to identify the failing script from the console output. You may find it useful to enable "debug" logging in the failing shell script like this: `set -ex`. Manually run the failing script and identify the failing part. If you are unable to find a solution to your problem, then you can ask someone more experienced Linux guy around you or as alternative you can submit an issue.
You can run the ISO image in virtual machine, e.g. QEMU, VirtualBox or VMware Workstation Player (free for non-commercial use). You can also burn the ISO image file on CD/DVD or on USB flash device by issuing `dd if=minimal_linux_live.iso of=/dev/xxx` where `/dev/xxx` is your USB flash device.
The generated ISO image file contains Linux kernel, GNU C library compiled with default options, Busybox compiled with default options, quite simple initramfs structure and some "overlay bundles" (the default build process provides few overlay bundles). You don't get Windows support out of the box, nor you get any fancy desktop environment. All you get is a simple shell console with default Busybox applets, network support via DHCP and... well, that's all. This is why it's called "minimal".
Note that by default Minimal Linux Live provides support for legacy BIOS systems. You can change the build configuration settings in the .config file and rebuild MLL with support for modern UEFI systems.
All build scripts are well organized and quite small in size. You can easily learn from the scripts, reverse engineer the build process and later modify them to include more stuff (I encourage you to do so). After you learn the basics, you will have all the necessary tools and skills to create your own fully functional Linux based operating system which you have built entirely from scratch.
You are encouraged to read the tutorial which explains the MLL build process. The same tutorial, along with all MLL source code, can be found in the ISO image structure in the /minimal/rootfs/usr/src directory.
Below you can find several screenshots from version 28-Jan-2018 which demonstrate what the MLL environment looks like.

#### Change Log

28-Jan-2018 show
28-Jan-2018 hide

- Updated software base - Minimal Linux Live (MLL) is based on Linux kernel 4.14.12, GNU C library 2.26 and Busybox 1.27.2. The generated ISO image file is 9MB and requires 256MB RAM in order to run properly.
- 30+ available overlay bundles with new additions like nano, vim, Cloud Foundry and BOSH clients, Open JDK, keyboard layouts, the game 2048 and many more.
- Bundle dependency management - good example is the Open JDK overlay bundle which depends on GLIBC and ZLIB. From end user perspective all you need to do is to add Open JDK to the list of overlay bundles that you want to include in MLL and the overlay build system will automatically prepare the overlay bundles required by Open JDK.
- Separate configuration file for overlay bundles - all bundle specific configuration can be externalized in separate configuration file. This makes the main configuration file much smaller and easier to maintain. The entries in the bundle configuration file take precedence over the entries in the main configuration file.
- Autorun functionality in the initramfs - all scripts in `/etc/autorun` are automatically executed on boot. This feature is used by some overlay bundles which require some functionality to be triggered on boot (e.g. the DHCP overlay bundle).
- DHCP functionality as separate overlay bundle - the DHCP client functionality is triggered automatically on boot. The default DNS resolver is changed to Quad 9. The public Google DNS resolvers are still present and used as backup. This overlay bundle is enabled by default.
- Source code as separate overlay bundle - previous MLL versions used to include the MLL source code both in the initramfs structure and in the ISO image structure. Now the same source code is included as overlay bundle and can be found either in `/minimal/rootfs/usr/src` (ISO image) or in `/usr/src` (initramfs). This overlay bundle is enabled by default.
- Docker compatible image - The MLL build process generates Docker compatible image `mll_image.tgz` which contains all available software from the MLL ISO image. This image can be imported and used in Docker or in any other container system which supports raw filesystem import. You could add your own software in MLL (e.g. simple HTTP server like 'nweb' which is provided as overlay bundle) and then use Docker instead of running the entire OS.
- Overlay bundles can be merged in the initramfs - all overlay bundles can be "merged" with the initramfs structure. In this way all overlay bundle functionality is available on boot, ragrdless of the limited hardware detection support. This makes the initramfs structure significantly larger and as consequence you need more RAM since all overlay bundles are available as part of the initramfs.
- Structural improvements - the overlay build system is completely separated from the main build system. The main shell scripts are more, but each individual shell script has simpler structure. Both the main build process and the overlay build system rely on "common" logic from separate shell script, which is included in all other relevant shell scripts. The "sparse" image file size has been increased to 3MB in order to handle the size of the default overlay bundles.
- UEFI and BIOS support - MLL provides different build flavors, depending on the targeted firmware compatibility. The "bios" build flavor targets legacy BIOS systems and uses precompiled boot loaders provided by the syslinux project. The "uefi" build flavor targets modern UEFI systems and uses precompiled boot loaders provided by the systemd-boot project. You can also generate "mixed" ISO image which can boot on both legacy BIOS and modern UEFI systems. The default build flavor is "bios".
- ISO image restructuring - the main ISO image directory no longer contains individual files. One exception is "minimal.img" if the "sparse" overlay location has been enabled in the main configuration file. This makes the ISO image structure easier for future maintenance.
- Custom MLL boot logo - the MLL boot logo is provided as separate overlay bundle. However, it is different from the other overlay bundles because it doesn't add overlay functionality. Instead, this overlay bundle "injects" the custom MLL boot logo in the kernel source tree and triggers small kernel rebuild. This overlay bundle is enabled by default.

20-Jan-2017 show
20-Jan-2017 hide

- Updated software base - Minimal Linux Live (MLL) is based on Linux kernel 4.4.44, GNU C library 2.24 and Busybox 1.26.2. The generated ISO image file is 7MB and requires 256MB RAM in order to run properly.
- UEFI support - MLL provides experimental UEFI support and the live CD can boot on UEFI based systems which provide UEFI shell.
- Additional software via overlay bundles - the MLL architecture has been significantly improved and you can add more software via the so-called "overlay bundles". This feature has been documented in the ".config" file, as well as in the internal README documents. By default these overlay bundles are not part of the build process because they rely on the host machine environment and they may or may not be built correctly on your particular machine. Nevertheless, turning this feature on is very simple and I encourage you to experiment with it.
- Persistence support - MLL has the ability to transparently persist the changes that have been made during the live session and these changes will be preserved between reboots. You can use this feature to add your own software in MLL, change the MLL file/directory structure or simply to persist whatever changes you've made during the live session. This feature has been documented in the ".config" file, the internal README documents and in the internal shell script comments.
- Smaller ISO image size - one of the goals for this release was to minimize the ISO image size and make it as small as possible. The final result is ISO image, which is now less than 7MB when MLL has been generated with the default configuration options. However, the smaller ISO image size comes at cost and you need more RAM (256MB) in order to boot MLL properly.
- GCC optimization flags - the MLL configuration allows you to provide your own GCC flags which are used when the software pieces are compiled. These GCC optimization flags are not magical and they may or may not work fine on your particular host machine. They work fine on Ubuntu/Mint host machines and should work fine on other Debian based host machines. You can disable this feature if you get weird compilation issues on your host machine during the build process.
- Syslinux as download dependency - the "Syslinux" build dependency is no longer mandatory prerequisite requirement because the Syslinux source package is downloaded automatically as part of the build process.
- Graphical boot mode with configurable screen resolution - MLL can boot in graphical mode. At the beginning of the boot process you are presented with option to choose the screen resolution. This feature currently works only in BIOS boot mode.
- Rescue shells during boot - the MLL boot process has been enhanced and you can temporarily "exit" the boot process in the so-called "rescue shell". In fact, this is a normal shell which runs with PID 1. This is useful if you want to have interactive environment (i.e. shell) while you are still in early "pre-init" boot stage.
- Initial RAM filesystem in separate directory structure - the initramfs structure has been externalized in separate directory. This makes it easier to modify the initramfs environment.
- Optional use of preconfigured Linux kernel and Busybox - you can provide custom Linux kernel and Busybox configurations. This is useful if you want to build MLL with many non-default options or if you want to distribute your own version of MLL.
- Optional use of already downloaded sources - this feature does what it says: if you turn it on, you don't need internet connection and you will be using already downloaded sources. This is useful if you don't want to use internet connection or if you want to distribute your own version of MLL which includes specific sources.
- Many more internal improvements - script enhancements, improved comments and better documentation, the newly introduced overlay build subsystem, additional helpful scripts, etc. Check the ".config" file and the internal README documents for more details.

03-Apr-2016 show
03-Apr-2016 hide

- Minimal Linux Live is now based on Linux kernel 4.4.6, GNU C library 2.23 and Busybox 1.24.2. The generated ISO image file is ~4MB larger due to glibc overhead and requires more RAM (64MB is enough).
- The build architecture has been revised and now the only core dependency to the host OS is the actual C compiler along with the related binary utils. Kernel headers and main C library (which used to be implicit dependencies) are now automatically generated and used as part of the overall build process.
- The DNS resolving issue has been fixed and the network/internet related Busybox applets (ping, wget, etc.) now work fine.
- The ISO image generation process is now in a separate script file, completely detached from the kernel build infrastructure. This allows the Minimal Linux Live users to modify the ISO image file/directory structure before the actual ISO generation.
- The internal script comments have been revised and now they are more descriptive than before.
- The experimental folder has been removed.

14-Sep-2015 show
14-Sep-2015 hide

- Minimal Linux Live is now based on Linux kernel 4.1.6 and Busybox 1.23.2.
- The build process is now parallelized between all available CPU cores, therefore the overall build time is significantly reduced.
- There is DHCP network support for all network devices detected by the kernel. Note that DNS is not working due to well-known static linking issues caused by glibc.
- The ISO image is now generated by using genisoimage. This fixes some issues with Debian and Arch based host operating systems.
- In addition to the above changes, if you download the current stable build scripts, you will notice a folder named experimental. This folder contains some interesting scripts which produce ISO based on Linux kernel and ToyBox instead of Busybox. Please have in mind that this is work in progress and these scripts may not work on your host OS.

07-Feb-2015 show
07-Feb-2015 hide

- Minimal Linux Live is now based on Linux kernel 3.18.6 and Busybox 1.23.1.

25-Aug-2014 show
25-Aug-2014 hide

- Minimal Linux Live is now based on Linux kernel 3.16.1 and Busybox 1.22.1.
- The boot process is now based on /sbin/init and /etc/inittab. There are four available consoles. You can switch between them with Alt + F1 up to Alt + F4.
- Shell scripts have been updated. Now the downloaded source bundles are stored in separate folder. If the download process is interrupted, it will continue the next time the scripts are executed. The most notable change is in 5_generate_rootfs.sh which now generates root file system with structure compatible with /sbin/init and /etc/inittab.

28-Jul-2014 show
28-Jul-2014 hide

- Minimal Linux Live is now based on Linux kernel 3.15.6 and Busybox 1.22.1.
- The boot process is based on simple /init script.

#### About This Project

My name is Ivan Davidov and I currently live and work in Sofia, Bulgaria.
I am professional Java software engineer (surprisingly, Java developers tend to know some Linux stuff) and I have been trying to create my own Linux OS for a very long time. Over the years I found some good online tutorials, but most of them are not simple to follow and pretty much none of them explains in detail what has been done and why it's done in this particular way. In most cases the tutorials are outdated or incomplete and there is high chance that you will end up with something broken.
You can learn a lot from these online tutorials, as I did. In fact, the scripts that I created are based on the same information resources which you might have already found. The difference is that this project provides you with fully functional set of shell scripts which automatically build fully functional live Linux OS, detailed tutorial and probably the best internal documentation you will ever find in an open source project.
You can follow Minimal Linux Live on Facebook. If you'd like to contact me, my e-mail is: davidov [dot] i (at) gmail {dot} com. Let me know if you find this project useful. Thanks! :)
My LinkedIn profile is here: http://linkedin.com/in/ivandavidov

#### Minimal Linux Live Tutorial

Would you like to learn how to build your own minimal live Linux OS?
The Dao of Minimal Linux Live is a tutorial based on the first published version of Minimal Linux Live. The tutorial explains in detail what steps are involved in the creation of simple live Linux OS entirely from scratch, the inner structure of the build scripts and provides you with more information on how to improve/upgrade the generated OS with other generic stuff (e.g. users & groups, /etc/inittab).
You can also refer to the Minimal Linux Script project which provides you with the minimal set of shell script commands that you need in order to create simple, yet fully functional Linux based operating system.

#### Online PC Emulator

You can try Minimal Linux Live directly in your browser. The link below will open new browser window (or tab) with JavaScript based PC emulator which will automatically run Minimal Linux Live version 28-Jan-2018. Please be advised that this PC emulator runs entirely in your browser and therefore it is not very fast.
Minimal Linux Live - emulator
Some screenshots with Minimal Linux Live running in the JavaScript PC emulator:

#### Download Section

The build scripts for version `28-Jan-2018` are available as tar.xz archive.

- minimal_linux_live_28-Jan-2018_src.tar.xz - from GitHub.
- minimal_linux_live_28-Jan-2018_src.tar.xz - from this website.

The list below provides pre-built ISO images with support for legacy BIOS for 64-bit and 32-bit Intel CPUs.

- minimal_linux_live_28-Jan-2018_64-bit_bios.iso - 64-bit ISO image from GitHub.
- minimal_linux_live_28-Jan-2018_32-bit_bios.iso - 32-bit ISO image from GitHub.
- minimal_linux_live_28-Jan-2018_64-bit_bios.iso - 64-bit ISO image from this website.
- minimal_linux_live_28-Jan-2018_32-bit_bios.iso - 32-bit ISO image from this website.

You can browse the GitHub releases or browse the download directory in this website where you will find all source archives and pre-built ISO images with support for BIOS, UEFI and mixed BIOS/UEFI.
You can take a look at the latest development sources in the GitHub project.
Go to top