Jump to content

Initramfs: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 12: Line 12:


The initramfs is one solution to the "[[chicken or the egg]]" problem of some mass storage devices and some file systems{{mdashb}}especially [[cryptographic file systems]]{{mdashb}}requiring complex device drivers to read data from them, when device drivers are normally stored inside the file system in the mass storage device.<ref name="kernel-docs" />
The initramfs is one solution to the "[[chicken or the egg]]" problem of some mass storage devices and some file systems{{mdashb}}especially [[cryptographic file systems]]{{mdashb}}requiring complex device drivers to read data from them, when device drivers are normally stored inside the file system in the mass storage device.<ref name="kernel-docs" />
for newbies who encounter the blankscreen with {initramfs} instead of GUI/command prompt/shell ,in ubuntu or alike distros,the workaround may be
For newbies who encounter the blankscreen with {initramfs} instead of GUI/command prompt/shell ,in ubuntu or alike distros,the workaround may be
'fsck /dev/sdaX' where X is the drive number.
'fsck /dev/sdaX' where X is the drive number.



Revision as of 06:23, 26 January 2017

initramfs, abbreviated from "initial RAM file system", is the successor of initrd ("initial ramdisk"). It is a cpio ("copy in and out") archive of the initial file system that gets loaded into memory during the Linux startup process. Linux copies the contents of the archive into the built-in rootfs file-system-like infrastructure (which is either based on ramfs, or the more regulated tmpfs), and then attempts to run the resulting /init program, before falling back on older methods of initialization; the init program is meant to complete certain tasks before the "real" or final root file system is mounted over rootfs. Thus, initramfs needs to contain all of the device drivers and tools needed to mount the final root file system.[1]

For some applications, initramfs can use the casper utility to create a writable environment using unionfs to overlay a persistence layer over a read-only root filesystem image. For example, overlay data can be stored on a USB flash drive, while a compressed SquashFS read-only image stored on a live CD acts as a root filesystem.[2][3]

The initramfs is one solution to the "chicken or the egg" problem of some mass storage devices and some file systems‍—‌especially cryptographic file systems‍—‌requiring complex device drivers to read data from them, when device drivers are normally stored inside the file system in the mass storage device.[1] For newbies who encounter the blankscreen with {initramfs} instead of GUI/command prompt/shell ,in ubuntu or alike distros,the workaround may be 'fsck /dev/sdaX' where X is the drive number.

See also

References

  1. ^ a b "Linux kernel documentation: Documentation/filesystems/ramfs-rootfs-initramfs.txt". kernel.org. 2013-09-17. Retrieved 2014-03-13.
  2. ^ "Ubuntu Manpage: casper - a hook for initramfs-tools to boot live systems". manpages.ubuntu.com.
  3. ^ Shawn Powers. "Casper, the Friendly (and Persistent) Ghost". Linux Journal. 2012.