Initramfs

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{FormatInfo |formattype=electronic |subcat=Archiving |extensions={{ext|img}} }} '''Initial RAM File System''' or initramfs is a cpio archive, typically compressed, and c...")
 
(FormatInfo template: Specify the name, under Unix-like environments, filenames are CaSe SeNsItIvE. Add compression type, and link to vmlinuz page for the first mentioning of kernel in Discussion section.)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
{{FormatInfo
 
{{FormatInfo
 +
|name=initramfs
 
|formattype=electronic
 
|formattype=electronic
 
|subcat=Archiving
 
|subcat=Archiving
 
|extensions={{ext|img}}
 
|extensions={{ext|img}}
 +
|compression=lossless
 
}}
 
}}
  
Line 8: Line 10:
  
 
== Discussion ==
 
== Discussion ==
Hardware drivers are often included in Linux kernel, and can be either built into the kernel, or using the likes of initramfs to enable early loading at compile time. In many modern Linux distros, these drivers, along with other necessary components such as their [[firmware]], are included as a separate file, and initramfs being an option. Without initramfs on a system that is configured to use such mechanisms, may cause kernel panic at worst. A kernel panic is the (rough) equivalent of [[Microsoft Windows]] Blue Screen of Death (or BSoD), where booting is halted upon a fatal error, and that the process cannot be continued.
+
Hardware drivers are often included in Linux kernel, and can be either built into the [[vmlinuz|kernel]], or using the likes of initramfs to enable early loading at compile time. In many modern Linux distros, these drivers, along with other necessary components such as their [[firmware]], are included as a separate file, and initramfs being an option. Without initramfs on a system that is configured to use such mechanisms, may cause kernel panic at worst. A kernel panic is the (rough) equivalent of [[Microsoft Windows]] Blue Screen of Death (or BSoD), where booting is halted upon a fatal error, and that the process cannot be continued.
  
 
Strictly speaking, initramfs may not be required if all the necessary files are compiled into the kernel, at the expense of having larger <code>vmlinuz-linux</code> in traditional context. In modern context, it is possible to replace kernel and initramfs solution with Unified Kernel Image (UKI).<ref>[https://www.redhat.com/en/blog/extending-red-hat-unified-kernel-images-using-addons Extending Red Hat Unified Kernel Images By Using Addons - Red Hat]</ref><ref>[https://wiki.gentoo.org/wiki/Unified_kernel_image Unified kernel image - Gentoo Wiki]</ref><ref>[https://wiki.archlinux.org/title/Unified_kernel_image Unified kernel image - ArchWiki - Arch Linux]</ref>
 
Strictly speaking, initramfs may not be required if all the necessary files are compiled into the kernel, at the expense of having larger <code>vmlinuz-linux</code> in traditional context. In modern context, it is possible to replace kernel and initramfs solution with Unified Kernel Image (UKI).<ref>[https://www.redhat.com/en/blog/extending-red-hat-unified-kernel-images-using-addons Extending Red Hat Unified Kernel Images By Using Addons - Red Hat]</ref><ref>[https://wiki.gentoo.org/wiki/Unified_kernel_image Unified kernel image - Gentoo Wiki]</ref><ref>[https://wiki.archlinux.org/title/Unified_kernel_image Unified kernel image - ArchWiki - Arch Linux]</ref>
Line 22: Line 24:
 
** [https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio mkinitramfs]
 
** [https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio mkinitramfs]
 
** [https://github.com/anatol/booster booster]
 
** [https://github.com/anatol/booster booster]
 +
* Opening initramfs:
 +
* [https://dracut-ng.github.io/ dracut] → lsinitrd
 
* ''See [[cpio]] page on viewing the generated initramfs contents.''
 
* ''See [[cpio]] page on viewing the generated initramfs contents.''
  
 
== Links ==
 
== Links ==
 
* [[wikipedia:initramfs]]
 
* [[wikipedia:initramfs]]
 +
* [https://trendoceans.com/how-to-unpack-initrd-initramfs-to-view-content-in-linux/ How to Extract initrd/initramfs to View Content in Linux - Trend Oceans]
  
 
== References ==
 
== References ==
 
<references/>
 
<references/>

Latest revision as of 11:27, 15 August 2025

File Format
Name initramfs
Ontology
Extension(s) .img
Compression lossless

Initial RAM File System or initramfs is a cpio archive, typically compressed, and contains files needed to boot a Linux installation. initramfs has been introduced in Linux kernel since 2.6, and continues to be used in installations that makes use of it.

Contents

[edit] Discussion

Hardware drivers are often included in Linux kernel, and can be either built into the kernel, or using the likes of initramfs to enable early loading at compile time. In many modern Linux distros, these drivers, along with other necessary components such as their firmware, are included as a separate file, and initramfs being an option. Without initramfs on a system that is configured to use such mechanisms, may cause kernel panic at worst. A kernel panic is the (rough) equivalent of Microsoft Windows Blue Screen of Death (or BSoD), where booting is halted upon a fatal error, and that the process cannot be continued.

Strictly speaking, initramfs may not be required if all the necessary files are compiled into the kernel, at the expense of having larger vmlinuz-linux in traditional context. In modern context, it is possible to replace kernel and initramfs solution with Unified Kernel Image (UKI).[1][2][3]

initramfs are also generally compressed cpio archive, typically using the likes of stream compression, such as gzip, bzip2, xz, or zstd

[edit] Identification

Initramfs files are usually stored in `/boot` and has extension .img, e.g. /boot/initramfs-linux.img.

[edit] Software

[edit] Links

[edit] References

  1. Extending Red Hat Unified Kernel Images By Using Addons - Red Hat
  2. Unified kernel image - Gentoo Wiki
  3. Unified kernel image - ArchWiki - Arch Linux
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox