VirtualBox

Changeset 101351 in vbox


Ignore:
Timestamp:
Oct 5, 2023 7:05:28 AM (19 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159352
Message:

Unattended: bugref:10530. Adapting kickstart file and kernel command line arguments to the new syntax introduced with OL9.

Location:
trunk/src/VBox
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/Config.kmk

    r98429 r101351  
    7373        fedora_ks.cfg \
    7474        ol_ks.cfg \
     75        ol9_ks.cfg \
    7576        rhel3_ks.cfg \
    7677        rhel4_ks.cfg \
  • trunk/src/VBox/Main/UnattendedTemplates/Makefile.kmk

    r98431 r101351  
    4444        redhat67_ks.cfg \
    4545        ol_ks.cfg \
     46        ol9_ks.cfg \
    4647        fedora_ks.cfg \
    4748        suse_autoinstall.xml \
  • trunk/src/VBox/Main/UnattendedTemplates/ol9_ks.cfg

    r101326 r101351  
     1# Refer to RHEL9 kickstart reference:
     2# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/performing_an_advanced_rhel_9_installation/kickstart-commands-and-options-reference_installing-rhel-as-an-experienced-user
     3
    14#platform=x86, AMD64, or Intel EM64T
    25#version=DEVEL
     
    69
    710# Install OS instead of upgrade
    8 install
     11# Removed from kickstart file syntax in OL9
     12#install
    913
    1014# Use CDROM installation media
     
    1418rootpw --plaintext @@VBOX_INSERT_ROOT_PASSWORD_SH@@
    1519
     20# auth or authconfig is deprecated in OL8
    1621# System authorization information
    17 auth  --useshadow  --passalgo=sha512
     22#auth  --useshadow  --passalgo=sha512
    1823
    1924# Use text mode install
     
    2732
    2833# Disable the unsupported hardware popup (vmmdev?).
    29 unsupported_hardware
     34# Removed from kickstart file syntax in OL9
     35#unsupported_hardware
    3036
    3137# SELinux configuration
    3238selinux --enforcing
    3339
     40# Deprecated in OL9
    3441# Installation logging level
    35 logging --level=info
     42#logging --level=info
    3643
    3744# System timezone
  • trunk/src/VBox/Main/include/UnattendedInstaller.h

    r98103 r101351  
    653653};
    654654
     655/**
     656 * RHEL installer.
     657 *
     658 * This serves as a base for the kickstart based installers.
     659 */
     660class UnattendedRhelInstaller : public UnattendedLinuxInstaller
     661{
     662public:
     663    DECLARE_TRANSLATE_METHODS(UnattendedRhelInstaller)
     664
     665    UnattendedRhelInstaller(Unattended *pParent,
     666                             const char *pszMainScriptTemplateName,
     667                             const char *pszPostScriptTemplateName,
     668                             const char *pszMainScriptFilename)
     669        : UnattendedLinuxInstaller(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     670    {}
     671    ~UnattendedRhelInstaller() {}
     672
     673    bool isAuxiliaryIsoIsVISO()             { return true; }
     674    bool isOriginalIsoNeeded() const        { return false; }
     675
     676protected:
     677    HRESULT addFilesToAuxVisoVectors(RTCList<RTCString> &rVecArgs, RTCList<RTCString> &rVecFiles,
     678                                     RTVFS hVfsOrgIso, bool fOverwrite);
     679};
    655680
    656681/**
    657682 * RHEL 6 installer.
    658683 *
    659  * This serves as a base for the kickstart based installers.
    660  */
    661 class UnattendedRhel6Installer : public UnattendedLinuxInstaller
     684 */
     685class UnattendedRhel6Installer : public UnattendedRhelInstaller
    662686{
    663687public:
     
    668692                             const char *pszPostScriptTemplateName = "redhat_postinstall.sh",
    669693                             const char *pszMainScriptFilename     = "ks.cfg")
    670         : UnattendedLinuxInstaller(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     694        : UnattendedRhelInstaller(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
    671695    {
    672696        Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded());
     
    676700    }
    677701    ~UnattendedRhel6Installer() {}
    678 
    679     bool isAuxiliaryIsoIsVISO()             { return true; }
    680     bool isOriginalIsoNeeded() const        { return false; }
    681 
    682 protected:
    683     HRESULT addFilesToAuxVisoVectors(RTCList<RTCString> &rVecArgs, RTCList<RTCString> &rVecFiles,
    684                                      RTVFS hVfsOrgIso, bool fOverwrite);
    685702};
    686703
     
    849866};
    850867
     868/**
     869 * Oracle Linux 9 installer.
     870 * Uses a different kickstart file since several commands/options are removed in OL9.
     871 * See the ol9_ks.cfg file for comments. Also, as of OL9 kernel command argument 'ks' should have
     872 * 'inst.' prefix.
     873 */
     874class UnattendedOracleLinux9Installer : public UnattendedRhelInstaller
     875{
     876public:
     877    DECLARE_TRANSLATE_METHODS(UnattendedOracleLinux9Installer)
     878
     879    UnattendedOracleLinux9Installer(Unattended *pParent,
     880                                    const char *pszMainScriptTemplateName = "ol9_ks.cfg",
     881                                    const char *pszPostScriptTemplateName = "ol_postinstall.sh",
     882                                    const char *pszMainScriptFilename = "ks.cfg")
     883        : UnattendedRhelInstaller(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     884    {
     885        Assert(!isOriginalIsoNeeded());
     886        Assert(isAuxiliaryIsoNeeded());
     887        Assert(!isAuxiliaryFloppyNeeded());
     888        Assert(isAuxiliaryIsoIsVISO());
     889        mStrDefaultExtraInstallKernelParameters.assign(" inst.ks=cdrom:/").append(pszMainScriptFilename).append(' ');
     890        mArrStrRemoveInstallKernelParameters.append("rd.live.check"); /* Disables the checkisomd5 step. Required for VISO. */
     891    }
     892    ~UnattendedOracleLinux9Installer() {}
     893};
     894
     895
    851896#if 0 /* fixme */
    852897/**
  • trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp

    r98292 r101351  
    103103        else if (enmDetectedOSType >= VBOXOSTYPE_Oracle && enmDetectedOSType <= VBOXOSTYPE_Oracle_latest_x64)
    104104        {
    105             if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "8") >= 0)
     105            if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "9") >= 0)
     106                pUinstaller = new UnattendedOracleLinux9Installer(pParent);
     107            else if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "8") >= 0)
    106108                pUinstaller = new UnattendedOracleLinux8Installer(pParent);
    107109            else if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "7") >= 0)
     
    13641366*/
    13651367//////////////////////////////////////////////////////////////////////////////////////////////////////
    1366 HRESULT UnattendedRhel6Installer::addFilesToAuxVisoVectors(RTCList<RTCString> &rVecArgs, RTCList<RTCString> &rVecFiles,
    1367                                                                RTVFS hVfsOrgIso, bool fOverwrite)
     1368HRESULT UnattendedRhelInstaller::addFilesToAuxVisoVectors(RTCList<RTCString> &rVecArgs, RTCList<RTCString> &rVecFiles,
     1369                                                          RTVFS hVfsOrgIso, bool fOverwrite)
    13681370{
    13691371    Utf8Str strIsoLinuxCfg;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette