Questo contenuto non è disponibile nella lingua selezionata.
30.5. Verifying the Initial RAM Disk Image
The job of the initial RAM disk image is to preload the block device modules, such as for IDE, SCSI or RAID, so that the root file system, on which those modules normally reside, can then be accessed and mounted. On Red Hat Enterprise Linux 6 systems, whenever a new kernel is installed using either the Yum, PackageKit, or RPM package manager, the Dracut utility is always called by the installation scripts to create an initramfs (initial RAM disk image).
On all architectures other than IBM eServer System i (see the section called “Verifying the Initial RAM Disk Image and Kernel on IBM eServer System i”), you can create an
initramfs by running the dracut command. However, you usually don't need to create an initramfs manually: this step is automatically performed if the kernel and its associated packages are installed or upgraded from RPM packages distributed by Red Hat.
You can verify that an
initramfs corresponding to your current kernel version exists and is specified correctly in the grub.conf configuration file by following this procedure:
Procedure 30.1. Verifying the Initial RAM Disk Image
- As root, list the contents in the
/boot/directory and find the kernel (vmlinuz-<kernel_version>) andinitramfs-<kernel_version>with the latest (most recent) version number:Example 30.1. Ensuring that the kernel and initramfs versions match
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - we have three kernels installed (or, more correctly, three kernel files are present in
/boot/), - the latest kernel is
vmlinuz-2.6.32-22.el6.x86_64, and - an
initramfsfile matching our kernel version,initramfs-2.6.32-22.el6.x86_64.img, also exists.
Important
In the/boot/directory you may find severalinitrd-<version>kdump.imgfiles. 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. - (Optional) If your
initramfs-<kernel_version>file does not match the version of the latest kernel in/boot/, or, in certain other situations, you may need to generate aninitramfsfile with the Dracut utility. Simply invokingdracutas root without options causes it to generate aninitramfsfile in the/boot/directory for the latest kernel present in that directory:dracut
~]# dracutCopy to Clipboard Copied! Toggle word wrap Toggle overflow You must use the--forceoption if you wantdracutto overwrite an existinginitramfs(for example, if yourinitramfshas become corrupt). Otherwisedracutwill refuse to overwrite the existinginitramfsfile:dracut
~]# dracut Will not override existing initramfs (/boot/initramfs-2.6.32-22.el6.x86_64.img) without --forceCopy to Clipboard Copied! Toggle word wrap Toggle overflow You can create an initramfs in the current directory by callingdracut <initramfs_name> <kernel_version>:dracut "initramfs-$(uname -r).img" $(uname -r)
~]# dracut "initramfs-$(uname -r).img" $(uname -r)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 theadd_dracutmodules="<module> [<more_modules>]"directive of the/etc/dracut.confconfiguration file. You can list the file contents of aninitramfsimage file created by dracut by using thelsinitrd <initramfs_file>command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Seeman dracutandman dracut.conffor more information on options and usage. - Examine the
grub.confconfiguration file in the/boot/grub/directory to ensure that aninitrdexists for the kernel version you are booting. See Section 30.6, “Verifying the Boot Loader” for more information.initramfs-<kernel_version>.img
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
addRamDisk command. This step is performed automatically if the kernel and its associated packages are installed or upgraded from the RPM packages distributed by Red Hat; thus, it does not need to be executed manually. To verify that it was created, use the command ls -l /boot/ to make sure the /boot/vmlinitrd-<kernel_version> file already exists (the <kernel_version> should match the version of the kernel just installed).