Why does anaconda not showing the customized installer text using a product.img in Red Hat Enterprise Linux 7.1?

Solution Verified - Updated -

Issue

  • Attempting to create a custom installer of Red Hat Enterprise Linux 7.1 and have created a product.img as instructed in the Desktop Migration Guide
  • The images are successfully being over-ridden however the installer text is not.
  • Switching TTY's and viewing the anaconda.log I see it say
22:37:21,887 INFO anaconda: MyDistro is the highest priority installclass, using it.
  • However, the installer text still says "RED HAT ENTERPRISE LINUX 7.1 INSTALLATION". Is this correct? It was supposed to overridde the installer text once you include a custom.py file.
  • The custom.py that has been places in product/run/install/product/pyanaconda/installclasses:
from pyanaconda.installclass import BaseInstallClass
from pyanaconda.product import productName
from pyanaconda import network
from pyanaconda import nm
from pyanaconda import iutil
from pyanaconda.i18n import N_

class MyDistroInstallClass(BaseInstallClass):
    # name has underscore used for mnemonics, strip if you dont need it
#    id = "rhel"
    name = N_("MyDistro")
    sortPriority = 30000
    if not productName.startswith(("MyDistro")):
        hidden = 1
    defaultFS = "xfs"

    bootloaderTimeoutDefault = 5
    bootloaderExtraArgs = []

    ignoredPackages = ["ntfsprogs", "reiserfs-utils", "hfsplus-tools"]

    installUpdates = False

    _l10n_domain = "comps"

    efi_dir = "redhat"

    help_placeholder = "RHEL7Placeholder.html"
    help_placeholder_with_links = "RHEL7PlaceholderWithLinks.html"

    def configure(self, anaconda):
        BaseInstallClass.configure(self, anaconda)
        BaseInstallClass.setDefaultPartitioning(self, anaconda.storage)

    # Set first boot policy regarding ONBOOT value
    # (i.e. which network devices should be activated automatically after reboot)
    # After switch root we set ONBOOT=no as default for all devices not activated
    # in initramfs. Here, at the end of installation, we check and modify it eventually.
    def setNetworkOnbootDefault(self, ksdata):
        # if there is no device to be autoactivated after reboot
        for devName in nm.nm_devices():
            if nm.nm_device_type_is_wifi(devName):
                continue
            try:
                onboot = nm.nm_device_setting_value(devName, "connection", "autoconnect")
            except nm.SettingsNotFoundError:
                continue
            if not onboot == False:
                return

        # set ONBOOT=yes for the device used during installation
        # (ie for majority of cases the one having the default route)
        devName = network.default_route_device()
        if not devName:
            return
        if nm.nm_device_type_is_wifi(devName):
            return
        ifcfg_path = network.find_ifcfg_file_of_device(devName, root_path=iutil.getSysroot())
        if not ifcfg_path:
            return
        ifcfg = network.IfcfgFile(ifcfg_path)
        ifcfg.read()
        ifcfg.set(('ONBOOT', 'yes'))
        ifcfg.write()
        for nd in ksdata.network.network:
            if nd.device == devName:
                nd.onboot = True
                break

    def __init__(self):
        BaseInstallClass.__init__(self)

Environment

  • Red Hat Enterprise Linux 7.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In