검색

4.3. 기본 구성 사용자 지정

download PDF

고유한 구성 파일을 생성하고 이를 사용하여 설치 프로그램의 구성을 사용자 지정할 수 있습니다.

4.3.1. 기본 구성 파일 구성

Anaconda 구성 파일을 .ini 파일 형식으로 작성할 수 있습니다. Anaconda 구성 파일은 섹션, 옵션 및 주석으로 구성됩니다. 각 섹션은 [section] 헤더, # 문자로 시작하는 주석과 옵션을 정의하는 키로 정의합니다. 결과 구성 파일은 configparser 구성 파일 parser를 사용하여 처리됩니다.

/etc/anaconda/anaconda.conf 에 있는 기본 구성 파일에는 지원되는 문서화된 섹션 및 옵션이 포함되어 있습니다. 파일은 설치 프로그램의 전체 기본 구성을 제공합니다. /etc/anaconda/product.d//etc/anaconda/conf.d/ 의 사용자 지정 구성 파일에서 제품 구성 파일의 구성을 수정할 수 있습니다.

다음 설정 파일은 RHEL 8의 기본 구성을 설명합니다.

[Anaconda]
# Run Anaconda in the debugging mode.
debug = False

# Enable Anaconda addons.
addons_enabled = True

# List of enabled Anaconda DBus modules for RHEL.
kickstart_modules =
    org.fedoraproject.Anaconda.Modules.Timezone
    org.fedoraproject.Anaconda.Modules.Network
    org.fedoraproject.Anaconda.Modules.Localization
    org.fedoraproject.Anaconda.Modules.Security
    org.fedoraproject.Anaconda.Modules.Users
    org.fedoraproject.Anaconda.Modules.Payloads
    org.fedoraproject.Anaconda.Modules.Storage
    org.fedoraproject.Anaconda.Modules.Services

[Installation System]
# Should the installer show a warning about enabled SMT?
can_detect_enabled_smt = False

[Installation Target]
# Type of the installation target.
type = HARDWARE

# A path to the physical root of the target.
physical_root = /mnt/sysimage

# A path to the system root of the target.
system_root = /mnt/sysroot

# Should we install the network configuration?
can_configure_network = True

[Network]
# Network device to be activated on boot if none was configured so.
# Valid values:
#
#   NONE                   No device
#   DEFAULT_ROUTE_DEVICE   A default route device
#   FIRST_WIRED_WITH_LINK  The first wired device with link
#
default_on_boot = NONE

[Payload]
# Default package environment.
default_environment =

# List of ignored packages.
ignored_packages =

# Enable installation of latest updates.
enable_updates = True

# List of .treeinfo variant types to enable.
# Valid items:
#
#   addon
#   optional
#   variant
#
enabled_repositories_from_treeinfo = addon optional variant

# Enable installation from the closest mirror.
enable_closest_mirror = True

# Default installation source.
# Valid values:
#
#    CLOSEST_MIRROR  Use closest public repository mirror.
#    CDN             Use Content Delivery Network (CDN).
#
default_source = CLOSEST_MIRROR

# Enable ssl verification for all HTTP connection
verify_ssl = True

[Security]
# Enable SELinux usage in the installed system.
# Valid values:
#
#  -1  The value is not set.
#   0  SELinux is disabled.
#   1  SELinux is enabled.
#
selinux = -1

[Bootloader]
# Type of the bootloader.
# Supported values:
#
#   DEFAULT   Choose the type by platform.
#   EXTLINUX  Use extlinux as the bootloader.
#
type = DEFAULT

# Name of the EFI directory.
efi_dir = default

# Hide the GRUB menu.
menu_auto_hide = False

# Are non-iBFT iSCSI disks allowed?
nonibft_iscsi_boot = False

# Arguments preserved from the installation system.
preserved_arguments =
     cio_ignore rd.znet rd_ZNET zfcp.allow_lun_scan
     speakup_synth apic noapic apm ide noht acpi video
     pci nodmraid nompath nomodeset noiswmd fips selinux
     biosdevname ipv6.disable net.ifnames net.ifnames.prefix
     nosmt

[Storage]
# Enable dmraid usage during the installation.
dmraid = True

# Enable iBFT usage during the installation.
ibft = True

# Do you prefer creation of GPT disk labels?
gpt = False

# Tell multipathd to use user friendly names when naming devices during the installation.
multipath_friendly_names = True

# Do you want to allow imperfect devices (for example, degraded mdraid array devices)?
allow_imperfect_devices = False

# Default file system type. Use whatever Blivet uses by default.
file_system_type =

# Default partitioning.
# Specify a mount point and its attributes on each line.
#
# Valid attributes:
#
#   size <SIZE>    The size of the mount point.
#   min <MIN_SIZE> The size will grow from MIN_SIZE to MAX_SIZE.
#   max <MAX_SIZE> The max size is unlimited by default.
#   free <SIZE>    The required available space.
#
default_partitioning =
    /     (min 1 GiB, max 70 GiB)
    /home (min 500 MiB, free 50 GiB)
    swap

# Default partitioning scheme.
# Valid values:
#
#    PLAIN      Create standard partitions.
#    BTRFS      Use the Btrfs scheme.
#    LVM        Use the LVM scheme.
#    LVM_THINP  Use LVM Thin Provisioning.
#
default_scheme = LVM

# Default version of LUKS.
# Valid values:
#
#   luks1  Use version 1 by default.
#   luks2  Use version 2 by default.
#
luks_version = luks2

[Storage Constraints]
# Minimal size of the total memory.
min_ram = 320 MiB

# Minimal size of the available memory for LUKS2.
luks2_min_ram = 128 MiB

# Should we recommend to specify a swap partition?
swap_is_recommended = True

# Recommended minimal sizes of partitions.
# Specify a mount point and a size on each line.
min_partition_sizes =
    /      250 MiB
    /usr   250 MiB
    /tmp   50  MiB
    /var   384 MiB
    /home  100 MiB
    /boot  200 MiB

# Required minimal sizes of partitions.
# Specify a mount point and a size on each line.

# Allowed device types of the / partition if any.
# Valid values:
#
#  LVM        Allow LVM.
#  MD         Allow RAID.
#  PARTITION  Allow standard partitions.
#  BTRFS      Allow Btrfs.
#  DISK       Allow disks.
#  LVM_THINP  Allow LVM Thin Provisioning.
#
root_device_types =

# Mount points that must be on a linux file system.
# Specify a list of mount points.
must_be_on_linuxfs = / /var /tmp /usr /home /usr/share /usr/lib

# Paths that must be directories on the / file system.
# Specify a list of paths.
must_be_on_root = /bin /dev /sbin /etc /lib /root /mnt lost+found /proc

# Paths that must NOT be directories on the / file system.
# Specify a list of paths.
must_not_be_on_root =

[User Interface]
# The path to a custom stylesheet.
custom_stylesheet =

# The path to a directory with help files.
help_directory =

# A list of spokes to hide in UI.
# FIXME: Use other identification then names of the spokes.
hidden_spokes =

[License]
# A path to EULA (if any)
#
# If the given distribution has an EULA & feels the need to
# tell the user about it fill in this variable by a path
# pointing to a file with the EULA on the installed system.
#
# This is currently used just to show the path to the file to
# the user at the end of the installation.
eula =

4.3.2. 제품 구성 파일 구성

제품 구성 파일에는 제품을 식별하는 하나 또는 두 개의 추가 섹션이 있습니다. [Product] 섹션은 제품의 제품 이름을 지정합니다. [Base Product] 섹션은 해당하는 경우 기본 제품의 제품 이름을 지정합니다. 예를 들어 Red Hat Enterprise Linux는 Red Hat Virtualization의 기본 제품입니다.

