English Portuguese (Brazil)
xref:Manually_Upgrading_the_Kernel.adoc#ex-Ensuring_that_the_kernel_and_initramfs_versions_match[Ensuring that the kernel and initramfs versions match] shows that:
we have three kernels installed (or, more correctly, three kernel files are present in the `/boot/` directory),
the latest kernel is `vmlinuz-3.17.7-300.fc21.x86_64`, and
an `initramfs` file matching our kernel version, `initramfs-3.17.7-300.fc21.x86_64.img`, also exists.
initrd files in the /boot/ directory are not the same as initramfs files
In the `/boot/` directory you might find several `initrd-_kernel_version_pass:attributes[{blank}]kdump.img` files. 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. For more information on `kdump`, see the link:++https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Kernel_Crash_Dump_Guide/++[Red{nbsp}Hat Enterprise{nbsp}Linux{nbsp}7 Kernel Crash Dump Guide].
(Optional) If your `initramfs-_kernel_version_pass:attributes[{blank}]` file does not match the version of the latest kernel in `/boot`, or, in certain other situations, you might need to generate an `initramfs` file with the [application]*Dracut* utility. Simply invoking [command]#dracut# as `root` without options causes it to generate an `initramfs` file in the `/boot/` directory for the latest kernel present in that directory:
~]# dracut
You must use the [option]`--force` option if you want [command]#dracut# to overwrite an existing `initramfs` (for example, if your `initramfs` has become corrupt). Otherwise [command]#dracut# will refuse to overwrite the existing `initramfs` file:
~]# dracut
F: Will not override existing initramfs (/boot/initramfs-3.17.7-300.fc21.x86_64.img) without --force
You can create an initramfs in the current directory by calling [command]#dracut _initramfs_name_ _kernel_version_pass:attributes[{blank}]#, for example:
~]# dracut "initramfs-$(uname -r).img" $(uname -r)
If you need to specify specific kernel modules to be preloaded, add the names of those modules (minus any file name suffixes such as `.ko`) inside the parentheses of the `add_dracutmodules="pass:attributes[{blank}]_module_ _more_modules_pass:attributes[{blank}]"` directive of the `/etc/dracut.conf` configuration file. You can list the file contents of an `initramfs` image file created by dracut by using the [command]#lsinitrd _initramfs_file_pass:attributes[{blank}]# command:
~]# lsinitrd /boot/initramfs-3.17.7-300.fc21.x86_64.img
Image: /boot/initramfs-3.17.7-300.fc21.x86_64.img: 18M
========================================================================
Version: dracut-038-31.git20141204.fc21
[output truncated]
See [command]#man dracut# and [command]#man dracut.conf# for more information on options and usage.
Examine the `/boot/grub2/grub.cfg` configuration file to ensure that an `initramfs-_kernel_version_.img` file exists for the kernel version you are booting. For example:
~]# grep initramfs /boot/grub2/grub.cfg
initrd16 /initramfs-3.17.7-300.fc21.x86_64.img
initrd16 /initramfs-3.17.6-300.fc21.x86_64.img
initrd16 /initramfs-3.17.4-302.fc21.x86_64.img
initrd16 /initramfs-0-rescue-db90b4e3715b42daa871351439343ca4.img
See xref:Manually_Upgrading_the_Kernel.adoc#s1-kernel-boot-loader[Verifying the Boot Loader] for more information on how to read and update the `/boot/grub2/grub.cfg` file.
Verifying the Initial RAM Disk Image and Kernel on IBM eServer System i
On IBM eServer System i machines, the initial RAM disk and kernel files are combined into a single file, which is created with the [command]#addRamDisk# command. This step is performed automatically if the kernel and its associated packages are installed or upgraded from the RPM packages distributed by {OSORG}; thus, it does not need to be executed manually. To verify that it was created, run the following command as `root` to make sure the `/boot/vmlinitrd-_kernel_version_pass:attributes[{blank}]` file already exists: