I am running a Ubuntu 20.04 VM in X86_64 host. The VM was installed Ubuntu 20.04 with a kernel of 5.4.0-113, whose initrd is about 81MB in /boot/. Then I downloaded the source code of kernel 5.4.174, compiled the kernel and installed it.
I copied the config-5.4.0-113 as .config to kernel-5.4.174, then run make -j4 && make module -j4 && INSTALL_MOD_STRIP=1 make modules_install -j4 && make install -j4
Then I hit an issue during the running of update-initramfs, as follows,
update-initramfs: Generating /boot/initrd.img-5.4.174
Error 24 : Write error : cannot write compressed block
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.4.174 with 1.
I searched that error in google, but NO found proper solution. Then, I checked the files in /boot/, to my surprise, the initrd.img-5.4.174 is much bigger than the initrd.img-5.4.0-113.generic, as follows,
ubt2004:~/test/user$ ls -l /boot/initrd.img*
-rw-r--r-- 1 root root 84405648 Jun 13 03:15 /boot/initrd.img-5.4.0-113-generic
-rw-r--r-- 1 root root 962872584 Jun 8 06:12 /boot/initrd.img-5.4.174
I am not sure if this is normal, or it is from the error of update-initramfs. If this is a problem, how could I fix it?