4.3. デフォルト設定のカスタマイズ
独自の設定ファイルを作成し、これを使用してインストーラーの設定をカスタマイズすることができます。
4.3.1. デフォルトの設定ファイルの設定 リンクのコピーリンクがクリップボードにコピーされました!
Anaconda 設定ファイルは、.ini
ファイル形式で記述できます。Anaconda 設定ファイルは、セクション、オプション、およびコメントで構成されています。各セクションは、[section]
ヘッダー、#
文字で始まるコメント、および オプション
を定義するためのキーで定義されます。生成される設定ファイルは、configparser
設定ファイルパーサーで処理されます。
/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 [Boot loader] # Type of the boot loader. # Supported values: # # DEFAULT Choose the type by platform. # EXTLINUX Use extlinux as the boot loader. # 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 =
[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
[Boot loader]
# Type of the boot loader.
# Supported values:
#
# DEFAULT Choose the type by platform.
# EXTLINUX Use extlinux as the boot loader.
#
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. 製品設定ファイルの設定 リンクのコピーリンクがクリップボードにコピーされました!
製品設定ファイルには、製品を識別するセクションが 1 つまたは 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.
# 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
[Boot loader]
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.
# 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
ファイルで使用される名前と同じでなければなりません。
カスタム設定ファイルを作成したら、product.img ファイルの作成 セクションの手順に従って、カスタマイズを含む 新しい product.img
ファイルを作成し、カスタムブートイメージの作成 に従って、変更を含めた新しい起動可能な ISO ファイルを作成します。
4.3.3. カスタム設定ファイルの設定 リンクのコピーリンクがクリップボードにコピーされました!
インストーラー設定を製品名とは別にカスタマイズするには、カスタム設定ファイルを作成する必要があります。これを行うには、Configuring the default configuration files の例のような内容で 100-my-configuration.conf
という名前の新規ファイルを作成し、[Product]
および [Base Product]
セクションを省略します。
カスタム設定ファイルを作成したら、product.img ファイルの作成 セクションの手順に従って、カスタマイズを含む 新しい product.img
ファイルを作成し、カスタムブートイメージの作成 に従って、変更を含めた新しい起動可能な ISO ファイルを作成します。