The meaning of initrd is initialized RAM disk. RAM disk simulates a disk with a portion of memory, allowing the operating system to access it.
The initrd.img file is a RAM disk image file. RAM disk is a standard kernel file-aware device (/DEV/RAM0) file system that is also known to the standard kernel file system. The usual step is to start the kernel first, then the kernel mounts the initrd.img, and executes the inside of the script to further mount a variety of modules and services, after some configuration and operation, you can go to the physical disk to load the real root partition, and then configure, and finally started successfully.
View the initrd.img image file for the Linux kernel
1. Create a display directory and copy files
# Mkdir/tmp/test
# Cp/boot/initramfs-3.10.0-229.el7.x86_64.img/tmp/test
# Cd/tmp/test
2. Rename the image file and unzip it
# file Initramfs-3.10.0-229.el7.x86_64.img
# mv Initramfs-3.10.0-229.el7.x86_64.img initramfs-3.10.0-229.el7.x86_64.img.gz # #显示为gzip文件
# file Initramfs-3.10.0-229.el7.x86_64.img.gz
# gzip-d Initramfs-3.10.0-229.el7.x86_64.img.gz
# file Initramfs-3.10.0-229.el7.x86_64.img # #显示cpio归档文件
3. Restore the image file and view the recovered file
# Cpio-i < initramfs-3.10.0-229.el7.x86_64.img # #恢复映像文件
# ls # #显示映像文件恢复后的内容
# Ls-r
How to view the initrd.img image file for the Linux kernel