{"id":1229,"date":"2019-12-12T18:29:06","date_gmt":"2019-12-12T23:29:06","guid":{"rendered":"https:\/\/sudomakeinstall.com\/?p=1229"},"modified":"2019-12-12T18:32:07","modified_gmt":"2019-12-12T23:32:07","slug":"how-to-repackage-your-initrd-for-a-newer-kernel-on-centos-7","status":"publish","type":"post","link":"https:\/\/sudomakeinstall.com\/uncategorized\/how-to-repackage-your-initrd-for-a-newer-kernel-on-centos-7","title":{"rendered":"How to repackage your initrd for a newer kernel on CentOS 7"},"content":{"rendered":"\n

The CentOS kernel is really old… some hardware requires a newer kernel, like intel VROC requires kernel 4.15+ to work properly…

This guide assumes you’ve installed the kernels for the CentOS AltArch kernel repo: http:\/\/mirror.centos.org\/altarch\/7\/kernel\/x86_64\/
<\/p>\n\n\n\n

#Download latest pxe kernel initramfs\nwget http:\/\/mirror.centos.org\/centos-7\/7\/os\/x86_64\/images\/pxeboot\/vmlinuz -O \/tmp\/pxeinitrd.img\n\n#Make a directory\nmkdir \/tmp\/pxeinitrd\ncd \/tmp\/pxeinitrd\n\n#Extract the kernel into the folder\n\/usr\/lib\/dracut\/skipcpio \/tmp\/pxeinitrd.img | xzcat | cpio -idmv\n\n#Remove the old kernel modules\nrm -rf lib\/modules\/*\n\n#Copy in the kernel modules from your new kernel, in this case its 4.19.84-300.x64_64 or CentOS AltArch\nrsync -r \/lib\/modules\/4.19.84-300.el7.x86_64\/* lib\/modules\/4.19.84-300.el7.x86_64\/\n\n#Compile the ramdisk..\nfind . 2>\/dev\/null | cpio -c -o | xz -9 --format=lzma > \/tmp\/initrd.4.19.84-300.el7.x86_64.img\n\n#Grab your files and stick em in your pxe directory\ncp \/tmp\/initrd.4.19.84-300.el7.x86_64.img \/var\/lib\/tftpboot\/images\/centos7\/initrd.img\ncp \/boot\/vmlinuz-4.19.84-300.el7.x86_64 \/var\/lib\/tftpboot\/images\/centos7\/vmlinuz<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

The CentOS kernel is really old… some hardware requires a newer kernel, like intel VROC requires kernel 4.15+ to work properly… This guide assumes you’ve installed the kernels for the CentOS AltArch kernel repo: http:\/\/mirror.centos.org\/altarch\/7\/kernel\/x86_64\/<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/posts\/1229"}],"collection":[{"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/comments?post=1229"}],"version-history":[{"count":0,"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/posts\/1229\/revisions"}],"wp:attachment":[{"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/media?parent=1229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/categories?post=1229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sudomakeinstall.com\/wp-json\/wp\/v2\/tags?post=1229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}