feat: initial AlmaLinux support
This commit is contained in:
85
builds/linux/almalinux/9/data/ks.pkrtpl.hcl
Normal file
85
builds/linux/almalinux/9/data/ks.pkrtpl.hcl
Normal file
@@ -0,0 +1,85 @@
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# AlmaLinux 9
|
||||
|
||||
### Installs from the first attached CD-ROM/DVD on the system.
|
||||
cdrom
|
||||
|
||||
### Performs the kickstart installation in text mode.
|
||||
### By default, kickstart installations are performed in graphical mode.
|
||||
text
|
||||
|
||||
### Accepts the End User License Agreement.
|
||||
eula --agreed
|
||||
|
||||
### Sets the language to use during installation and the default language to use on the installed system.
|
||||
lang ${vm_os_language}
|
||||
|
||||
### Sets the default keyboard type for the system.
|
||||
keyboard ${vm_os_keyboard}
|
||||
|
||||
### Configure network information for target system and activate network devices in the installer environment (optional)
|
||||
### --onboot enable device at a boot time
|
||||
### --device device to be activated and / or configured with the network command
|
||||
### --bootproto method to obtain networking configuration for device (default dhcp)
|
||||
### --noipv6 disable IPv6 on this device
|
||||
${network}
|
||||
|
||||
### Lock the root account.
|
||||
rootpw --lock
|
||||
|
||||
### The selected profile will restrict root login.
|
||||
### Add a user that can login and escalate privileges.
|
||||
user --name=${build_username} --iscrypted --password=${build_password_encrypted} --groups=wheel
|
||||
|
||||
### Configure firewall settings for the system.
|
||||
### --enabled reject incoming connections that are not in response to outbound requests
|
||||
### --ssh allow sshd service through the firewall
|
||||
firewall --enabled --ssh
|
||||
|
||||
### Sets up the authentication options for the system.
|
||||
### The SSSD profile sets sha512 to hash passwords. Passwords are shadowed by default
|
||||
### See the manual page for authselect-profile for a complete list of possible options.
|
||||
authselect select sssd
|
||||
|
||||
### Sets the state of SELinux on the installed system.
|
||||
### Defaults to enforcing.
|
||||
selinux --enforcing
|
||||
|
||||
### Sets the system time zone.
|
||||
timezone ${vm_os_timezone}
|
||||
|
||||
### Partitioning
|
||||
${storage}
|
||||
|
||||
### Modifies the default set of services that will run under the default runlevel.
|
||||
services --enabled=NetworkManager,sshd
|
||||
|
||||
### Do not configure X on the installed system.
|
||||
skipx
|
||||
|
||||
### Packages selection.
|
||||
%packages --ignoremissing --excludedocs
|
||||
@core
|
||||
-iwl*firmware
|
||||
%end
|
||||
|
||||
### Post-installation commands.
|
||||
%post
|
||||
dnf makecache
|
||||
dnf install epel-release -y
|
||||
dnf makecache
|
||||
dnf install -y sudo qemu-guest-tools
|
||||
%{ if additional_packages != "" ~}
|
||||
dnf install -y ${additional_packages}
|
||||
%{ endif ~}
|
||||
echo "${build_username} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/${build_username}
|
||||
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
||||
%end
|
||||
|
||||
### Reboot after the installation is complete.
|
||||
### --eject attempt to eject the media before rebooting.
|
||||
reboot --eject
|
||||
5
builds/linux/almalinux/9/data/network.pkrtpl.hcl
Normal file
5
builds/linux/almalinux/9/data/network.pkrtpl.hcl
Normal file
@@ -0,0 +1,5 @@
|
||||
%{ if ip != null ~}
|
||||
network --device=${device} --bootproto=static --ip=${ip} --netmask=${cidrnetmask("${ip}/${netmask}")} --gateway=${gateway} --nameserver=${join(",", dns)}
|
||||
%{ else ~}
|
||||
network --device=${device} --bootproto=dhcp
|
||||
%{ endif ~}
|
||||
76
builds/linux/almalinux/9/data/storage.pkrtpl.hcl
Normal file
76
builds/linux/almalinux/9/data/storage.pkrtpl.hcl
Normal file
@@ -0,0 +1,76 @@
|
||||
### Sets how the boot loader should be installed.
|
||||
bootloader --location=mbr
|
||||
|
||||
### Initialize any invalid partition tables found on disks.
|
||||
zerombr
|
||||
|
||||
### Removes partitions from the system, prior to creation of new partitions.
|
||||
### By default, no partitions are removed.
|
||||
### --all Erases all partitions from the system
|
||||
### --initlabel Initializes a disk (or disks) by creating a default disk label for all disks in their respective architecture.
|
||||
clearpart --all --initlabel
|
||||
|
||||
### Modify partition sizes for the virtual machine hardware.
|
||||
### Create primary system partitions.
|
||||
%{ for partition in partitions ~}
|
||||
part
|
||||
%{~ if partition.volume_group != "" ~}
|
||||
pv.${partition.volume_group}
|
||||
%{~ else ~}
|
||||
%{~ if partition.format.fstype == "swap" ~}
|
||||
swap
|
||||
%{~ else ~}
|
||||
${partition.mount.path}
|
||||
%{~ endif ~}
|
||||
%{~ if partition.format.fstype != "" ~}
|
||||
--label=${partition.format.label}
|
||||
%{~ if partition.format.fstype == "fat32" ~}
|
||||
--fstype vfat
|
||||
%{~ else ~}
|
||||
--fstype ${partition.format.fstype}
|
||||
%{~ endif ~}
|
||||
%{~ endif ~}
|
||||
%{~ endif ~}
|
||||
%{~ if partition.mount.options != "" ~}
|
||||
--fsoptions="${partition.mount.options}"
|
||||
%{~ endif ~}
|
||||
%{~ if partition.size != -1 ~}
|
||||
--size=${partition.size}
|
||||
%{~ else ~}
|
||||
--size=100 --grow
|
||||
%{ endif ~}
|
||||
|
||||
%{ endfor ~}
|
||||
%{ if vm_bios == "seabios" ~}
|
||||
part biosboot --fstype="biosboot" --ondisk=${device} --size=1
|
||||
%{ endif ~}
|
||||
### Create a logical volume management (LVM) group.
|
||||
%{ for index, volume_group in lvm ~}
|
||||
volgroup sysvg pv.${volume_group.name}
|
||||
|
||||
### Modify logical volume sizes for the virtual machine hardware.
|
||||
### Create logical volumes.
|
||||
%{ for partition in volume_group.partitions ~}
|
||||
logvol
|
||||
%{~ if partition.format.fstype == "swap" ~}
|
||||
swap
|
||||
%{~ else ~}
|
||||
${partition.mount.path}
|
||||
%{~ endif ~}
|
||||
--name=${partition.name} --vgname=${volume_group.name} --label=${partition.format.label}
|
||||
%{~ if partition.format.fstype == "fat32" ~}
|
||||
--fstype vfat
|
||||
%{~ else ~}
|
||||
--fstype ${partition.format.fstype}
|
||||
%{~ endif ~}
|
||||
%{~ if partition.mount.options != "" ~}
|
||||
--fsoptions="${partition.mount.options}"
|
||||
%{~ endif ~}
|
||||
%{~ if partition.size != -1 ~}
|
||||
--size=${partition.size}
|
||||
%{~ else ~}
|
||||
--size=100 --grow
|
||||
%{ endif ~}
|
||||
|
||||
%{ endfor ~}
|
||||
%{ endfor ~}
|
||||
Reference in New Issue
Block a user