Modify the initrd.gz File

Source: Internet
Author: User
Modify the initrd.gz file-general Linux technology-Linux programming and kernel information. For more information, see. 2.6 After the initrd.gz kernel is decompressed, it is mostly a cpio file.

Use the cpio command to get the file:

Cp */initrd.gz.
Gunzip initrd.gz
Mkdir tmp
Cd tmp
Cpio-iF ../initrd.gz

After modification, make it a cpio package.

Online usage

Find. | cpio-c-o | gzip-9> ../initrd.gz

Failed to start after multiple attempts. View/usr/sbin/mkinitramfs

I learned that this should be done

Find. | cpio-L-o-H newc | gzip-9> ../initrd.gz

-L unassociate a symbolic connection

-H newc adopts the new (SVR4) cross-platform format. It supports file systems with more than 65536 I nodes and cannot be started because the default format is old-fashioned "bin"

After the test, the file can be started successfully, which makes it easier to modify the initrd.gz file than to modify the image of mkinitramfs.

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.