mirror of
https://git.adityakumar.xyz/blog.git
synced 2024-11-09 10:59:45 +00:00
1.9 KiB
1.9 KiB
title | date | lastmod | draft | keywords | description | tags | categories | author | comment | toc | autoCollapseToc | postMetaInFooter | hiddenFromHomePage | contentCopyright | reward | mathjax | mathjaxEnableSingleDollar | mathjaxEnableAutoNumber | hideHeaderAndFooter | flowchartDiagrams | sequenceDiagrams | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reduce Size of Initramfs | 2023-04-29T12:15:25+05:30 | 2023-04-29T12:15:25+05:30 | false |
|
|
|
false | false | false | true | false | false | false | false | false | false | false |
|
|
When I was developing a Linux distribution, I had trouble getting it boot on my machine.
I thought I was building the kernel wrong and was generating initramfs wrong. So I took Debian's initrd from my machine and used it to boot. It took some time but it booted. So certainly I was generating initramfs wrong.
After digging around on the Internet, I found the problem lies in the large size of the initramfs. My version was several hundred megabytes. For whatever reason, the large size renders it unable to serve its purpose. The kernel modules are not stripped. Stripping the image solves the issue.
cd /path/to/new-kernel
find . -name *.ko -exec strip --strip-unneeded {} +
Reference: How to reduce the size of the initrd when compiling your kernel?