Making a kernel on CentOS 6/7

Technical discussions, how to do geeky things more efficiently.

Moderators: Nanook, carl

Post Reply
User avatar
Posting Freak
Posts: 335
Joined: Tue Jun 25, 2013 10:08 pm
Location: Shoreline

Making a kernel on CentOS 6/7

Post by Nanook » Sat Apr 04, 2015 10:26 pm

On non-broken operating systems, the normal procedure when making a kernel is:

make xconfig (or the configuration program of your preference)
Configure the kernel to your liking.
make clean; make; make modules_install install

However, under CentOS 6 you'll get missing module complaints, and under CentOS 7, it will scribble your boot partition rendering your machine unbootable until you re-install grub2.

So on these machines:

make xconfig
make clean; make; make modules_install
cp arch/x86_64/boot/bzImage /boot/vmlinuz-(version)
cp /boot/
cp .config /boot/config-version
mkinitrd /boot/initramfs-(version).img (version)

On CentOS 6, hand edit /boot/grub/menu.lst to add the new kernel

On CentOS 7 type:

grub2-mkconfig -o /boot/grub2/grub.cfg

You should be able to boot your new kernel now.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests