The initrd.img in the 2.6 kernel is cpio compressed and is no longer a ext2 format used by the 2.4 kernel and cannot be mounted using the Mount-o loop. Need to decompress with gunzip and then use Cpio to unpack
Cp/boot/initrd-***.img initrd.img.gz
Gunzip initrd.img.gz
mkdir INITRD
MV Initrd.img INITRD
CD INITRD
Cpio-ivmd.. /initrd.new.img
Gzip.. /initrd.new.img
Then rename it to the/boot directory, restart can be observed after the modified effect. Unable to boot successfully after reboot. This is because the generated initrd.img is not correct. Resolved as follows:
Generate INITRD
Find. | Cpio-o-H NEWC | gzip >/mnt/sda1/boot/initrd.img-2.6.18-4-686
(Note:-H NEWC is required, otherwise the kernel will be considered ramdisk, not Initramfs)
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