All Projects β†’ limine-bootloader β†’ Limine

limine-bootloader / Limine

Licence: bsd-2-clause
x86/x86_64 BIOS Bootloader

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Limine

mbr-boot-manager
πŸ’Ύ Master Boot Record with a boot menu written in Assembly
Stars: ✭ 57 (-80.21%)
Mutual labels:  x86, bootloader, bios
Bootmine
Bootable minesweeper game in a 512-byte boot sector
Stars: ✭ 136 (-52.78%)
Mutual labels:  x86, bootloader, bios
Toaruos
A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
Stars: ✭ 4,687 (+1527.43%)
Mutual labels:  x86, bootloader, x86-64
BootProg
FAT12/16/32 Bootsector for .COMs/.EXEs
Stars: ✭ 74 (-74.31%)
Mutual labels:  x86, bootloader, bios
OpenWRT-x86 64-Install
Create and deploy a LEGACY or EFI OpenWRT bootable image for x86_64 processors
Stars: ✭ 15 (-94.79%)
Mutual labels:  x86-64, x86
PBD
πŸ–¨οΈπŸž Printf Based Debugger, a user-friendly C debugger
Stars: ✭ 52 (-81.94%)
Mutual labels:  x86-64, x86
ria-jit
Lightweight and performant dynamic binary translation for RISC–V code on x86–64
Stars: ✭ 38 (-86.81%)
Mutual labels:  x86-64, x86
binary-decompilation
Extracting high level semantic information from binary code
Stars: ✭ 55 (-80.9%)
Mutual labels:  x86-64, x86
pinktrace
Pink's Tracing Library
Stars: ✭ 20 (-93.06%)
Mutual labels:  x86-64, x86
stoomboot
An x86 real mode multiboot-ish ELF bootloader
Stars: ✭ 19 (-93.4%)
Mutual labels:  x86, bootloader
Plasma
Plasma is an interactive disassembler for x86/ARM/MIPS. It can generates indented pseudo-code with colored syntax.
Stars: ✭ 2,956 (+926.39%)
Mutual labels:  x86, x86-64
Reloaded.Assembler
Minimal .NET wrapper around the simple, easy to use Flat Assembler written by Tomasz Grysztar. Supports both x64 and x86 development.
Stars: ✭ 17 (-94.1%)
Mutual labels:  x86-64, x86
x86e
A simple x86 emulator, debugger, and editor in JavaScript.
Stars: ✭ 89 (-69.1%)
Mutual labels:  x86-64, x86
x86-Assembly-Reverse-Engineering
πŸ›  Knowledge about the topic of x86 assembly & disassembly πŸ› 
Stars: ✭ 27 (-90.62%)
Mutual labels:  x86-64, x86
RenHook
An open-source x86 / x86-64 hooking library for Windows.
Stars: ✭ 80 (-72.22%)
Mutual labels:  x86-64, x86
TravorOS
A simple OS running on Intel x86 architecture | No longer updating
Stars: ✭ 24 (-91.67%)
Mutual labels:  x86, bootloader
FEX
A fast usermode x86 and x86-64 emulator for Arm64
Stars: ✭ 650 (+125.69%)
Mutual labels:  x86-64, x86
SixtyFourBits
x64 Assembly Demo Framework
Stars: ✭ 21 (-92.71%)
Mutual labels:  x86-64, x86
Radical-OS
Radical kernel source tree
Stars: ✭ 45 (-84.37%)
Mutual labels:  x86, bios
alpine-php-fpm
Lightweight and optimised PHP-FPM (PHP 7.4, 8.0, 8.1) Docker images with essential extensions on top of latest Alpine Linux.
Stars: ✭ 53 (-81.6%)
Mutual labels:  x86-64, x86

Limine

What is Limine?

Limine is an advanced x86/x86_64 BIOS/UEFI Bootloader which supports modern PC features such as Long Mode, 5-level paging, and SMP (multicore), to name a few.

Limine's boot menu

Reference screenshot

Photo by Nishant Aneja from Pexels

Supported boot protocols

  • Linux
  • stivale and stivale2 (Limine's native boot protocols, see STIVALE{,2}.md for details)
  • Chainloading

Supported filesystems

  • ext2/3/4
  • echfs
  • FAT16/32
  • ISO9660 (CDs/DVDs)

Supported partitioning schemes

  • MBR
  • GPT
  • Unpartitioned media

Warning about using trunk

Please refrain from using the trunk branch of this repository directly, unless you have a very good reason to. The trunk branch is unstable, and non-backwards compatible changes are made to it routinely.

Use instead a release, or a release branch (like v1.0-branch).

Following a release offers a fixed point, immutable snapshot of Limine, while following a release branch tracks the latest changes made to that major release's branch which do not break compatibility (but could break in other, non-obvious ways).

One can clone a release directly using

git clone https://github.com/limine-bootloader/limine.git --branch=v1.0

(replace v1.0 with the chosen release)

or a release branch with

git clone https://github.com/limine-bootloader/limine.git --branch=v1.0-branch

(replace v1.0-branch with the chosen release branch)

Also note that the documentation contained in trunk does not reflect the documentation for the specific releases, and one should refer to the releases' respective documentation instead, contained in their files.

Building

Building the bootloader

It is necessary to first build the set of tools that the bootloader needs in order to be built.

This can be accomplished by running:

make toolchain

The above step may take a while

After that is done, the bootloader itself can be built with:

make

The generated bootloader files are going to be in bin.

Installing Limine binaries

This step is optional as the bootloader binaries can be used from the bin directory just fine. This step will only install them in a share and bin directories in the specified PREFIX (default is /usr/local).

Use make install to install Limine binaries, optionally specifying a prefix with a PREFIX=... option.

How to use

UEFI

The BOOTX64.EFI file is a vaild EFI application that can be simply copied to the /EFI/BOOT directory of a FAT32 formatted EFI system partition. This file can be installed there and coexist with a BIOS installation of Limine (see below) so that the disk will be bootable by both BIOS and UEFI.

The boot device must to contain the limine.cfg file in either the root or the boot directory of one of the partitions, formatted with a supported file system (the ESP partition is recommended).

BIOS/MBR

In order to install Limine on a MBR device (which can just be a raw image file), run limine-install as such:

limine-install <path to device/image>

The boot device must to contain the limine.sys and limine.cfg files in either the root or the boot directory of one of the partitions, formatted with a supported file system.

BIOS/GPT

If using a GPT formatted device, there are 2 options one can follow for installation:

  • Specifying a dedicated stage 2 partition.
  • Letting limine-install attempt to embed stage 2 within GPT structures.

In case one wants to specify a stage 2 partition, create a partition on the GPT device of at least 32KiB in size, and pass the 1-based number of the partition to limine-install as a second argument; such as:

limine-install <path to device/image> <1-based stage 2 partition number>

In case one wants to let limine-install embed stage 2 within GPT's structures, simply omit the partition number, and invoke limine-install the same as one would do for an MBR partitioned device.

The boot device must to contain the limine.sys and limine.cfg files in either the root or the boot directory of one of the partitions, formatted with a supported file system.

BIOS CD-ROM ISO creation

In order to create a bootable ISO with Limine, place the limine-cd.bin, limine.sys, and limine.cfg files into a directory which will serve as the root of the created ISO. (limine.sys and limine.cfg must either be in the root or inside a boot subdirectory; limine-cd.bin can reside anywhere).

Place any other file you want to be on the final ISO in said directory, then run:

genisoimage -no-emul-boot -b <relative path of limine-cd.bin> \
            -boot-load-size 4 -boot-info-table -o myiso.iso <root directory>

Note: genisoimage is usually part of the cdrtools package.

<relative path of limine-cd.bin> is the relative path of limine-cd.bin inside the root directory. For example, if it was copied in <root directory>/boot/limine-cd.bin, it would be boot/limine-cd.bin.

BIOS/PXE boot

The limine-pxe.bin binary is a valid PXE boot image. In order to boot Limine from PXE it is necessary to setup a DHCP server with support for PXE booting. This can either be accomplished using a single DHCP server or your existing DHCP server and a proxy DHCP server such as dnsmasq.

limine.cfg and limine.sys are expected to be on the server used for boot.

Configuration

The limine.cfg file contains Limine's configuration.

An example limine.cfg file can be found in test/limine.cfg.

More info on the format of limine.cfg can be found in CONFIG.md.

Example

For example, to create an empty image file of 64MiB in size, 1 echfs partition on the image spanning the whole device, format it, copy the relevant files over, and install Limine, one can do:

dd if=/dev/zero bs=1M count=0 seek=64 of=test.img
parted -s test.img mklabel msdos
parted -s test.img mkpart primary 1 100%
parted -s test.img set 1 boot on # Workaround for buggy BIOSes

echfs-utils -m -p0 test.img quick-format 32768
echfs-utils -m -p0 test.img import path/to/limine.sys limine.sys
echfs-utils -m -p0 test.img import path/to/limine.cfg limine.cfg
echfs-utils -m -p0 test.img import path/to/kernel.elf kernel.elf
echfs-utils -m -p0 test.img import <path to file> <path in image>
...
limine-install test.img

One can get echfs-utils by installing https://github.com/echfs/echfs.

Acknowledgments

Limine uses a stripped-down version of tinf.

Discord server

We have a Discord server if you need support, info, or you just want to hang out with us.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].