{"id":768,"date":"2025-04-24T20:10:43","date_gmt":"2025-04-25T01:10:43","guid":{"rendered":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=768"},"modified":"2025-04-24T20:10:43","modified_gmt":"2025-04-25T01:10:43","slug":"when-dnf-update-kernel-failed-to-generate-initramfs","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=768","title":{"rendered":"When dnf update kernel failed to generate initramfs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This sometimes happen when the automatic nvidia kernel module installation fails.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The workaround is:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Boot into an older kernel;<\/li>\n\n\n\n<li>ls \/boot\/ and find the kernel name of the vmlinuz without corresponding initramfs.  For example, it could be vmlinuz-6.14.3-300.fc42.x86_64.  Your kernel version will be 6.14.3-300.fc42.x86_64, in the form of major.mid,minor-nnn.osver.arch.  Let&#8217;s call it $KVER<\/li>\n\n\n\n<li>Check the existence of \/lib\/modules\/$KVER\/ by ls it.  If exists, do &#8220;depmod -v $KVER&#8221;.  This will create modules.dep in the folder \/lib\/modules\/$KVER\/.<\/li>\n\n\n\n<li>Do dracut &#8211;force &#8211;kver $KVER.  If not working, use a lower version of gcc like &#8220;CC=gcc-14 dracut &#8211;force &#8211;kver $KVER&#8221;.<\/li>\n\n\n\n<li>Reboot into the newest kernel.  Usually this will not contail nvidia driver kernel module.<\/li>\n\n\n\n<li>Run the nvidia driver installation downloaded from NVidia driver site, like NVIDIA-Linux-x86_64-570.144.run.  This will install the NVidia driver kernel module into the kernel.  If not working, use a lower version of gcc, like &#8220;CC=gcc-14 .\/NVIDIA-Linux-x86_64-570.144.run&#8221;<\/li>\n\n\n\n<li>Now you have a good kernel with proper graphic driver kernel module.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This sometimes happen when the automatic nvidia kernel module installation fails. The workaround is:<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-768","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=768"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/768\/revisions"}],"predecessor-version":[{"id":769,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/768\/revisions\/769"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}