Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

osboot/make-initrd

Open more actions menu

Repository files navigation

make-initrd

make-initrd logo

make-initrd is a uevent-driven initramfs infrastructure based on udev. It is used to build initramfs images and provide the runtime pieces that run inside those images during early boot.

The project is feature-based: you describe the target image via a set of features, and the build system resolves ordering and dependencies.

Quick Start

Build and install:

./autogen.sh
./configure
make
sudo make install

Generate a config from the current system (optional but recommended on first run):

sudo make-initrd guess-config | sudo tee /etc/initrd.mk

Build initramfs for the running kernel:

sudo make-initrd -v

Dependencies

Host-side dependencies (build and image generation)

These are used on the host when building make-initrd and when generating images:

  • GNU make
  • bash
  • coreutils
  • pkg-config
  • C toolchain (cc, headers, standard build tools)
  • flex and bison (lex and yacc)
  • libkmod/kmod (required)
  • udevd and udevadm (required)
  • Compression libraries for image tools: zlib, bzip2, xz (liblzma), zstd
  • libelf (optional, improves ELF dependency detection)
  • json-c (optional, supports parsing ELF DLOPEN metadata)
  • scdoc (optional, for generating man pages)

Runtime dependencies (inside initramfs image)

These are not generic host build dependencies. They are needed in the generated initramfs runtime:

  • busybox for core userspace tools in initramfs
  • libshell scripts/utilities used by initramfs logic

make-initrd can use bundled copies from git submodules or external/system copies, depending on configure options and host setup.

If you plan to use bundled dependencies, initialize submodules:

git submodule update --init --recursive

Build Options

Default build:

./autogen.sh
./configure
make

Install to the host system:

sudo make install

Install into a staging directory (for packaging):

make install DESTDIR=/path/to/stage

Developer/in-tree mode:

./configure --enable-local-build
make

Common Commands

  • Build images for configured targets:
make-initrd
  • Show guessed config:
make-initrd guess-config
  • Show modules needed for a device or mountpoint:
make-initrd guess-modules /dev/sda1
  • Collect diagnostic archive:
make-initrd bug-report

Documentation

Support

make-initrd aims to be portable, but is validated on a limited set of systems.

  • Operating systems: ALTLinux, Fedora, Gentoo, Ubuntu
  • C libraries: GNU libc, musl libc

License

make-initrd is licensed under the GNU General Public License (GPL), version 3.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.