Unable to use manually created partitions for filesystem in RHEL 5 install

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5

Issue

A kickstart %pre scriptlet is creating partitions manually, but kickstart errors out with "Unable to locate partition mapper/mpathXpY to use for /boot"

Resolution

Remove the "clearpart" directive from the kickstart script.

Root Cause

The kickstart also specified "clearpart --all" which cleared the partitions created in the %pre scriptlet.

Diagnostic Steps

%pre script

    bootloader --location=mbr  --driveorder=mapper/mpath1,sda
    ignoredisk --drives=sda,sdd
    partition /boot --fstype ext3 --onpart=/dev/mapper/mpath1p1
    partition pv.100000 --noformat --onpart=/dev/mapper/mpath1p2
    partition swap --fstype swap --onpart=/dev/mapper/mpath0p1
    ...

anaconda.log:

    15:21:48 DEBUG   : done starting mpaths.  Drivelist: ['sda', 'sdd', 'mapper/mpath0', 'mapper/mpath1']
    15:21:48 DEBUG   : adding drive mapper/mpath0 to disk list
    15:21:48 DEBUG   : adding drive mapper/mpath1 to disk list
    15:21:48 DEBUG   : removing lvm metadata from mapper/mpath1p2
    15:21:48 INFO    : pvdisplay /dev/mapper/mpath1p2
    15:21:48 DEBUG   : using preexisting size of 17260.0 for volume group sep

Kickstart script:

clearpart --all
bootloader --location=mbr
[...]
%include /tmp/ks.part

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.