Rocky 10 and 9.6 release
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
distro = "rockylinux"
|
||||||
|
version = "10"
|
||||||
|
iso = {
|
||||||
|
url = "https://download.rockylinux.org/pub/rocky/10.0/isos/x86_64/Rocky-10.0-x86_64-boot.iso"
|
||||||
|
checksum = "2bb073606d8d83cbd3c0e25c5e6cd8e5c60c0e989e6e84f0c415c05e163640d3"
|
||||||
|
}
|
||||||
|
boot_command = [
|
||||||
|
"<up>e<wait>",
|
||||||
|
"<down><down><end><wait>",
|
||||||
|
" inst.text inst.ks=cdrom:/ks.cfg",
|
||||||
|
" inst.notmux ",
|
||||||
|
"<leftCtrlOn>x<leftCtrlOff>"
|
||||||
|
]
|
||||||
|
cd_files = [ "distros/rockylinux/10/disc/*" ]
|
||||||
|
vbox_os_type = "RedHat10_64"
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
url --mirrorlist=http://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=rocky-BaseOS-$releasever
|
||||||
|
repo --name=AppStream --mirrorlist=http://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=rocky-AppStream-$releasever
|
||||||
|
network --bootproto=dhcp --activate
|
||||||
|
reboot
|
||||||
|
|
||||||
|
text
|
||||||
|
keyboard --vckeymap us
|
||||||
|
lang en_US
|
||||||
|
skipx
|
||||||
|
rootpw --plaintext vagrant
|
||||||
|
firewall --disabled
|
||||||
|
timezone --utc UTC
|
||||||
|
services --enabled=vmtoolsd
|
||||||
|
# The biosdevname and ifnames options ensure we get "eth0" as our interface
|
||||||
|
# even in environments like virtualbox that emulate a real NW card
|
||||||
|
bootloader --timeout=1 --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop"
|
||||||
|
clearpart --all
|
||||||
|
autopart --type=plain
|
||||||
|
zerombr
|
||||||
|
|
||||||
|
user --name=vagrant --plaintext --password=vagrant
|
||||||
|
|
||||||
|
%packages --inst-langs=en
|
||||||
|
bash-completion
|
||||||
|
man-pages
|
||||||
|
bzip2
|
||||||
|
rsync
|
||||||
|
nfs-utils
|
||||||
|
cifs-utils
|
||||||
|
chrony
|
||||||
|
yum-utils
|
||||||
|
hyperv-daemons
|
||||||
|
open-vm-tools
|
||||||
|
# Vagrant boxes aren't normally visible, no need for Plymouth
|
||||||
|
-plymouth
|
||||||
|
# Microcode updates cannot work in a VM
|
||||||
|
-microcode_ctl
|
||||||
|
# Firmware packages are not needed in a VM
|
||||||
|
-iwl100-firmware
|
||||||
|
-iwl1000-firmware
|
||||||
|
-iwl105-firmware
|
||||||
|
-iwl135-firmware
|
||||||
|
-iwl2000-firmware
|
||||||
|
-iwl2030-firmware
|
||||||
|
-iwl3160-firmware
|
||||||
|
-iwl3945-firmware
|
||||||
|
-iwl4965-firmware
|
||||||
|
-iwl5000-firmware
|
||||||
|
-iwl5150-firmware
|
||||||
|
-iwl6000-firmware
|
||||||
|
-iwl6000g2a-firmware
|
||||||
|
-iwl6050-firmware
|
||||||
|
-iwl7260-firmware
|
||||||
|
# Don't build rescue initramfs
|
||||||
|
-dracut-config-rescue
|
||||||
|
%end
|
||||||
|
|
||||||
|
# kdump needs to reserve 160MB + 2bits/4kB RAM, and automatic allocation only
|
||||||
|
# works on systems with at least 2GB RAM (which excludes most Vagrant boxes)
|
||||||
|
# CBS doesn't support %addon yet https://bugs.centos.org/view.php?id=12169
|
||||||
|
%addon com_redhat_kdump --disable
|
||||||
|
%end
|
||||||
|
|
||||||
|
%post --erroronfail
|
||||||
|
dnf update -y
|
||||||
|
|
||||||
|
# configure swap to a file
|
||||||
|
fallocate -l 2G /swapfile
|
||||||
|
chmod 600 /swapfile
|
||||||
|
mkswap /swapfile
|
||||||
|
echo "/swapfile none swap defaults 0 0" >> /etc/fstab
|
||||||
|
|
||||||
|
# sudo
|
||||||
|
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
|
||||||
|
chmod 0440 /etc/sudoers.d/vagrant
|
||||||
|
|
||||||
|
# Fix for https://github.com/CentOS/sig-cloud-instance-build/issues/38
|
||||||
|
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
|
||||||
|
DEVICE="eth0"
|
||||||
|
BOOTPROTO="dhcp"
|
||||||
|
ONBOOT="yes"
|
||||||
|
TYPE="Ethernet"
|
||||||
|
PERSISTENT_DHCLIENT="yes"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# sshd: disable password authentication and DNS checks
|
||||||
|
ex -s /etc/ssh/sshd_config <<EOF
|
||||||
|
:%substitute/^.*\(PasswordAuthentication\) yes$/\1 yes/
|
||||||
|
:%substitute/^#\(UseDNS\) yes$/&\r\1 no/
|
||||||
|
:update
|
||||||
|
:quit
|
||||||
|
EOF
|
||||||
|
cat >>/etc/sysconfig/sshd <<EOF
|
||||||
|
|
||||||
|
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||||
|
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Fix for issue #76, regular users can gain admin privileges via su
|
||||||
|
ex -s /etc/pam.d/su <<'EOF'
|
||||||
|
# allow vagrant to use su, but prevent others from becoming root or vagrant
|
||||||
|
/^account\s\+sufficient\s\+pam_succeed_if.so uid = 0 use_uid quiet$/
|
||||||
|
:append
|
||||||
|
account [success=1 default=ignore] \
|
||||||
|
pam_succeed_if.so user = vagrant use_uid quiet
|
||||||
|
account required pam_succeed_if.so user notin root:vagrant
|
||||||
|
.
|
||||||
|
:update
|
||||||
|
:quit
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# systemd should generate a new machine id during the first boot, to
|
||||||
|
# avoid having multiple Vagrant instances with the same id in the local
|
||||||
|
# network. /etc/machine-id should be empty, but it must exist to prevent
|
||||||
|
# boot errors (e.g. systemd-journald failing to start).
|
||||||
|
:>/etc/machine-id
|
||||||
|
|
||||||
|
echo 'vag' > /etc/yum/vars/infra
|
||||||
|
|
||||||
|
# Blacklist the floppy module to avoid probing timeouts
|
||||||
|
echo blacklist floppy > /etc/modprobe.d/nofloppy.conf
|
||||||
|
chcon -u system_u -r object_r -t modules_conf_t /etc/modprobe.d/nofloppy.conf
|
||||||
|
|
||||||
|
# Customize the initramfs
|
||||||
|
pushd /etc/dracut.conf.d
|
||||||
|
# Enable VMware PVSCSI support for VMware Fusion guests.
|
||||||
|
echo 'add_drivers+=" vmw_pvscsi "' > vmware-fusion-drivers.conf
|
||||||
|
echo 'add_drivers+=" hv_netvsc hv_storvsc hv_utils hv_vmbus hid-hyperv "' > hyperv-drivers.conf
|
||||||
|
# There's no floppy controller, but probing for it generates timeouts
|
||||||
|
echo 'omit_drivers+=" floppy "' > nofloppy.conf
|
||||||
|
popd
|
||||||
|
# Fix the SELinux context of the new files
|
||||||
|
restorecon -f - <<EOF
|
||||||
|
/etc/sudoers.d/vagrant
|
||||||
|
/etc/dracut.conf.d/vmware-fusion-drivers.conf
|
||||||
|
/etc/dracut.conf.d/hyperv-drivers.conf
|
||||||
|
/etc/dracut.conf.d/nofloppy.conf
|
||||||
|
EOF
|
||||||
|
|
||||||
|
virt="$(systemd-detect-virt)"
|
||||||
|
if [ "${virt}" == "microsoft" ]; then
|
||||||
|
systemctl enable hpervfcopyd
|
||||||
|
systemctl enable hypervkvpd
|
||||||
|
systemctl enable hypervvssd
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rerun dracut for the installed kernel (not the running kernel):
|
||||||
|
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
|
||||||
|
dracut -f /boot/initramfs-${KERNEL_VERSION}.img ${KERNEL_VERSION}
|
||||||
|
|
||||||
|
# Seal for deployment
|
||||||
|
rm -rf /etc/ssh/ssh_host_*
|
||||||
|
hostnamectl set-hostname localhost.localdomain
|
||||||
|
rm -rf /etc/udev/rules.d/70-*
|
||||||
|
%end
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
dnf clean all
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
dnf install -y qemu-guest-agent
|
||||||
|
systemctl start qemu-guest-agent
|
||||||
|
systemctl enable qemu-guest-agent
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
packages=(bzip2 kernel-devel kernel-headers make perl gcc)
|
||||||
|
dnf install -y "${packages[@]}"
|
||||||
|
mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt
|
||||||
|
/mnt/VBoxLinuxAdditions.run install --nox11 2>&1 | tee /root/vbox_addon_install.log
|
||||||
|
umount /mnt
|
||||||
|
rm /home/vagrant/VBoxGuestAdditions.iso
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
dnf install -y open-vm-tools
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
distro = "rockylinux"
|
distro = "rockylinux"
|
||||||
version = "9"
|
version = "9"
|
||||||
iso = {
|
iso = {
|
||||||
url = "https://download.rockylinux.org/pub/rocky/9.5/isos/x86_64/Rocky-9.5-x86_64-boot.iso"
|
url = "https://download.rockylinux.org/pub/rocky/9.6/isos/x86_64/Rocky-9.6-x86_64-boot.iso"
|
||||||
checksum = "628c069c9685477360640a6b58dc919692a11c44b49a50a024b5627ce3c27d5f"
|
checksum = "0fad8d8b19a94a0222ea37152cdf5601229fe0178b651dc476e1cba41d2e6067"
|
||||||
}
|
}
|
||||||
boot_command = [
|
boot_command = [
|
||||||
"<up>e<wait>",
|
"<up>e<wait>",
|
||||||
|
|||||||
@@ -9,4 +9,9 @@
|
|||||||
arch = "amd64";
|
arch = "amd64";
|
||||||
eol = false;
|
eol = false;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
version = "10";
|
||||||
|
arch = "amd64";
|
||||||
|
eol = false;
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user