![]() This tutorial will cover the building of a kernel from the CentOS sources with your own options or modifications. One is to build a kernel with custom options from the CentOS sources and the other is to build a mainline kernel using sources obtained from The Linux Kernel Archive. There are two ways to build a custom kernel for CentOS. If you break the kernel, or your system, you get to keep it and, as a bonus, you get to keep all the pieces & the associated crying about how your system doesn't boot. Is the functionality you need available in the CentOS-Plus kernel, which can be found in the CentOSPlus Repository ? Is the functionality you need available as a separate module to the current kernel?.Is the functionality you need available by installing one of the kernel modules from the ELRepo Project ? You may simply need to build a kernel module, in which case just see Build Your Own Kernel Modules. If you replace a critical component, it may very well affect how the rest of the system acts.ĪRE YOU ABSOLUTELY SURE? Seriously, 99.9% of users no longer need to rebuild their own kernel. Are you sure? CentOS is designed to function as a complete environment.Modifying the kernel specification file.We should see the new option in the grub. Initrd /boot/initrd-3.11.0-w00t-0.11-defaultīasically, what we do here is copy the current grub entry in your system and just change the title and the image of the new Kernel. Kernel /boot/vmlinuz-3.11.0-w00t-0.11-default root=/dev/XXX resume=/dev/disk/XXX splash=silent crashkernel=256M-:128M showopts vga=0x314 Now it only remains to edit the grub menu: # vim /boot/grub/menu.lstĪnd add these lines, obviously putting the right disk to your existing system: title SUSE Linux Enterprise Server 11 SP3 - 3.11 Linux for Workgroups Install the new Kernel package under /usr/src/packages/RPMS/x86_64/: # cd /usr/src/packages/RPMS/x86_64/ sp3-lab:/usr/src/packages/RPMS/x86_64 # ls If all went well, you will see output similar to this: Now, take a break, this step will take a bit depending on the performance of your hardware. In the Makefile, edit the “ EXTRAVERSION =” field, for (this) example: VERSION = 3īecause we copy the old configuration in this step we ask about the new kernel features, read carefully before responding. HINT: After configuration you can further customize the kernel, adding a “extraversion” value. If you still want to change or add something, at this point you can run: make menuconfig In the next step there are several ways to configure the kernel, I prefer to make menuconfig, but if you don’t have experience or want to play it safe, I recommend you use an existing configuration, to do this copy your old config file to the new source path: # cp /boot/config-`uname -r`. If this is your first time, you really do not need this step, this only cleans. Make sure you are in the path from the source # make mrproper Configure the kernel: # cd /usr/src/linux-3.11/ ![]() Unpack the source: # tar -Jxvf linux-3.11.tar.xz -C /usr/src/Ĥ. After all we need to install: ncurses-devel # zypper install ncurses-develģ. How to compile the kernel manually, SUSE style!.įor this example, I’ll use the new kernel 3.11 (obviously) on a SLES11 SP3 server.ġ. Today Linus Torvalds announced the release of the Linux Kernel 3.11 “Linux for Workgroups” ( is not it funny?).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |