Compare commits

..

No commits in common. "deeac2a61bc43cb4596579d8e21f0a2423e0f153" and "67c93616884257c9698d4ed0f3a65c2343f6427d" have entirely different histories.

19 changed files with 71 additions and 368 deletions

View File

@ -28,34 +28,15 @@ services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud
# System bootloader configuration # System bootloader configuration
bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1
# Clear the Master Boot Record # Clear the Master Boot Record
#zerombr zerombr
# Partition clearing information # Partition clearing information
#clearpart --all --initlabel --disklabel=gpt clearpart --all --initlabel --disklabel=gpt
# Disk partitioning information # Disk partitioning information
part biosboot --fstype="biosboot" --size=1
part /boot/efi --fstype="efi" --size=100 part /boot/efi --fstype="efi" --size=100
part /boot --fstype="xfs" --size=1000 --label=boot part /boot --fstype="xfs" --size=1000 --label=boot
part prepboot --fstype=biosboot --asprimary --onpart=vda3
part biosboot --fstype="biosboot" --size=1
part / --fstype="xfs" --grow --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0" part / --fstype="xfs" --grow --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0"
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary xfs 1106MiB 10.7GB
%end
%post --erroronfail %post --erroronfail
passwd -d root passwd -d root
passwd -l root passwd -l root
@ -218,7 +199,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -28,33 +28,17 @@ selinux --enforcing
services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd"
# System bootloader configuration # System bootloader configuration
bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1
part /boot/efi --fstype=efi --asprimary --onpart=vda1
part /boot --fstype=xfs --label=boot --onpart=vda2
part prepboot --fstype=biosboot --asprimary --onpart=vda3
part biosboot --fstype=biosboot --asprimary --onpart=vda4
part pv.01 --grow --onpart=vda5
volgroup rocky pv.01
logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions="-m bigtime=0,inobtcount=0"
%pre
# Clear the Master Boot Record # Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1 zerombr
# Create a new GPT partition table # Partition clearing information
parted /dev/vda mklabel gpt clearpart --all --initlabel --disklabel=gpt
# Create a partition for /boot/efi # Disk partitioning information
parted /dev/vda mkpart primary fat32 1MiB 100MiB part biosboot --fstype="biosboot" --size=1
parted /dev/vda set 1 boot on part /boot/efi --fstype="efi" --size=100
# Create a partition for /boot part /boot --fstype="xfs" --size=1000 --label=boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB part pv.01 --grow --ondisk=vda --size=1
# Create a partition for prep volgroup rocky pv.01
parted /dev/vda mkpart primary 1100MiB 1104MiB logvol / --grow --size=8000 --name=root --vgname=rocky
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%post --erroronfail %post --erroronfail
passwd -d root passwd -d root
@ -218,7 +202,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -31,6 +31,7 @@ dbus-broker-launch --scope=none
# Package setup # Package setup
%packages --ignoremissing --excludedocs --instLangs=en --nocore --excludeWeakdeps %packages --ignoremissing --excludedocs --instLangs=en --nocore --excludeWeakdeps
bash bash
dbus-daemon
coreutils-single coreutils-single
glibc-minimal-langpack glibc-minimal-langpack
microdnf microdnf

View File

