Initial commit

This commit is contained in:
Guofang committed 2026-08-26 12:36:30 +08:00
commit 58a0a2d1ff
24 files changed
+1156

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
seed.iso
*.iso
+13
View File
@@ -0,0 +1,13 @@
# AlmaLinux 10 seed.iso
This directory contains the cloud-init NoCloud configuration used by
`run-almalinux10.sh`.
After changing `user-data`, `meta-data`, or `network-config`, remove the old
`seed.iso` and rebuild it:
```bash
./seediso/almalinux10/build-seed.sh
```
Use a unique `instance-id` when cloning this configuration for another VM.
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
output="${1:-${script_dir}/seed.iso}"
files=(user-data meta-data)
mkdir -p "$(dirname -- "$output")"
if [[ -f "${script_dir}/network-config" ]]; then
files+=(network-config)
fi
if command -v cloud-localds >/dev/null 2>&1; then
args=()
if [[ -f "${script_dir}/network-config" ]]; then
args+=(--network-config="${script_dir}/network-config")
fi
cloud-localds "${args[@]}" "$output" \
"${script_dir}/user-data" "${script_dir}/meta-data"
elif command -v xorriso >/dev/null 2>&1; then
xorriso -as mkisofs -quiet -volid cidata -joliet -rock \
-output "$output" "${files[@]/#/${script_dir}/}"
elif command -v genisoimage >/dev/null 2>&1; then
genisoimage -quiet -output "$output" -volid cidata -joliet -rock \
"${files[@]/#/${script_dir}/}"
elif command -v mkisofs >/dev/null 2>&1; then
mkisofs -quiet -output "$output" -volid cidata -joliet -rock \
"${files[@]/#/${script_dir}/}"
else
printf 'Error: install cloud-image-utils, xorriso, genisoimage, or mkisofs.\n' >&2
exit 1
fi
printf 'Created %s\n' "$output"
+2
View File
@@ -0,0 +1,2 @@
instance-id: almalinux10-host-001
local-hostname: almalinux10-host
+10
View File
@@ -0,0 +1,10 @@
version: 2
ethernets:
all-en:
match:
name: "en*"
dhcp4: true
all-eth:
match:
name: "eth*"
dhcp4: true
+16
View File
@@ -0,0 +1,16 @@
#cloud-config
preserve_hostname: false
manage_etc_hosts: true
ssh_pwauth: true
users:
- name: guofang
gecos: Guofang
groups: [wheel]
shell: /bin/bash
sudo: "ALL=(ALL) NOPASSWD: ALL"
lock_passwd: false
hashed_passwd: $6$0NtCERV3eO12t9oJ$nlFE2sSc66nFfuD5X0xMnOla1cuzOnHfeGNRY5X7dCDHg.WzWVmuRe7M17Puj44.eCWLnJAWt4WNjd9vP9X0D0
chpasswd:
expire: false