[101351] | 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 |
|
---|
[67881] | 4 | #platform=x86, AMD64, or Intel EM64T
|
---|
| 5 | #version=DEVEL
|
---|
| 6 |
|
---|
| 7 | # Firewall configuration
|
---|
| 8 | firewall --disabled
|
---|
| 9 |
|
---|
| 10 | # Install OS instead of upgrade
|
---|
[101351] | 11 | # Removed from kickstart file syntax in OL9
|
---|
| 12 | #install
|
---|
[67881] | 13 |
|
---|
| 14 | # Use CDROM installation media
|
---|
| 15 | cdrom
|
---|
| 16 |
|
---|
| 17 | # Root password
|
---|
| 18 | rootpw --plaintext @@VBOX_INSERT_ROOT_PASSWORD_SH@@
|
---|
| 19 |
|
---|
[101351] | 20 | # auth or authconfig is deprecated in OL8
|
---|
[67881] | 21 | # System authorization information
|
---|
[101351] | 22 | #auth --useshadow --passalgo=sha512
|
---|
[67881] | 23 |
|
---|
| 24 | # Use text mode install
|
---|
| 25 | text
|
---|
| 26 |
|
---|
| 27 | # System keyboard
|
---|
| 28 | keyboard us
|
---|
| 29 |
|
---|
| 30 | # System language
|
---|
[68202] | 31 | lang @@VBOX_INSERT_LOCALE@@
|
---|
[67881] | 32 |
|
---|
| 33 | # Disable the unsupported hardware popup (vmmdev?).
|
---|
[101351] | 34 | # Removed from kickstart file syntax in OL9
|
---|
| 35 | #unsupported_hardware
|
---|
[67881] | 36 |
|
---|
| 37 | # SELinux configuration
|
---|
| 38 | selinux --enforcing
|
---|
| 39 |
|
---|
[101351] | 40 | # Deprecated in OL9
|
---|
[67881] | 41 | # Installation logging level
|
---|
[101351] | 42 | #logging --level=info
|
---|
[67881] | 43 |
|
---|
| 44 | # System timezone
|
---|
[68202] | 45 | timezone@@VBOX_COND_IS_RTC_USING_UTC@@ --utc@@VBOX_COND_END@@ @@VBOX_INSERT_TIME_ZONE_UX@@
|
---|
[67881] | 46 |
|
---|
| 47 | # Network information
|
---|
[86269] | 48 | network --bootproto=dhcp --device=link --onboot=on --hostname=@@VBOX_INSERT_HOSTNAME_FQDN_SH@@
|
---|
[67881] | 49 |
|
---|
| 50 | # System bootloader configuration
|
---|
| 51 | bootloader --location=mbr --append="nomodeset crashkernel=auto rhgb quiet"
|
---|
| 52 | zerombr
|
---|
| 53 |
|
---|
| 54 | # Partition clearing information
|
---|
| 55 | clearpart --all --initlabel
|
---|
| 56 |
|
---|
| 57 | # Disk partitioning information
|
---|
[101697] | 58 | @@VBOX_COND_IS_FIRMWARE_UEFI@@
|
---|
| 59 | part /boot/efi --fstype=efi --grow --maxsize=200 --size=20
|
---|
| 60 | part /boot --fstype=ext4 --size=512
|
---|
| 61 | @@VBOX_COND_END@@
|
---|
| 62 |
|
---|
[69387] | 63 | part / --fstype ext4 --size 6000 --grow --asprimary
|
---|
| 64 | part swap --size 1024
|
---|
[67881] | 65 |
|
---|
| 66 | #Initial user
|
---|
[86269] | 67 | user --name=@@VBOX_INSERT_USER_LOGIN_SH@@ --password=@@VBOX_INSERT_USER_PASSWORD_SH@@ --plaintext
|
---|
[67881] | 68 |
|
---|
| 69 | # Reboot after installation
|
---|
[68202] | 70 | # Note! Not sure exctly when the --eject option was added. Need to find out an make it optional.
|
---|
| 71 | reboot --eject
|
---|
[67881] | 72 |
|
---|
[68202] | 73 | # Packages. We currently ignore missing packages/groups here to keep things simpler.
|
---|
| 74 | %packages --ignoremissing
|
---|
[67881] | 75 | @base
|
---|
| 76 | @core
|
---|
[68202] | 77 | @@VBOX_COND_IS_NOT_MINIMAL_INSTALLATION@@
|
---|
[67881] | 78 | @development
|
---|
[68202] | 79 | @basic-desktop
|
---|
[67881] | 80 | @desktop-debugging
|
---|
[68202] | 81 | @desktop-platform
|
---|
[67881] | 82 | @fonts
|
---|
[68202] | 83 | @general-desktop
|
---|
[67881] | 84 | @graphical-admin-tools
|
---|
| 85 | @remote-desktop-clients
|
---|
| 86 | @x11
|
---|
[68202] | 87 | @@VBOX_COND_END@@
|
---|
| 88 |
|
---|
| 89 | # Prepare building the additions kernel module, try get what we can from the cdrom as it may be impossible
|
---|
| 90 | # to install anything from the post script:
|
---|
| 91 | kernel-headers
|
---|
| 92 | kernel-devel
|
---|
| 93 | glibc-devel
|
---|
| 94 | glibc-headers
|
---|
| 95 | gcc
|
---|
[93954] | 96 | @@VBOX_COND[${GUEST_OS_VERSION} vgt 8.0.0]@@
|
---|
[86269] | 97 | elfutils-libelf-devel
|
---|
[86659] | 98 | @@VBOX_COND_END@@
|
---|
[68202] | 99 | dkms
|
---|
| 100 | make
|
---|
| 101 | bzip2
|
---|
| 102 | perl
|
---|
| 103 |
|
---|
[87895] | 104 | #Package cloud-init is needed for possible automation the initial setup of virtual machine
|
---|
| 105 | cloud-init
|
---|
| 106 |
|
---|
[67881] | 107 | %end
|
---|
| 108 |
|
---|
[68202] | 109 | # Post install happens in a different script.
|
---|
| 110 | # Note! We mount the CDROM explictily here since the location differs between fedora 26 to rhel5
|
---|
| 111 | # and apparently there isn't any way to be certain that anaconda didn't unmount it already.
|
---|
| 112 | %post --nochroot --log=/mnt/sysimage/root/ks-post.log
|
---|
| 113 | df -h
|
---|
| 114 | mkdir -p /tmp/vboxcdrom
|
---|
| 115 | mount /dev/cdrom /tmp/vboxcdrom
|
---|
| 116 | cp /tmp/vboxcdrom/vboxpostinstall.sh /mnt/sysimage/root/vboxpostinstall.sh
|
---|
| 117 | chmod a+x /mnt/sysimage/root/vboxpostinstall.sh
|
---|
| 118 | /bin/bash /mnt/sysimage/root/vboxpostinstall.sh --rhel
|
---|
| 119 | umount /tmp/vboxcdrom
|
---|
[67881] | 120 | %end
|
---|