Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

1.123. mkinitrd

1.123.1. RHBA-2010:0295: bug fix and enhancement update

The mkinitrd utility creates file system images for use as initial ramdisk (initrd) images.
These updated packages address the following bugs:
  • booting a Storage Area Network (SAN) from a replicated Logical Unit Number (LUN) following a loss of the primary site would fail when doing array-based synchronous data replication to a remote site. This was due to the fact that the initrd on the replicated LUN is configured to see the World Wide Identifier (WWID) of the primary LUN only. A patch has been applied that allows for the creation of all multipath devices so that the replicated LUN is visible for booting. It should be noted that some manual configuration is required following the installation of the updated package:
    1. ensure that multipath.conf has the correct stanzas for both multipath devices.
    2. run mkinitrd again.
    A replicated LUN will now successfully boot provided:
    1. the multipath.conf in the initrd does not blacklist the new LUN and;
    2. /var/lib/multipath/bindings in the initrd is either empty or contains an entry binding mpath0 (or the device originally installed to) to the replicated LUN's WWID.
  • scsi_model devflag options appended to /etc/modprobe.conf can be of the form: options scsi_mod dev_flags="HITACHI:OPEN-9     -SUN:0x240 to specify more than one SCSI model. These strings are written as arguments to the insmod command within the initrd script. The leading spaces of the second model name in the above example were incorrectly read as a single space by the nash command resulting in the /proc/scsi/device_info file containing invalid strings. A user specifying a SCSI model in this way would have to manually edit the /proc/scsi/device_info file as a result. A patch has been applied to nash.c to correctly handle the quoted string following the dev_flag argument. The string is now written to the /proc/scsi/device_info file in the correct format. (BZ#467850)
  • mkinitrd uses a global variable rootdev to store the name of the root device. This is either auto-detected or passed in via the command line --rootdev= parameter. Changes applied to mkinitrd to support boot from multipath introduced the local rootdev variable. This variable overrides the global variable resulting in an incorrect root device, such as a component SCSI device, being written to the /init script preventing the system from booting. The local variable has been renamed to avoid the conflict. Running mkinitrd on a multipath boot system now results in a successful boot of the system. (BZ#503567)
  • mkinitrd runs nash on each logical volume. The block_find_fs_by_key() method calls the nashDmGetDevName() method for each logical volume. The nash command does not run to completion in a reasonable time-frame as the nashDmGetDevName() recurses through all devices each time it is called. This update allows nashDmGetDevName() to cache its results, so nash no longer uses 100% of the CPU when installing RPMs. (BZ#516047)
  • mkinitrd copied the lvm.conf file verbatim to the initrd without parsing it properly. If the logical volume manager (LVM) was configured to use host tags, Red Hat Enterprise Linux would not boot because a host name could not be set at initrd time. lvm --dumpconfig is now used to retrieve the LVM configuration file. (BZ#517868)
  • mkinitrd attempted to explicitly activate the subsets of a nested RAID 10 set. Error messages would then be printed to the log during boot. These messages could safely be ignored. They have now been removed to avoid confusion. (BZ#526246)
  • mkinitrd copied the symbolic link of a bootpath driver instead of the actual bootpath driver. This caused kernel panic due to an unavailable driver on first boot of the operating system. mkinitrd now checks the full path of symbolically linked drivers. (BZ#540641)
  • when the root file system was on the logical volume manager (LVM), as is the default installation option, nash received a segmentation fault reference if some modules did not load during post-installation reboot. This caused unwarranted kernel panic. Kernel panic no longer occurs as a result of the non-loading of modules. (BZ#560567)
  • several virtio modules were missing from the previous version of mkinitrd. This meant that mkinitrd built incorrectly upon installation if virtio block or network devices were used within the Kernel Based Virtual Machine (KVM). The final result was kernel panic. These updated packages contain the required modules which allow mkinitrd to build and install correctly. (BZ#560672)
As well, these updated packages add the following enhancements:
  • the scsi_dh_rdac module is needed to support many LSI Engenio based (IBM and non-IBM) storage devices. With the inclusion of a module such as the scsi_dh_rdac module in initrd, the time to boot a system with multiple rdac devices is minimized. A patch has been applied to mkinitrd to load every scsi_dh_* module in the event that multipath devices are detected. The patch currently succeeds in loading xscsi_dh_rdac modules for installations on DS4K storage and further work is being undertaken to ensure the successful loading of modules independent of the host device. (BZ#460899)
  • mkinitrd is responsible for ensuring that all drivers, applications, and configuration information needed to mount the root filesystem are packaged into each kernel's initrd. Unlike the Logical Volume Manager (LVM) component of mkinitrd, multipath operates on only the logical volume associated with the root filesystem and not the volume group containing the root filesystem. As a consequence, when installing a system with multipath devices, only disks currently in use by the root's logical volume have multipath configured within the initrd. A patch has been applied that wraps the find_mpath_deps in a loop that iterates through every primary volume in the root volume group. Non-LVMs are handled in a separate case by runnning find_mpath_deps against the root device. Installing a system with multipath devices will now result in the primary volumes in the root virtual group being on multipath devices. (BZ#501535)
Users of mkinitrd are advised to upgrade to these updated packages, which resolve these issues and add these enhancements.