Giter Site home page Giter Site logo

ivandavidov / minimal Goto Github PK

View Code? Open in Web Editor NEW
1.5K 97.0 289.0 7.17 MB

Minimal Linux Live (MLL) 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.

Home Page: https://ivandavidov.github.io/minimal

License: GNU General Public License v3.0

Shell 13.30% HTML 69.99% Makefile 0.36% C 0.75% NSIS 0.01% CSS 4.66% TypeScript 4.12% JavaScript 6.82%
linux linux-kernel shell minimal operating-system shell-scripts busybox efi overlay uefi

minimal's Introduction

Minimal Linux Live

Stargazers over time

Stargazers over time


Overview

Minimal Linux Live (MLL) 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.

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 (refer to the Debootstrap Live project if you need minimal system with network and UI). 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.

The guidebook explains in details the MLL architecture and the build process. This is the recommended documentation resource if you want to have complete understanding of the MLL ecosystem.

You are encouraged to read the tutorial which explains the minimalistic 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.

The project has been supported by the cool guys at Microweber - check them out. :)

Website and mirrors are available here:

List of related projects is available in the end of this document. If you don't find what you're looking for in MLL, perhaps you'll find it in the related projects, e.g. minimal Linux system with graphical user interface (GUI), or perhaps minimal Linux system with option to run Docker containers.

The README document and the main .config file provide extensive documentation regarding the Minimal Linux Live features.

The DAO of Minimal Linux Live - this tutorial explains step by step what you need to do in order to create your own minimalistic live Linux OS. The tutorial is based on the first published version of Minimal Linux Live.

Component Architecture of Minimal Linux Live - this publication describes the high level components included in the '03-Apr-2016' version of Minimal Linux Live.

Did I mention the YouTube channel where you can watch some of the cool Minimal Linux Live features? No? Well, now you know about it! :)

Current development state

As of 09-Jun-2022:

  • Linux kernel 5.18.3
  • GNU C Library 2.35
  • Busybox 1.34.1

Stable build on default Ubuntu 22.04 installation with applied system updates.

Here are some screenshots of the latest published version of Minimal Linux Live:

Minimal Linux Live

Minimal Linux Live Readme

You can experiment with Minimal Linux Live directly in your browser by using JavaScript PC Emulator. Here is a screenshot:

Minimal Linux Live JavaScript Emulator

MLL on ARM (AArch64)

A preview of MLL on ARM (AArch64) can be found in the branch aarch64.

  • Install Ubuntu Server 22.04 for ARM 64 (AArch64).
  • Resolve the following additional dependencies on top of the MLL required dependencies: qemu-system-aarch64, rsync, bzip2, dosfstools
  • Execute scripts 00 to 10.
  • Execute qemu-aarch64.sh and then switch to the QEMU serial console.

Minimal Linux Live on ARM64 (AArch64)

Future improvements

Take a look at the issues page where all future MLL improvements are tracked.

How to build

The section below is for Ubuntu and other Debian based distros.

# Update all repositories and upgrade all packages
sudo apt update
sudo apt upgrade -y

# Resolve build dependencies
sudo apt install -y wget make gawk gcc bc bison flex xorriso libelf-dev libssl-dev

# Build everything and produce ISO image.
./build_minimal_linux_live.sh

The section below is for SUSE.

# Refresh all repositeries and update all packages
sudo zypper refresh
sudo zypper update -y

# Resolve build dependencies
sudo zypper install -y make gcc flex bison libelf-devel libopenssl-devel bc xorriso

# Build everything and produce ISO image.
./build_minimal_linux_live.sh

The default build process uses some custom provided CFLAGS. They can be found in the .config file. Some of these additional flags were introduced in order to fix different issues which were reported during the development phase. However, there is no guarantee that the build process will run smoothly on your system with these particular flags. If you get compilation issues (please note that I'm talking about compilation issues, not about general shell script issues), you can try to disable these flags and then start the build process again. It may turn out that on your particular host system you don't need these flags.

Overlay bundles

Important note! Most of the overlay bundles come with no support since the build process for almost all of them is host specific and can vary significantly between different machines. Some overlay bundles have no dependencies to the host machine, e.g. the bundles which provide the DHCP functionality and the MLL source code. These bundles are enabled by default.

Minimal Linux Live has the concept of overlay bundles. During the boot process the OverlayFS driver merges the initramfs with the content of these bundles. This is the mechanism which allows you to provide additional software on top of MLL without touching the core build process. In fact the overlay bundle system has been designed to be completely independent from the MLL build process. You can build one or more overlay bundles without building MLL at all. However, some of the overlay bundles have dependencies on the software pieces provided by the MLL build process, so it is recommended to use the overlay build subsystem after you have produced the 'initramfs' area.

The overlay bundle system provides dependency management. If bundle 'b' depends on bundle 'a' you don't need to build bundle 'a' manually in advance. The bundle dependencies are described in special metadata file bundle_deps and all such dependencies are prepared automatically.

# How to build all overlay bundles.

cd minimal_overlay
./overlay_build.sh
# How to build specific overlay bundle. The example is for 'Open JDK'
# which depends on many GNU C libraries and on ZLIB. All dependencies
# are handled automatically by the overlay bundle system.

cd minimal_overlay
./overlay_build.sh openjdk

Take a look at the mll_hello overlay bundle which compiles simple C program (it prints one line in the console) and installs it properly in the MLL overlay structure.

Runtime software

Another way to add software in MLL is at runtime by using slightly modified version of static-get which is provided as additional overlay bundle. The static_get overlay bundle is not enabled by default. You can enable it in the main .config file. Here are some examples with static-get:

# Search for 'vim'
static-get -s vim

# Install the 'vim' package. Run 'vim' after that
static-get -i vim

# Search for 'tetris'
static-get -s tetris

# Install the 'vitetris' package. Run 'vitetris' after that
static-get -i vitetris

GraalVM

The current development version of MLL partially supports GraalVM (provided as overlay bundle). Note that GraalVM has runtime dependencies on GCC and Bash and therefore some GraalVM feature are not supported in MLL, e.g. the gu updater and almost all GVM language wrapper scripts, including the R wrappers. Nevertheless, the core GVM features work fine. Java, Python, Ruby, Node and JavaScript work in MLL/GraalVM environment. Great, isn't it! :)

GraalVM languages

GraalVM - Java

GraalVM - Python

GraalVM - Ruby

GraalVM - Node

GraalVM - JS

BIOS and UEFI

Minimal Linux Live can be used on UEFI systems (as of version 28-Jan-2018) thanks to the systemd-boot project. There are three build flavors that you can choose from:

  • bios - MLL will be bootable only on legacy BIOS based systems. This is the default build flavor.
  • uefi - MLL will be bootable only on UEFI based systems.
  • both - MLL will be bootable on both legacy BIOS and modern UEFI based systems.

The generated MLL iso image is 'hybrid' which means that if it is 'burned' on external hard drive, this external hard drive will be bootable. You can use this behavior to install MLL on your USB flash device (read the next section).

The older version of Minimal Linux Live 20-Jan-2017 has experimental UEFI support and the MLL ISO image can be used on legacy BIOS based systems and on UEFI based systems with enabled UEFI shell (level support 1 or higher, see section 3.1 - Levels Of Support of the UEFI Shell specification). All newer versions of Minimal Linux Live have full UEFI support.

Installation

The build process produces ISO image which you can use in virtual machine or you can burn it on real CD/DVD. Installing MLL on USB flash drive currently is not supported but it can be easily achieved by using syslinux or extlinux since MLL requires just two files (one kernel file and another initramfs file). This applies for legacy BIOS based systems.

Another way to install MLL on USB flash drive is by using YUMI or other similar tools. This applies for legacy BIOS based systems.

Yet another way to install MLL on USB flash drive is by using the dd tool:

# Directly write the ISO image to your USB flash device (e.g. /dev/xxx)
dd if=minimal_linux_live.iso of=/dev/xxx

The USB flash device will be recognized as bootable device and you should be able to boot MLL successfully from it. If you have chosen the 'combined' build flavor (i.e. value both for the corresponding configuration property), then your USB flash device will be bootable on both legacy BIOS and modern UEFI based systems.

The build process also generates a compressed filesystem image file mll_image.tgz which contains everything from the initramfs area and everything from the overlay area, i.e. all overlay bundles that have been installed during the MLL build process. You can import and use the filesystem image in Docker like this:

# Import the MLL filesystem image in Docker.
docker import mll_image.tgz minimal-linux-live:latest

# Run MLL shell in Docker:
docker run -it minimal-linux-live /bin/sh

It is also possible to start MLL over network, using PXE mechanism (often called PXE diskless boot). To achieve that, before building MLL, edit src/.config and set OVERLAY_LOCATION to rootfs instead of default iso. Then follow build process, which will build the minimal_linux_live.iso. Extract kernel and rootfs from this iso, and assuming webserver is using /var/www/html/ folder as index, copy files here:

mount minimal_linux_live.iso /mnt
cp -a /mnt/boot/kernel.xz /var/www/html/
cp -a /mnt/boot/rootfs.xz /var/www/html/

Note: on RHEL systems, remember to restore SELinux contexts using restorecon -Rv /var/www/html/.

Then assuming you are using iPXE as a PXE rom, and that your webserver ip is 10.0.0.1, create file /var/www/html/MLL.ipxe with the following content:

#!ipxe
echo Booting MLL
kernel http://10.0.0.1/kernel.xz initrd=rootfs.xz
initrd http://10.0.0.1/rootfs.xz
imgstat
echo All files downloaded, booting in 2s...
sleep 2
boot

Note: append your console parameter on the kernel line if using a remote IPMI console.

And chainload your mail iPXE to this file.

Publications

Case studies, research papers, publications, presentations, etc. regarding Minimal Linux Live and Minimal Linux Script.

Related projects

List of cool forks, spin-offs and other related projects inspired by Minimal Linux Live.

  • Minimal Linux Script - very simplified and minimalistic version of MLL. This project is recommended as a starting point for beginners.

  • systemd-boot - this project provides the UEFI boot loader images that MLL relies on. It also provides helper shell scripts which generate UEFI compatible MLL ISO images out of the already existing BIOS compatible MLL ISO images.

  • Bare Minimal Linux - fork of minimal linux for baremetal debugging. This project is part of the SAP Converged Cloud ecosystem.

  • Minimal Linux FIRESTARTER - minimal Linux distribution with integrated FIRESTARTER processor stress test utility. This project is developed at TU Dresden - Centre for Information Services and High Performance Computing.

  • Prognostic Linux Live - stripped down Linux environment for the development and experiments at the Prognostic Lab at the University of Pittsburgh.

  • Minimal Container Linux - a Linux host OS designed to run Containers with a minimalist design and small footprint.

  • Debootstrap Live - this spin-off of MLL generates bootable ISO with current kernel and debootstrap base system.

  • Boot2Minc - this fork adds Mincs and as result you can run Linux containers inside MLL. One interesting Mincs feature - it provides tools which allow you to reuse already existing Docker containers.

  • K1773R's MLL - PowerPC version of Minimal Linux Live with memtester as additional software. Impressive work!

  • Ladiko's MLL - this fork automatically downloads and uses the latest available Kernel and Busybox sources. By default there is NTFS and SquashFS support. The fork also provides an installer which can be used to put MLL on USB flash device.

  • StelaLinux - the successor of StarLinux and AwlsomeLinux. These projects are spin-offs of MLL that take different build approach.

  • prologic's MLL - this fork adds Python support to the MLL runtime environment.

  • KernelISO - extended version of MLL, based on older version of MLL.

  • diaob's MLL - MLL translation to Simplified Chinese.

  • bdheeman's MLL - MLL KISS fork (Keep It, Simple, Safe/Secure/Stupid).

  • Runlinux - environment to build and test Linux kernels.

  • Ersoy Kardesler Minimal Linux System - A minimal Linux script fork, adds custom Linux and BusyBox configs, NCURSES and GNU nano.

Thank you!

Don't miss the chance to share your honest opinion about MLL in DistroWatch. And don't forget to check the Minimal Linux Live page on Facebook.

Thank you for your support!

minimal's People

Contributors

andrenventer avatar awlsomealex avatar bauen1 avatar cirosantilli avatar cspenceiv avatar danelsan avatar dasshiva avatar dependabot[bot] avatar eersoy93 avatar elsie19 avatar freddii avatar gasharova avatar gormogon avatar hamidzr avatar ivandavidov avatar oxedions avatar shifengaway avatar technologyclassroom avatar timo-42 avatar tobiasfaller avatar vkynchev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minimal's Issues

How install on HD?

How install on HD using fdisk? It's possible create an extra sh file for it?

link error: undefined reference to `__poll_chk'

Hi,

I am using your script to build a minimal linux file system. However, I met the following problem when run 07_build_busybox.sh:

miscutils/lib.a(microcom.o): In function microcom_main': microcom.c:(.text.microcom_main+0x28b): undefined reference to__poll_chk'
networking/lib.a(ifplugd.o): In function ifplugd_main': ifplugd.c:(.text.ifplugd_main+0x318): undefined reference to__poll_chk'
runit/lib.a(runsv.o): In function runsv_main': runsv.c:(.text.runsv_main+0x4fe): undefined reference to__poll_chk'
util-linux/lib.a(script.o): In function script_main': script.c:(.text.script_main+0x204): undefined reference to__poll_chk'
collect2: error: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1

Have you any sense what is wrong?

ps. if I did not spefic the CONFIG_SYSROOT, denote line 41 in 07_build_busybox.sh, these would be not errors.

Thanks in advance

cannot boot image using QEmu

Hey,

I've built my own image, then tried to run it using QEmu. QEmu just stuck with no output.
then i tried to pull the offical images from website, both 32 and 64 edition does the same.

P.S:
Im running macOS Sierra

User Login?

With the addition of Minimal Linux Live being Installable to other machines, would it be possible to create another user in the Installation Progress? Or even better, provide a login prompt for the root user? I tired looking around in the init (since that is where it would most likely be added) but I can't seem to find /sbin/init, which is executed after OverlayFS has been added. What file is being copied over into the OverlayFS to become /sbin/init?

"Cloud Foundry CLI" script failure due to incorrect URL parsing.

The cf_cli overlay bundle currently uses hard coded value for the CF CLI URL. The problem is that the URL contains multiple = characters which break the URL parsing. This particular overlay bundle needs alternative approach for the URL parsing. One solution is to use source.

Alternatively, the overall approach regarding the URL parsing should be revised and updated in all scripts.

Externalize the DHCP network functionality as overlay bundle.

With the newly introduced autorun functionality it is now possible to decide what we want to run on boot. If an overlay bundle puts executable script in /etc/autorun, this script will be executed by MLL at boot time.

Right now the DHCP network functionality is utilizing this autorun functionality as PoC. The corresponding autorun script is currently part of the rootfs structure. However, it is possible to create new overlay bundle (e.g. dhcp_client) and externalize all DHCP client functionality there. In this way MLL will become more modular and the rootfs structure will become a little bit simpler.

Add 'nweb' as overlay bundle

The nweb project is direct descendant of the original nweb HTTP server developed by Nigel Griffiths.

This HTTP server is so small, easy to compile and easy to use, that it is perfect candidate to become the first overlay bundle enabled by default in the build process since it has no external dependencies and its build process is simple and fast.

As minimum, this should become an overlay bundle. The entire source may be hosted as part of the MLL project since the original license is in the public domain and all other project references that I found either don't explicitly set license or they are in the public domain as well.

ROOTFS problems

During the build the following errors happen:
*** GENERATE ROOTFS BEGIN *** Preparing initramfs work area... cp: cannot stat ‘/home/jeff/minimal/src/work/busybox/busybox_installed’: No such file or directory cp: target ‘rootfs’ is not a directory 09_generate_rootfs.sh: 24: cd: can't cd to rootfs cp: cannot stat ‘../src’: No such file or directory Source files and folders have been copied to '/src'. cp: cannot stat ‘/home/jeff/minimal/src/work/glibc/glibc_prepared/lib/ld-linux*’: No such file or directory Dynamic loader is accessed via '/lib'. cp: cannot stat ‘/home/jeff/minimal/src/work/glibc/glibc_prepared/lib/libm.so.6’: No such file or directory cp: cannot stat ‘/home/jeff/minimal/src/work/glibc/glibc_prepared/lib/libc.so.6’: No such file or directory cp: cannot stat ‘/home/jeff/minimal/src/work/glibc/glibc_prepared/lib/libresolv.so.2’: No such file or directory cp: cannot stat ‘/home/jeff/minimal/src/work/glibc/glibc_prepared/lib/libnss_dns.so.2’: No such file or directory Reduced the size of libraries and executables. The initramfs area has been generated. *** GENERATE ROOTFS END *** 0.00user 0.00system 0:00.07elapsed 0%CPU (0avgtext+0avgdata 2764maxresident)k 0inputs+0outputs (0major+2016minor)pagefaults 0swaps *** PACK ROOTFS BEGIN *** Packing initramfs. This may take a while... 10_pack_rootfs.sh: 14: cd: can't cd to rootfs

relying on user's $PATH can break build

Just tried minimal for the first time. Very cool. One glitch: in 09_pack_rootfs.sh my build failed on "cpio -R" because my $PATH includes "./" -- which I find convenient when developing but in this case (I presume) causes the shell script to find the busybox cpio build in a previous step. I patched the script to use /bin/cpio and all completed successfully. Perhaps there are other similar vulnerabilities in the build scripts?

Real Directory instead of OverlayFS

This is more of a discussion than an issue. What I want to do is with the mll-utils on my side project, AwlsomeLinux, and add the functionality to install/copy the OverlayFS to an actual File System (ext2 on /dev/sdxx) and have the InitramFS go into the actual filesystem, where do you recommend me looking for this information or do you know of such information? I've checked the closest things to Minimal Linux Live (Tiny Core doesn't even use OverlayFS, Alpine uses an Init Manager similar to Systemd (OpenRC), and Slax is too confusing.) Also does a Package Manager for Minimal Linux Live sound too far-fetched? Thanks!

Apache Felix overlay bundle needs alternative download URL

Currently the default download URL for Apache Felix points to online folder (accessible via HTTP) where only the latest stable version is available. This means that whenever new Apache Felix version is released, the corresponding URL in MLL becomes invalid.

Currently this doesn't cause build issues because all overlay bundles are disabled by default. Nevertheless, this should be fixed. One option is to use the Apache's online archive where (most probably) all Felix versions are available, including the latest one.

Generate a USB bootable image

It would be great to make it easier for people to run on real hardware if they don't have CDs.

I have implemented it at: https://github.com/************/runlinux/blob/8da285b7ddd0f6fa8a411fa020d12bc8f5ee7ef5/runlinux#L82-L84 and could PR here.

I think the image generated by grub-mkrescue is also bootable from a CD, but I can't test that (qemu -cdrom also works in addition to -hda).

@ladiko has also implemented it at https://github.com/ladiko/minimal/blob/0b2ae8b868f1d4294d7d2dfec41b093da5696705/src/create_boot_stick.sh but at 3 lines long I think mine is simpler :-)

Add startup script for the SSH server

The currently existing dropbear overlay bundle needs additional autorun script which properly handles the start process of the SSH server. Hints regarding the startup process can be found here. Note that these explanations have been provided for interactive console and the actual autorun process has to be slightly different.

NTFS USB mount fail

Mounting NTFS USB drive fails with error : "failed: invalid argument"

ntfs_mount

didnt find where to configure in order to add ntfs support (if its possible at all..)

Thanks,

Links: Missing libz.so.1

Whenever I try to load Links I get the following error:

links: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

And when I check my /lib and /lib64, the library file is not present. Is there maybe a configuration workaround, or does the dependency HAVE to be added?

EDIT: Adding the --disable-zlib argument to the configuration to see what happens.

EDIT 2: That gave the same error. Any Suggestions?

Add option to include overlay bundles as part of the initramfs structure

One use case is the DHCP client funstionality.

If we have the DHCP client functionality as overlay bundle, there is high chance that it won't work properly on real hardware because the kernel provides minimal configuration and as result many devices may not be recognized, including the boot device. In this case all overlay bundles won't be accessible.

So, if we want to ensure that certain functionality is really there, it should be part of the initramfs structure.

This would require some major reachitecturing because the overlay bundles should be available before the initramfs structure has been packaged. Another challenge is to redesign the overlay bundles so that they generate independent structure which then could be merged with the initramfs structure.

Add Openssl

For my application I want to run folding at home version 7. In order to download the client I need openssl. I think I see how this kind of thing works from looking at the musl-busybox scripts. Is that a good example of what would need to be done?

Linux Kernel 4.10 =< Unfinished Configuration

In Linux Kernel 4.10, they added more EFI support (specifically towards Apple Devices) to the configuration. However they failed to introduce a default value so whenever the 02_build_kernel.sh script is executed it hangs at the configuration section below:
APPLE_PROPERTIES
I've tried to create a sed to set a default value in the configuration but this specific setting is only found in a Kconfig table in the directory drivers/firmware/efi/Kconfig. An easy fix would to just say "Use Linux Kernel 4.9 and below!" or "Input 'n' manually." but I just wanted to bring this to your attention to see if you have any suggestions on automating this.

Theres also another one for OVERLAY_FS_REDIRECT_DIR but I haven't tested to see if adding a 'sed' command for the default config would work.

Shortest path to a minimal Linux desktop?

What would be needed to be able to build a minimal Linux desktop?

For a lot of professional Linux users a system that enables you to start Firefox or Chromium and be able to switch to a terminal window/workspace without closing down the browser first would be the minimal usable graphical desktop.

The hardest part would be to get Firefox or Chromium working on a Linux+busybox system.

Any ideas how to accomplish this? I suppose the simplest route would be to use Wayland and a patched Firefox/Chromium? Or are a lot more dependencies needed for this to work?

https://wiki.archlinux.org/index.php/wayland

Add a package manager | GCC

Nice project, but it lacks a package manager or at least GCC to compile additional packages. Please add it or at least provide a tutorial on how to install GCC.

Thanks!

Website update - fix the 'apt' dependencies

Currently the website provides the following as the command which should be executed in order to resolve all build dependencies:

sudo apt wget make gawk gcc bc genisoimage

However, the correct command is this one:

sudo apt install wget make gawk gcc bc genisoimage

The website should be updated accordingly. Also, the information about the RAM usage should be revised and updated if needed.

CentOS / StotinkaOS

I found multiple issues with the default build of MLL on StotinkaOS 7.3 (derived from CentOS 7.3).

  • GLIBC build causes buffer overflow in the linker (/bin/ld) when the default language is not English. The easiest workaround is to set the LANG shell variable to en_US.UTF-8 before building GLIBC. This bug has already been reported.
  • BusyBox cannot be compiled because the linker was not configured to use sysroots. One possible solution is to introduce additional build step in MLL where the binutils package is configured with explicit option to use sysroots and then we can use this new linker instead of the default one. This approach has already been analyzed and implemented by Jeff (refer to the mail thread from Feb 16-17).

Ncurses fails to install?

Hello, I have been working recently on a separate branch of minimal to add support of Nano, then to push it into the master branch for everyone to use, but I'm having trouble installing Ncurses and putting the libraries in the /lib folder required by Nano. Like it will fail at a mouse problem and won't generate the libraries, with the worst part being the file that's broken builds the libraries. Think you could take a look at it and see if I might've typed something wrong, because I checked the Internet and used Linux From Scratch as a source and nothing seemed to be wrong.
My Fork: https://github.com/AwlsomeAlex/minimal
(I know this has nothing to do with yours, but I wish to contribute to yours with Nano and eventually dialog being something I would like to implement.)

All source based overlay bundles are broken on Ubuntu 16.04

I have tested manually all overlay bundles with the latest changes on Ububtu 16.04. Unfortunately they all seem to be broken due to some GCC issues with the recently introduced -specs functionality. Going back to older kernel and glibc is not an option (the project moves ahead).

merge plans

Hey there

Are you interested in merging my work on memtester + powerpc build?
I've changed the scripts so it could build for powerpc and x86 / amd64 without breaking anything. Of course i'd have to merge your recent changes too. Also i've seperated creating iso and bootloader into seperate scripts with a switch in the main script so its cleaner.

Im more interested in contributing and being a part of MLL rather than creating my own fork. I'd be mainly improving things, add more overlays and support other exotic hardware if requested to.

greetings

USB wifi/bt

Hello,
Nice minimal Linux support and version...

Question : can we have few USB wifi dongle for Wireless network after configuring IP, dns, key ...
Same question with Bluetooth and BTLE ...

Keep going...
Jp

network not working outside qemu ?

Many thanks for MLL! Wonderful way of learning!
When booted from a USB device (the isohybrid version of resulting .iso), the network does work for me.
Apart from lo, ifconfig shows sit0 network device (IPv6-in-IPv4). (no eth0).
Tested on 32bit and 64bit version on different laptops.
(Tested with other linux distro, network works on these.)
Network works within qemu. ifconfig also shows lo and eth0 devices. eth0 has an ip address (given by dhcp, i suppose.)
Thanks in advance for any hints,

  • Jean-Marc (new in GitHub)

Building musl-busybox on linux 4.4.3

I'm trying to build busybox with musl with the headers from linux 4.4.3 but I'm getting a lot of error: redefinition stuff.

  CC      libbb/udp_io.o
  CC      networking/libiproute/iprule.o
  CC      networking/tcpudp.o
  CC      libbb/unicode.o
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/linux/in.h:28:3: error: expected identifier before numeric constant
   IPPROTO_IP = 0,  /* Dummy protocol for TCP  */
   ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:84:8: error: redefinition of ‘struct in_addr’
 struct in_addr {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:14:8: note: originally defined here
 struct in_addr { in_addr_t s_addr; };
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:166:8: error: redefinition of ‘struct ip_mreq’
 struct ip_mreq  {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:248:8: note: originally defined here
 struct ip_mreq
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:171:8: error: redefinition of ‘struct ip_mreqn’
 struct ip_mreqn {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:254:8: note: originally defined here
 struct ip_mreqn
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:177:8: error: redefinition of ‘struct ip_mreq_source’
 struct ip_mreq_source {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:261:8: note: originally defined here
 struct ip_mreq_source {
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:183:8: error: redefinition of ‘struct ip_msfilter’
 struct ip_msfilter {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:267:8: note: originally defined here
 struct ip_msfilter {
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:195:8: error: redefinition of ‘struct group_req’
 struct group_req {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:278:8: note: originally defined here
 struct group_req {
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:200:8: error: redefinition of ‘struct group_source_req’
 struct group_source_req {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:283:8: note: originally defined here
 struct group_source_req {
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:206:8: error: redefinition of ‘struct group_filter’
 struct group_filter {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:289:8: note: originally defined here
 struct group_filter {
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:220:8: error: redefinition of ‘struct in_pktinfo’
 struct in_pktinfo {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:300:8: note: originally defined here
 struct in_pktinfo
        ^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
                 from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:230:8: error: redefinition of ‘struct sockaddr_in’
 struct sockaddr_in {
        ^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
                 from include/libbb.h:20,
                 from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:16:8: note: originally defined here
 struct sockaddr_in
        ^
make[1]: *** [networking/tcpudp.o] Error 1
make: *** [networking] Error 2
make: *** Waiting for unfinished jobs....
scripts/Makefile.build:197: recipe for target 'networking/tcpudp.o' failed
Makefile:741: recipe for target 'networking' failed
  CC      libbb/update_passwd.o
  CC      networking/libiproute/iptunnel.o
  CC      networking/libiproute/libnetlink.o
  CC      libbb/utmp.o
networking/libiproute/libnetlink.c: In function ‘rtnl_dump_request’:
networking/libiproute/libnetlink.c:77:3: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   NULL, 0,
   ^
networking/libiproute/libnetlink.c:77:3: note: (near initialization for ‘msg.__pad1’)
networking/libiproute/libnetlink.c: In function ‘rtnl_dump_filter’:
networking/libiproute/libnetlink.c:111:4: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
    NULL, 0,
    ^
networking/libiproute/libnetlink.c:111:4: note: (near initialization for ‘msg.__pad1’)
networking/libiproute/libnetlink.c: In function ‘rtnl_talk’:
networking/libiproute/libnetlink.c:217:3: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   NULL, 0,
   ^
networking/libiproute/libnetlink.c:217:3: note: (near initialization for ‘msg.__pad1’)
  CC      libbb/uuencode.o
  CC      libbb/vdprintf.o
  CC      networking/libiproute/ll_addr.o
  CC      libbb/verror_msg.o
  CC      networking/libiproute/ll_map.o
  CC      networking/libiproute/ll_proto.o
  CC      libbb/vfork_daemon_rexec.o
  CC      networking/libiproute/ll_types.o
  CC      libbb/warn_ignoring_args.o
  CC      networking/libiproute/rt_names.o
  CC      networking/libiproute/rtm_map.o
  CC      libbb/wfopen.o
  CC      libbb/wfopen_input.o
  CC      libbb/write.o
  CC      networking/libiproute/utils.o
  CC      libbb/xatonum.o
  CC      libbb/xconnect.o
  AR      networking/libiproute/lib.a
  CC      libbb/xfunc_die.o
  CC      libbb/xfuncs.o
  CC      libbb/xfuncs_printf.o
  CC      libbb/xgetcwd.o
  CC      libbb/xgethostbyname.o
  CC      libbb/xreadlink.o
  CC      libbb/xrealloc_vector.o
  CC      libbb/xregcomp.o
  AR      libbb/lib.a

is there any way to fix this by not patching every linux header for every linux verion to not duplicate definitions?

The 'sysroot.specs' feature causes GCC failure for the 'nweb' bundle on Ubuntu

This is the official 'bug issue' for #67.

The command which causes the bug is this one:

ivan@ubuntu:~/minimal/src/minimal_overlay/bundles/nweb$ gcc -specs=/home/ivan/minimal/src/work/sysroot.specs -static-libgcc -Wl,-nostdlib -Os -s -fno-stack-protector -fomit-frame-pointer -U_FORTIFY_SOURCE -Wl,-nostdlib /home/ivan/minimal/src/minimal_overlay/bundles/nweb/nweb23.c -o nweb
/usr/bin/ld: cannot find /lib/libc.so.6
/usr/bin/ld: cannot find /lib/libc_nonshared.a
/usr/bin/ld: cannot find /lib/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status

The contents of the sysroot.specs file is the following:

*link_libgcc:
-L/home/ivan/minimal/src/work/sysroot/lib -L/home/ivan/minimal/src/work/sysroot/lib64 -L/home/ivan/minimal/src/work/sysroot/usr/lib -L/home/ivan/minimal/src/work/sysroot/usr/lib64 -L/home/ivan/minimal/src/work/sysroot/usr/local/lib -L/home/ivan/minimal/src/work/sysroot/usr/local/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/5

GCC is 5.4.0 on Ubuntu 16.04.
MLL kernel is 4.12.4, glibc is 2.26 and BusyBox is 1.27.1 (BTW it doesn't matter).

I'm not yet familiar with the sysroot.specs functionality (yep, my bad) and I'll be glad if anyone could assist me and figure out what the problem is and how I can fix it permanently.

DNS queries are not working in busybox

DNS queries are not working in busybox.

Description of the problem:

  1. /etc/resolv.conf is populated with name servers
  2. Route to name server is set (checked with ping)
  3. nslookup/ping fails for any domain (but the name server address is correct in nslookup)

Possible cause:
Statically-linked glibc programs (like busybox in this case) can't use getaddrinfo / gethostbyname functions without providing a libnss library (which is dynamically loaded).

GLIBC Fails to Build on x86

Hello, I know I've bothered you enough but this time I found something interesting. Whenever Minimal Linux Live tries to build GLIBC on an x86 host, it always fails in the build stage, giving the error
Makefile:recipe for target 'io/subdir_lib' failed.
However further up the log I can find GLIBC throwing out errors when it's trying to compile ../sysdeps/unix/sysv/linux/posix_fallocate.c giving the error
error: bp cannot be used in asm here
}
^
I also installed all of the required dependencies for GLIBC due to me originally thinking that was the problem, but less dependencies are on my x86_64 machine and it builds fine. I also checked the kernel, everything seems to compile (headers). But I'm honestly not sure what's happening. I've provided a build log to help you out so this is less of a guessing game: (Visible problem from Lines 84,141 - 84,165).
Minimal Linux Live Build Log
Thanks.

BusyBox build failed on Ubuntu 16.04 64-bit default installation

BusyBox build failed on Ubuntu 16.04 64-bit default installation. The build failed on two Ubuntu 16.04 systems. Ubuntu 14 was not affected by this issue.

The error is below

In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34,
                 from include/platform.h:141,
                 from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from include/libbb.h:13:0,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/platform.h:152:23: fatal error: byteswap.h: No such file or directory
compilation terminated.
scripts/Makefile.build:197: recipe for target 'applets/applets.o' failed
make[1]: *** [applets/applets.o] Error 1
Makefile:372: recipe for target 'applets_dir' failed
make: *** [applets_dir] Error 2
Generating BusyBox based initramfs area...
  CC      applets/applets.o
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34,
                 from include/platform.h:141,
                 from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from include/libbb.h:13:0,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/platform.h:152:23: fatal error: byteswap.h: No such file or directory

How to disable or run on background all slow IO boot operations?

I'm talking about two types of things:

  • press space or wait some seconds actions. We could either have an option of config file to:
    • choose an option and ask nothing
    • disable them and take a fixed default if the above is not technically possible
  • network discovery startup: possible run on background? Buildroot 2016.05 qemu_x86_64_defconfig does it.

Those would speed up the boot process and make it more automatic.

BTW, those features are awesome... I just wish boot was faster :-)

ISO to USB

Hello, I'm trying to extract the contents of the .iso image onto a USB so I can install it onto other computers, however most programs format the USB in vFat, which I want to avoid due to OverlayFS not supporting it. Is there a way to 'flash' Minimal Linux Live onto a ext4 USB? I've tried dd, it never works. Also if not, if I were to compile the OverlayFS under 'sparse' instead of 'folder' and lets say I made 20 MB worth of changes BUT the Sparse Image is only 10 MB, would it automatically increase, or would it remain 10 MB and delete the other 10 MB?

Provide overlay bundle for kernel modules and firmware

Right now MLL provides just minimal kernel with default functionality. It will be good to "upgrade" this by adding kernel modules and firmware. Building and packing the default modules and firmware has been implemented in the mincs branch and this functionality can be implemented as overlay bundle.

The bundle should also provide autorun script which handles properly the mdev setup.

Run existing kernel source code

Instead of downloading the kernel under work, I want to reuse an existing kernel source to help testing a hacked kernel for development.

I have implemented that at: https://github.com/************/runlinux based on this repo. Feel free to link from the README to it if deemed worthy :-)

Also if you find it interesting, I can patch this repo to do that as well: we could add a --src flag that points to the desired source to use.

Bundles ignore sysroot

Multiple packages (partially) ignore the glibc sysroot and compile using the host systems libraries and includes.
One example would be the links package.

nweb example on the linker problem:

gcc --verbose $CFLAGS --sysroot=$MAIN_SRC_DIR/work/glibc/glibc_prepared $SRC_DIR/nweb23.c -o nweb

to

gcc --verbose -Wl,--verbose -Wl,--sysroot=$MAIN_SRC_DIR/work/glibc/glibc_prepared -L =/lib -L =/lib64 $CFLAGS --sysroot $MAIN_SRC_DIR/work/glibc/glibc_prepared $SRC_DIR/nweb23.c -o nweb

The second tells the linker the sysroot too and where to search for libraries (-L =/lib -L =/lib64 is very important)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.