0

I'm trying to build Linux kernel from scratch. My current system with an Intel Xeon Gold 6242 CPU, running Linux 5.4.0-050400-generic kernel on Ubuntu 20.04.3 LTS.
The steps I have followed to build the kernel are as follows:

  1. cd /path/to/new/kernel/source (the source hasn't been modified after download)
  2. cp -v /boot/config-5.4.0-050400-generic ./.config
  3. make menuconfig, load and save the copied .config file (the .config contents don't really change but the order of lines do change)
  4. make -j32
  5. make modules_install install
    Everything runs fine with no errors until I eventually do reboot and when I choose the new kernel to boot with, it fails with the following message: enter image description here

Here are some other options I have tried to get it to work:

  1. Build Linux 5.18.0 from source (because Ubuntu 20.04.3 LTS uses Linux 5.4 as its main kernel so I thought maybe versions from the past might not work): fails with the same error message
  2. Instead of copying the .config file that is already in use, just make a new .config file with make menuconfig and not loading/saving from an existing .config file: fails with the same error message
  3. Instead of building kernels from source, try to install a new kernel directly from the Ubuntu mainline kernels: works fine (Linux 5.15.0)

I have checked out some similar questions like Compiling the Linux kernel and booting with UEFI, not syncing: VFS: Unable to mount root fs on unknown-block(0,0), and Unable to boot using self built kernel but haven't had any luck.
One last thing: this is a duplicate question from Reddit I posted a few days ago, but am reposting here because unfortunately I haven't received much help there.

Any suggestions will be greatly appreciated. Thanks!

1 Answers1

0

I ran into this same exact issue on the R640. The fix I made was to do a make -j "$(nproc)" bindeb-pkg after running make, and then installing the .deb packages via dpkg rather than running make modules_install install

Who knows what the actual root cause of the issue is.