설치 프로그램은 지정된 제품의 구성 파일을 로드하기 전에 기본 제품의 구성 파일을 로드합니다. 예를 들어, 먼저 Red Hat Enterprise Linux의 구성을 로드한 다음 Red Hat Virtualization을 위한 구성을 로드합니다.

Red Hat Enterprise Linux의 제품 구성 파일의 예를 참조하십시오.

# Anaconda configuration file for Red Hat Enterprise Linux.

[Product]
product_name = Red Hat Enterprise Linux

[Anaconda]
kickstart_modules =
     org.fedoraproject.Anaconda.Modules.Timezone
     org.fedoraproject.Anaconda.Modules.Network
     org.fedoraproject.Anaconda.Modules.Localization
     org.fedoraproject.Anaconda.Modules.Security
     org.fedoraproject.Anaconda.Modules.Users
     org.fedoraproject.Anaconda.Modules.Payloads
     org.fedoraproject.Anaconda.Modules.Storage
     org.fedoraproject.Anaconda.Modules.Services
     org.fedoraproject.Anaconda.Modules.Subscription

[Installation System]
can_detect_enabled_smt = True

[Network]
default_on_boot = DEFAULT_ROUTE_DEVICE

[Payload]
ignored_packages =
    ntfsprogs
    btrfs-progs
    dmraid

enable_closest_mirror = False
default_source = CDN

[Bootloader]
efi_dir = redhat

[Storage]
file_system_type = xfs
default_partitioning =
    /     (min 1 GiB, max 70 GiB)
    /home (min 500 MiB, free 50 GiB)
    swap

[Storage Constraints]
swap_is_recommended = True

[User Interface]
help_directory = /usr/share/anaconda/help/rhel
custom_stylesheet = /usr/share/anaconda/pixmaps/redhat.css

[License]
eula = /usr/share/redhat-release/EULA

Red Hat Virtualization의 제품 구성 파일의 예를 참조하십시오.

# Anaconda configuration file for Red Hat Virtualization.

[Product]
product_name = Red Hat Virtualization (RHVH)

[Base Product]
product_name = Red Hat Enterprise Linux

[Storage]
default_scheme = LVM_THINP
default_partitioning =
    /              (min 6 GiB)
    /home          (size 1 GiB)
    /tmp           (size 1 GiB)
    /var           (size 15 GiB)
    /var/crash     (size 10 GiB)
    /var/log       (size 8 GiB)
    /var/log/audit (size 2 GiB)
    swap

[Storage Constraints]
root_device_types = LVM_THINP
must_not_be_on_root = /var
req_partition_sizes =
	/var   10 GiB
	/boot  1  GiB

제품의 설치 프로그램 구성을 사용자 지정하려면 제품 구성 파일을 생성해야 합니다. 위 예제와 유사한 콘텐츠를 사용하여 my-distribution.conf 라는 새 파일을 만듭니다. [Product] 섹션의 product_name 을 제품 이름(예: My Distribution)으로 변경합니다. 제품 이름은 .buildstamp 파일에 사용된 이름과 동일해야 합니다.

사용자 지정 구성 파일을 만든 후 Create a product.img file 섹션의 단계에 따라 사용자 지정이 포함된 새 product.img 파일을 만들고 사용자 지정 부팅 이미지 생성을 통해 변경 사항이 포함된 새 부팅 가능 ISO 파일을 만듭니다.

4.3.3. 사용자 지정 구성 파일 구성

제품 이름과 관계없이 설치 프로그램 구성을 사용자 지정하려면 사용자 지정 구성 파일을 생성해야 합니다. 이렇게 하려면 기본 구성 파일 구성의 예제와 유사한 내용을 사용하여 100-my-configuration.conf 라는 새 파일을 생성하고 [Product][Base Product] 섹션을 생략합니다.

사용자 지정 구성 파일을 만든 후 Create a product.img file 섹션의 단계에 따라 사용자 지정이 포함된 새 product.img 파일을 만들고 사용자 지정 부팅 이미지 생성을 통해 변경 사항이 포함된 새 부팅 가능 ISO 파일을 만듭니다.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.