enter image description here

I updated my grub in my Ubuntu 20.04 after building my new kernel which is version 5.8.18. After this process, I checked my /boot directory the following were present,

  1. vmlinuz-5.8.18

  2. initrd.img-5.8.18

  3. System.map-5.8.18 and

  4. config-5.8.18.

In /var/lib/initramfs-tools/ my 5.8.18 file is present. So I don't know where I am doing wrong.

But once I boot into this kernel. I get "Loading Initial RamDisk ..." and my boot freezes. Anybody can help me out please… I have been held up here for more than a week. I tried building around 5 kernels. Every time I build it, boot freezes and the same issue pertains.

Do the linux-headers-version play a vital role in loading the temporary root file system into the initial ramdisk during the boot process. Because my current working kernel which is "5.4.0-53-generic" has a "linux-headers-5.4.0-53-generic directory" in the /usr/src location.

I used the following commands to build my kernel,

  1. mkdir kernel

  2. cd kernel

  3. git clone -b linux-5.8.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

  4. cd linux-stable/

  5. make mrproper

  6. cp /boot/config-uname -r .config

  7. yes '' | make oldconfig

  8. make menuconfig

  9. make -j 4

  10. make modules_install

  11. make install

  12. cd /boot; mkinitramfs -k 5.8.18 -o initrd.img-5.8.18

  13. sudo update-grub

My mail id is [email protected] Thanks in advance :).

I am using Mi Notebook 14 from Xaomi which is a Intel Core i5 system.

  • Is this a desktop system and why exactly are you trying to build a new kernel?
    – KGIII
    Commented Nov 16, 2020 at 16:56
  • 1
    Hello @KGIII! Yeah this is a Desktop system. I am building a new kernel to get the recent stable version and as well reduce its size since it has unnecessary drivers and other stuff. P.S. I am rookie in the Linux Kernel Development, sir. I am just doing this to understand how things work while building a new kernel. Commented Nov 17, 2020 at 4:47
  • Alright. I asked because I'd wondered if this might suit your needs, but it does not.
    – KGIII
    Commented Nov 17, 2020 at 4:54
  • 1
    You sent me an e-mail asking me to look at this: I have never been able to compile the Ubuntu versions of the kernel, I only compile and do custom/development stuff on the mainline (upstream) kernel. My method is here. Commented Nov 17, 2020 at 16:25
  • Thanks a ton for checking my email and helping me out, sir! Commented Nov 18, 2020 at 4:58

1 Answer 1


Please confirm your initrd.img file size. The solution is here.

$ sudo make modules_install INSTALL_MOD_STRIP=1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .