Do not use the -U option, since it overwrites the currently installed kernel, which creates boot loader problems.
For example:. The next step is to verify that the initial RAM disk image has been created. Ensuring that the kernel and initramfs versions match shows that:. These are special files created by the kdump mechanism for kernel debugging purposes, are not used to boot the system, and can safely be ignored.
You must use the --force option if you want dracut to overwrite an existing initramfs for example, if your initramfs has become corrupt.
Otherwise dracut will refuse to overwrite the existing initramfs file:. If you need to specify specific kernel modules to be preloaded, add the names of those modules minus any file name suffixes such as. See man dracut and man dracut. This step is performed automatically if the kernel and its associated packages are installed or upgraded from the RPM packages distributed by The Fedora Project; thus, it does not need to be executed manually.
When you install a kernel using rpm , the kernel package creates an entry in the boot loader configuration file for that new kernel. However, rpm does not configure the new kernel to boot as the default kernel. You must do this manually when installing a new kernel with rpm.
It is always recommended to double-check the boot loader configuration file after installing a new kernel with rpm to ensure that the configuration is correct. Otherwise, the system might not be able to boot into Fedora properly. If this happens, boot the system with the boot media created earlier and re-configure the boot loader.
To update this configuration file manually, type the following at a shell prompt as root :. These blocks always start with the menuentry keyword followed by a title, list of options, and opening curly bracket, and end with a closing curly bracket.
Anything between the opening and closing bracket should be indented. For example, the following is a sample menuentry block for Fedora 21 with Linux kernel 3. Each menuentry block that represents an installed Linux kernel contains linux and initrd directives followed by the path to the kernel and the initramfs image respectively.
This directive is called initrd because the previous tool which created initial RAM disk images, mkinitrd , created what were known as initrd files. The grub. Ensure your hardware is detected by watching the boot process output.
If GRUB 2 presents an error and is unable to boot into the new kernel, it is often easiest to try to boot into an alternative or older kernel so that you can fix the problem.
Alternatively, use the boot media you created earlier to boot the system. However, you must use the dd command to configure the system to boot the new kernel. As root , issue the following command, where kernel-version is the version of the new kernel and side is the side from the previous command:.
Begin testing the new kernel by rebooting the computer and watching the messages to ensure that the hardware is detected properly. Confirm that the file contains an image section with the same version as the kernel package just installed, and likewise for the initramfs image:. Notice that the default is not set to the new kernel. The kernel in the first image is booted by default.
To change the default kernel to boot either move its image stanza so that it is the first one listed or add the directive default and set it to the label of the image stanza that contains the new kernel. Want to help? Learn how to contribute to Fedora Docs. Edit this Page. Use DNF to install kernels whenever possible. A file, named Module. This file is normally created after the native kernel modules are compiled. Since we are not building the kernel or any modules and since we have not modified the default kernel configuration, we can use the Module.
The presense of this file is important when we compile any third party modules using these kernel headers. This way, if the third party module depends on some native kernel modules, then you will have to load the latter manually.
So, copy the Module. This is the proper and most complete way of preparing our headers, instead of compiling each of the files mentioned above individually as I had written in this article before this update. Give it a proper name that includes your currently running kernel version and release.
The kernel headers, contained in this directory, can be used in order to compile any third party kernel modules. Keep in mind, that if you install a different kernel in your system, this procedure has to be done again from the beginning. My next task is to create a BASH script that automates all this, so I do not have to do this by hand every time I upgrade the official kernel. You will find the script here. If you use the official Fedora kernel, I highly recommend that you use the respective kernel-devel RPM package in order to build any third party modules.
If they fail due to missing headers, then use the kernel sources. I always consider the latter as a secondary option. Unfortunately, my technical knowledge cannot give you any guarantees that this will work for you or if this guide is complete. At least, I do not have any issues when I compile and use kernel modules, which would not compile using the kernel-devel package due to missing headers.
You are encouraged to leave your feedback. I normally download the kernel from kernel. The problem which I face is that if I have to compile a third party module, say for vmware for my running customised kernel then I have to keep the whole compiled kernel image which amounts to nearly 1.
Even if we keep all the headers then I think it should not go beyond Mb. So, I ask you, if you can post some pointers where one can delete the unneccessary files and make available kernel headers from the compiled kernel tree. So, I guess I have the same issue somehow. Only the headers. This means, that if I erase all other files from my kernel sources directory, except for all those mentioned above, I would still have the complete kernel headers and 3rd party modules should compile properly.
This is fixed. The occupied space was reduced to around MB. Only regular files were deleted though, the directories remained. Vikram, please consider all these as a hackish-like method to reduce the occupied space. Maybe this is a completely wrong approach.
This way, you would get rid of the kernel compilation products which take a lot of space, but still have a usable set of kernel headers. I hope these give you some helpful hints to investigate the issue yourself. Thanks for your comment. Very interesting indeed. Now I am trying to install the ncipher software which needs kernel headers for the above said kernel 2.
I tried your kernel header script to get the headers to install ncipher software. First of all, try to install the default kernel development package for your running kernel. This contains the kernel headers that most 3rd party modules need in order to be compiled. But, the problem is that this info was written for a 2. X kernel. I strongly suggest that you ask for help at the Fedora Forum or contact Red Hat support.
Kris : This is general info regarding kernel modules. After you install them, you issue the following command so that the "module database" is updated: depmod -a.
I believe that you should address your questions regarding commercial software to their support channels or to a professional consultant.
0コメント