검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

30.5. Verifying the Initial RAM Disk Image

download PDF
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

  1. As root, list the contents in the /boot/ directory and find the kernel (vmlinuz-<kernel_version>) and initramfs-<kernel_version> with the latest (most recent) version number:

    Example 30.1. Ensuring that the kernel and initramfs versions match

    ~]# ls /boot/
    config-2.6.32-17.el6.x86_64           lost+found
    config-2.6.32-19.el6.x86_64           symvers-2.6.32-17.el6.x86_64.gz
    config-2.6.32-22.el6.x86_64           symvers-2.6.32-19.el6.x86_64.gz
    efi                                   symvers-2.6.32-22.el6.x86_64.gz
    grub                                  System.map-2.6.32-17.el6.x86_64
    initramfs-2.6.32-17.el6.x86_64.img    System.map-2.6.32-19.el6.x86_64
    initramfs-2.6.32-19.el6.x86_64.img    System.map-2.6.32-22.el6.x86_64
    initramfs-2.6.32-22.el6.x86_64.img    vmlinuz-2.6.32-17.el6.x86_64
    initrd-2.6.32-17.el6.x86_64kdump.img  vmlinuz-2.6.32-19.el6.x86_64
    initrd-2.6.32-19.el6.x86_64kdump.img  vmlinuz-2.6.32-22.el6.x86_64
    initrd-2.6.32-22.el6.x86_64kdump.img
    • 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 initramfs file matching our kernel version, initramfs-2.6.32-22.el6.x86_64.img, also exists.

    Important

    In the /boot/ directory you may find several initrd-<version>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.
  2. (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 an initramfs file with the Dracut utility. Simply invoking 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 --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:
    ~]# dracut
    Will not override existing initramfs (/boot/initramfs-2.6.32-22.el6.x86_64.img) without --force
    You can create an initramfs in the current directory by calling dracut <initramfs_name> <kernel_version>:
    ~]# 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="<module> [<more_modules>]" 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 lsinitrd <initramfs_file> command:
    ~]# lsinitrd initramfs-2.6.32-22.el6.x86_64.img
    initramfs-2.6.32-22.el6.x86_64.img:
    ========================================================================
    dracut-004-17.el6
    ========================================================================
    drwxr-xr-x  23 root     root            0 May  3 22:34 .
    drwxr-xr-x   2 root     root            0 May  3 22:33 proc
    -rwxr-xr-x   1 root     root         7575 Mar 25 19:53 init
    drwxr-xr-x   7 root     root            0 May  3 22:34 etc
    drwxr-xr-x   2 root     root            0 May  3 22:34 etc/modprobe.d
    [output truncated]
    See man dracut and man dracut.conf for more information on options and usage.
  3. Examine the grub.conf configuration file in the /boot/grub/ directory to ensure that an initrd initramfs-<kernel_version>.img exists for the kernel version you are booting. See Section 30.6, “Verifying the Boot Loader” for more information.

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).
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.