@ -1,104 +0,0 @@
# This is a minimal Rocky kickstart designed for docker.
# It will not produce a bootable system
# To use this kickstart, run make
# Basic setup information
url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/
text
bootloader --disable
firewall --disabled
network --bootproto=dhcp --device=link --activate --onboot=on
rootpw --lock --iscrypted locked
selinux --disabled
shutdown
keyboard us
lang en_US.UTF-8
timezone --isUtc --nontp UTC
# Disk setup
zerombr
clearpart --all --initlabel
autopart --noboot --nohome --noswap --nolvm --fstype=ext4
%pre
dbus-broker-launch --scope=none
%end
%addon com_redhat_kdump --disable
%end
# Package setup
%packages --ignoremissing --excludedocs --instLangs=en --nocore --excludeWeakdeps
bash
binutils
coreutils-single
glibc-minimal-langpack
hostname
iputils # this pulls in systemd, lets ask for it by name, too
less
passwd
rocky-release
rootfiles
tar
vim-minimal
yum
-brotli
-dosfstools
-kexec-tools
-e2fsprogs
-firewalld
-fuse-libs
-gettext*
-gnupg2-smime
-grub\*
-iptables
-kernel
-libss
-os-prober*
-pinentry
-qemu-guest-agent
-shared-mime-info
-trousers
-xfsprogs
-xkeyboard-config
%end
%post --erroronfail --log=/root/anaconda-post.log
# container customizations inside the chroot
# Stay compatible
echo 'container' > /etc/dnf/vars/infra
#Generate installtime file record
/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME
# Limit languages to help reduce size.
LANG="en_US"
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
# https://bugzilla.redhat.com/show_bug.cgi?id=1727489
echo 'LANG="C.UTF-8"' > /etc/locale.conf
# systemd fixes
:> /etc/machine-id
umount /run
systemd-tmpfiles --create --boot
# mask mounts and login bits
systemctl mask \
console-getty.service \
dev-hugepages.mount \
getty.target \
sys-fs-fuse-connections.mount \
systemd-logind.service \
systemd-remount-fs.service
# Cleanup the image
rm -f /etc/udev/hwdb.bin
rm -rf /usr/lib/udev/hwdb.d/ \
/boot /var/lib/dnf/history.* \
/tmp/* /tmp/.* || true
%end

View File

@ -16,35 +16,16 @@ services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud
timezone UTC --isUtc timezone UTC --isUtc
# Disk # Disk
bootloader --append="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10" --location=mbr --timeout=1 bootloader --append="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10" --location=mbr --timeout=1
#zerombr zerombr
#clearpart --all --initlabel --disklabel=gpt clearpart --all --initlabel --disklabel=gpt
#reqpart #reqpart
part biosboot --size=1 --fstype=biosboot --asprimary
part /boot/efi --size=100 --fstype=efi --asprimary part /boot/efi --size=100 --fstype=efi --asprimary
part /boot --size=1024 --fstype=xfs --label=boot part /boot --size=1024 --fstype=xfs --label=boot
part prepboot --fstype=biosboot --asprimary --onpart=vda3
part biosboot --size=1 --fstype=biosboot --asprimary
part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0"
url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary xfs 1106MiB 10.7GB
%end
%post --erroronfail %post --erroronfail
passwd -d root passwd -d root
passwd -l root passwd -l root
@ -135,7 +116,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -16,34 +16,17 @@ services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud
timezone UTC --isUtc timezone UTC --isUtc
# Disk # Disk
bootloader --append="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10" --location=mbr --timeout=1 bootloader --append="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10" --location=mbr --timeout=1
url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ zerombr
clearpart --all --initlabel
part /boot/efi --fstype=efi --asprimary --onpart=vda1 #reqpart
part /boot --fstype=xfs --label=boot --onpart=vda2 part biosboot --size=1 --fstype=biosboot --asprimary
part prepboot --fstype=biosboot --asprimary --onpart=vda3 part /boot/efi --size=100 --fstype=efi --asprimary
part biosboot --fstype=biosboot --asprimary --onpart=vda4 part /boot --size=1024 --fstype=xfs --label=boot
part pv.01 --grow --onpart=vda5 part pv.01 --size=1 --ondisk=vda --grow
volgroup rocky pv.01 volgroup rocky pv.01
logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions="-m bigtime=0,inobtcount=0" logvol / --vgname=rocky --size=8000 --name=root --grow --fstype=xfs --mkfsoptions "-m bigtime=0,inobtcount=0"
%pre url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%post --erroronfail %post --erroronfail
passwd -d root passwd -d root
@ -135,7 +118,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -19,33 +19,14 @@ rootpw --iscrypted thereisnopasswordanditslocked
zerombr zerombr
clearpart --all --initlabel --disklabel=gpt clearpart --all --initlabel --disklabel=gpt
#reqpart #reqpart
part biosboot --size=1 --fstype=biosboot --asprimary
part /boot/efi --size=100 --fstype=efi --asprimary part /boot/efi --size=100 --fstype=efi --asprimary
part /boot --size=1000 --fstype=xfs --label=boot part /boot --size=1000 --fstype=xfs --label=boot
part prepboot --fstype=biosboot --asprimary --onpart=vda3
part biosboot --size=1 --fstype=biosboot --asprimary
part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow
shutdown shutdown
url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary xfs 1106MiB 10.7GB
%end
%packages %packages
@core @core
chrony chrony
@ -199,7 +180,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -14,36 +14,20 @@ network --hostname=localhost.localdomain
# Root password # Root password
services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd"
rootpw --iscrypted thereisnopasswordanditslocked rootpw --iscrypted thereisnopasswordanditslocked
url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/
shutdown
# Partition stuff # Partition stuff
part /boot/efi --fstype=efi --asprimary --onpart=vda1 zerombr
part /boot --fstype=xfs --label=boot --onpart=vda2 clearpart --all --initlabel --disklabel=gpt
part prepboot --fstype=biosboot --asprimary --onpart=vda3 #reqpart
part biosboot --fstype=biosboot --asprimary --onpart=vda4 part biosboot --size=1 --fstype=biosboot --asprimary
part pv.01 --grow --onpart=vda5 part /boot/efi --size=100 --fstype=efi --asprimary
part /boot --size=1000 --fstype=xfs --label=boot
part pv.01 --size=1 --ondisk=vda --grow
volgroup rocky pv.01 volgroup rocky pv.01
logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions="-m bigtime=0,inobtcount=0" logvol / --vgname=rocky --size=8000 --name=root --grow
shutdown
%pre url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%packages %packages
@core @core
@ -197,7 +181,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -28,35 +28,18 @@ selinux --enforcing
# System services # System services
services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd"
# System bootloader configuration # System bootloader configuration
bootloader --append="console=ttyS0,115200n8 console=tty0 no_timer_check crashkernel=auto net.ifnames=0 LANG=en_US.UTF-8 transparent_hugepage=never rd.luks=0 rd.md=0 rd.dm=0 rd.lvm.vg=rocky rd.lvm.lv=rocky/root rd.net.timeout.dhcp=10 libiscsi.debug_libiscsi_eh=1 netroot=iscsi:169.254.0.2:::1:iqn.2015-02.oracle.boot:uefi ip=dhcp rd.iscsi.bypass rd.iscsi.param=node.session.timeo.replacement_timeout=6000" --location=mbr --timeout=1 --boot-drive=vda bootloader --append="console=ttyS0,115200n8 console=tty0 no_timer_check crashkernel=auto net.ifnames=0 LANG=en_US.UTF-8 transparent_hugepage=never rd.luks=0 rd.md=0 rd.dm=0 rd.lvm.vg=rocky rd.lvm.lv=rocky/root rd.net.timeout.dhcp=10" --location=mbr --timeout=1
# Disk partitioning information
part /boot/efi --fstype="efi" --onpart=vda1
part /boot --fstype="xfs" --label=boot --onpart=vda2
part prepboot --fstype="prepboot" --onpart=vda3
part biosboot --fstype="biosboot" --onpart=vda4
part pv.01 --grow --size=1 --onpart=vda5
volgroup rocky pv.01
logvol / --grow --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0" --name=root --vgname=rocky
%pre
# Clear the Master Boot Record # Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1 zerombr
# Create a new GPT partition table # Partition clearing information
parted /dev/vda mklabel gpt clearpart --all --initlabel --disklabel=gpt
# Create a partition for /boot/efi # Disk partitioning information
parted /dev/vda mkpart primary fat32 1MiB 100MiB part biosboot --fstype="biosboot" --size=1
parted /dev/vda set 1 boot on part /boot/efi --fstype="efi" --size=100
# Create a partition for /boot part /boot --fstype="xfs" --size=1000 --label=boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB part pv.01 --grow --ondisk=vda --size=1
# Create a partition for prep volgroup rocky pv.01
parted /dev/vda mkpart primary 1100MiB 1104MiB logvol / --grow --size=8000 --name=root --vgname=rocky
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%post --erroronfail %post --erroronfail
# Attempting to force legacy BIOS boot if we boot from UEFI # Attempting to force legacy BIOS boot if we boot from UEFI
@ -133,7 +116,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg
@ -291,6 +273,9 @@ base64 -d <<<"$OCICLOUDCFG" >> /etc/cloud/cloud.cfg.d/99_oci.cfg
KERNEL_VERSION=$(rpm -q kernel --qf '%%{V}-%%{R}.%%{arch}\n') KERNEL_VERSION=$(rpm -q kernel --qf '%%{V}-%%{R}.%%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
# OCI needs Iscsi
grubby --args="libiscsi.debug_libiscsi_eh=1 netroot=iscsi:169.254.0.2:::1:iqn.2015-02.oracle.boot:uefi ip=dhcp rd.iscsi.bypass rd.iscsi.param=node.session.timeo.replacement_timeout=6000" --update-kernel "/boot/vmlinuz-$KERNEL_VERSION"
passwd -d root passwd -d root
passwd -l root passwd -l root

View File

@ -25,35 +25,16 @@ skipx
# System services # System services
services --enabled="vmtoolsd" services --enabled="vmtoolsd"
# System bootloader configuration # System bootloader configuration
bootloader --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop rd.lvm.vg=rocky rd.lvm.lv=rocky/root" --location=mbr --timeout=1 bootloader --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop" --location=mbr --timeout=1
# Disk partitioning information
part /boot/efi --fstype="efi" --onpart=vda1
part /boot --fstype="xfs" --label=boot --onpart=vda2
part prepboot --fstype="prepboot" --onpart=vda3
part biosboot --fstype="biosboot" --onpart=vda4
part pv.01 --grow --size=1 --onpart=vda5
volgroup rocky pv.01
logvol / --grow --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0" --name=root --vgname=rocky
%pre
# Clear the Master Boot Record # Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1 zerombr
# Create a new GPT partition table # Partition clearing information
parted /dev/vda mklabel gpt clearpart --all --initlabel --disklabel=gpt
# Create a partition for /boot/efi # Disk partitioning information
parted /dev/vda mkpart primary fat32 1MiB 100MiB part biosboot --size=1 --fstype=biosboot --asprimary
parted /dev/vda set 1 boot on part /boot/efi --size=100 --fstype=efi --asprimary
# Create a partition for /boot part /boot --size=1000 --fstype=xfs --label=boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%post %post
# Attempting to force legacy BIOS boot if we boot from UEFI # Attempting to force legacy BIOS boot if we boot from UEFI

View File

@ -166,7 +166,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -166,7 +166,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -1,27 +1,6 @@
#zerombr zerombr
#clearpart --all --initlabel --disklabel=gpt clearpart --all --initlabel --disklabel=gpt
part biosboot --size=1 --fstype=biosboot --asprimary
part /boot/efi --size=100 --fstype=efi --asprimary part /boot/efi --size=100 --fstype=efi --asprimary
part /boot --size=1000 --fstype=xfs --label=boot part /boot --size=1000 --fstype=xfs --label=boot
part prepboot --fstype=biosboot --asprimary --onpart=vda3
part biosboot --size=1 --fstype=biosboot --asprimary
part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary xfs 1106MiB 10.7GB
%end

View File

@ -1,28 +1,8 @@
part /boot/efi --fstype=efi --asprimary --onpart=vda1 zerombr
part /boot --fstype=xfs --label=boot --onpart=vda2 clearpart --all --initlabel --disklabel=gpt
part prepboot --fstype=biosboot --asprimary --onpart=vda3 part biosboot --size=1 --fstype=biosboot --asprimary
part biosboot --fstype=biosboot --asprimary --onpart=vda4 part /boot/efi --size=100 --fstype=efi --asprimary
part pv.01 --grow --onpart=vda5 part /boot --size=1000 --fstype=xfs --label=boot
part pv.01 --size=1 --ondisk=vda --grow
volgroup rocky pv.01 volgroup rocky pv.01
logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions="-m bigtime=0,inobtcount=0" logvol / --vgname=rocky --size=8000 --name=root --grow
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end

View File

@ -80,7 +80,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -80,7 +80,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -83,7 +83,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -83,7 +83,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg

View File

@ -2,7 +2,7 @@
%include rocky-cloud-parts-lvm.ks %include rocky-cloud-parts-lvm.ks
%include rocky-cloud-ocp-packages.ks %include rocky-cloud-ocp-packages.ks
bootloader --append="console=ttyS0,115200n8 console=tty0 no_timer_check crashkernel=auto net.ifnames=0 LANG=en_US.UTF-8 transparent_hugepage=never rd.luks=0 rd.md=0 rd.dm=0 rd.lvm.vg=rocky rd.lvm.lv=rocky/root rd.net.timeout.dhcp=10" --location=mbr --timeout=1 --boot-drive=vda bootloader --append="console=ttyS0,115200n8 console=tty0 no_timer_check crashkernel=auto net.ifnames=0 LANG=en_US.UTF-8 transparent_hugepage=never rd.luks=0 rd.md=0 rd.dm=0 rd.lvm.vg=rocky rd.lvm.lv=rocky/root rd.net.timeout.dhcp=10" --location=mbr --timeout=1
repo --name="oraclelinux-addons" --baseurl=http://yum.oracle.com/repo/OracleLinux/OL8/addons/$basearch/ --install --includepkgs="oci-utils" repo --name="oraclelinux-addons" --baseurl=http://yum.oracle.com/repo/OracleLinux/OL8/addons/$basearch/ --install --includepkgs="oci-utils"
%post --erroronfail %post --erroronfail
@ -80,7 +80,6 @@ EOL
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# rocky cloud user # rocky cloud user
sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg
echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg