Skip to content

Instantly share code, notes, and snippets.

@jaboutboul
Created February 10, 2023 11:08
Show Gist options
  • Save jaboutboul/e83f2d8884b7d817d75a05e0517c2dd5 to your computer and use it in GitHub Desktop.
Save jaboutboul/e83f2d8884b7d817d75a05e0517c2dd5 to your computer and use it in GitHub Desktop.
#version=Alma9
# Use graphical or text install
# graphical
text
repo --name="AppStream" --baseurl=http://repo.almalinux.org/almalinux/9.0/AppStream/
%packages
@^minimal-environment
#@^virtualization-host-environment
#@container-management
#@virtualization-platform
%end
# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --device=enP7p1s0f0 --ipv6=auto --activate
network --hostname=aarch64-02.elrepo.org
# Use CDROM or network installation media
url --url="http://repo.almalinux.org/almalinux/9.0/"
# Run the Setup Agent on first boot
firstboot --disable
# Do not configure the X Window System
skipx
# Select drives
ignoredisk --only-use=nvme0n1,nvme1n1
# Note: "bootloader" and "clearpart" are not needed with %pre disk wipe and partitioning
# Pre partition drives to specify drive order
%pre
# pre partition drives
#
# ARM Disk /dev/nvme0n1: 894.3 GiB, 960197124096 bytes > 915715.34 MB Use: 915714 MB
#
# Partition clearing: Wipe drives (1GB) > dd more reliable than clearpart
for i in 0 1;do dd if=/dev/zero of=/dev/nvme"$i"n1 bs=1M count=1K;echo;done
#
# Note: Start at "1" and finish at "Max - 1"; Raid partition needs to be 1MB larger than final contents
for i in 0 1;do parted -s /dev/nvme"$i"n1 mklabel gpt ;done
for i in 0 1;do parted -s /dev/nvme"$i"n1 unit MiB mkpart dummy 1 514;done
for i in 0 1;do parted -s /dev/nvme"$i"n1 unit MiB mkpart dummy 514 1539;done
for i in 0 1;do parted -s /dev/nvme"$i"n1 unit MiB mkpart dummy 1539 915714;done
#
%end
# Disk partitioning information (note --ondisk= vs --onpart= or --usepart=)
#
# Note: Sum of raid sizes = last parted position - 1
part raid.441 --fstype="mdmember" --onpart=nvme0n1p1 --size=513
part raid.448 --fstype="mdmember" --onpart=nvme1n1p1 --size=513
part raid.851 --fstype="mdmember" --onpart=nvme0n1p2 --size=1025
part raid.858 --fstype="mdmember" --onpart=nvme1n1p2 --size=1025
part raid.1340 --fstype="mdmember" --onpart=nvme0n1p3 --size=914175
part raid.1347 --fstype="mdmember" --onpart=nvme1n1p3 --size=914175
#
raid /boot/efi --device=boot_efi --fstype="efi" --level=RAID1 --fsoptions="umask=0077,shortname=winnt" raid.441 raid.448
raid /boot --device=boot --fstype="ext3" --level=RAID1 raid.851 raid.858
raid pv.1354 --device=pv00 --fstype="lvmpv" --level=RAID1 raid.1340 raid.1347
#
volgroup elrepo --pesize=4096 pv.1354
#
logvol / --fstype="ext4" --size=30720 --name=root --vgname=elrepo
logvol swap --fstype="swap" --size=4096 --name=swap --vgname=elrepo
logvol /home --fstype="ext4" --size=102400 --name=home --vgname=elrepo
logvol /var/ --fstype="ext4" --size=307200 --name=var --vgname=elrepo
# System timezone
# timezone America/New_York --isUtc
timezone Etc/UTC --utc
# Root password
#rootpw --iscrypted $6$PLniOZhY4A1Bzw7r$lIr/uISYu8JvcQKmHOPMRFnh5jUPDB2roCOiFzKJyhDvfMhWPEfTcgQXmuDVt6/IluI1Hco2eM7FZIlMIvRYx/
rootpw --iscrypted $6$BuchMFHTjGCZBEiq$qQIWrxPGuaNWH2JWeh9/SqKuaBYiFWfk1XHtRMQkemERMm8fovi.WPLmyC6aAKI7cJRr5WipTTQ8nHrhFGLPl1
%addon com_redhat_kdump --disable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment