How to view the initrd.img image file for the Linux kernel

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.