Making a kernel.org kernel on CentOS 6/7

Technical discussions, how to do geeky things more efficiently.

Moderators: Nanook, carl

User avatar
Nanook
Senior Member
Posts: 92
Joined: Tue Jun 25, 2013 10:08 pm
Location: Shoreline
Contact:

Making a kernel.org kernel on CentOS 6/7

Postby Nanook » Sat Apr 04, 2015 10:26 pm

On non-broken operating systems, the normal procedure when making a kernel.org 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 System.map /boot/System.map-version
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.

Who is online

Users browsing this forum: No registered users and 4 guests