Initial commit
This commit is contained in:
commit
58a0a2d1ff
24 files changed
+1156
No files matched your search
@@ -0,0 +1,2 @@
|
||||
seed.iso
|
||||
*.iso
|
||||
@@ -0,0 +1,21 @@
|
||||
# Debian 13 seed.iso
|
||||
|
||||
This directory contains the cloud-init NoCloud configuration used by
|
||||
`run-debian13.sh`.
|
||||
|
||||
1. Edit `user-data`, `meta-data`, and (if needed) `network-config`.
|
||||
2. Build the image:
|
||||
|
||||
```bash
|
||||
./seediso/debian13/build-seed.sh
|
||||
```
|
||||
|
||||
To choose another output path:
|
||||
|
||||
```bash
|
||||
./seediso/debian13/build-seed.sh /path/to/seed.iso
|
||||
```
|
||||
|
||||
The script uses `cloud-localds` when available, then falls back to `xorriso`,
|
||||
`genisoimage`, or `mkisofs`. Attach the resulting ISO as a CD-ROM when booting
|
||||
a cloud-init-enabled virtual machine.
|
||||
Executable
+35
@@ -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}"
|
||||
@@ -0,0 +1,2 @@
|
||||
instance-id: debian13-host-001
|
||||
local-hostname: debian13-host
|
||||
@@ -0,0 +1,10 @@
|
||||
version: 2
|
||||
ethernets:
|
||||
all-en:
|
||||
match:
|
||||
name: "en*"
|
||||
dhcp4: true
|
||||
all-eth:
|
||||
match:
|
||||
name: "eth*"
|
||||
dhcp4: true
|
||||
@@ -0,0 +1,45 @@
|
||||
#cloud-config
|
||||
preserve_hostname: false
|
||||
manage_etc_hosts: true
|
||||
ssh_pwauth: true
|
||||
|
||||
users:
|
||||
- name: guofang
|
||||
gecos: Guofang
|
||||
groups: [sudo]
|
||||
shell: /bin/bash
|
||||
sudo: "ALL=(ALL) NOPASSWD: ALL"
|
||||
lock_passwd: false
|
||||
ssh_authorized_keys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCwsF2ZDSHDaXM9BdDq3Vxkp6T+DJEakKaVZQJUEHexS34mbrxYAxmGBUPCrddfE01dS31kGS4XHVBa+wGUYodY+nPwnrfD1Q4phKVSzXr65K1Y/sCcjSiANBPWpv2Xd7IMOfLlrdLtmf5QcKWroIqO2LaIDGECwzUUHrfprgeaF9N0FGcmrgbmm23JUk+f6guRQ4br88L4rWIWEBvL9bTdwErNkdfsYE2F/U8aIFpMcVy2eJIOgy8ZjZvkGdm4r730YkTDL1VmAjiHH3/m2R1EOvwLzFhyWKoa4ULk/IQW+8iNnG42QEcaWRM+hMwlVdnNhPJP6WzS+fAEbibD3zM0q2X/4ex+cXRNOCd2/0KhnD2+3p1BM5QeFTzDappkk8W2meQkDE3hvTjtIQCzygFO6LNWtEEa7BTvvlMqF3CZWh88J9XiP750SjESe3Ge5o9A0T2hcJa+KZ1LxVEmNt4nD6E/OD4EymoaLIJZ1fH5ksSFjHzJ+mJouSVjc/H/VSE= guofang@GUOFANG-OFFICE
|
||||
hashed_passwd: $6$0NtCERV3eO12t9oJ$nlFE2sSc66nFfuD5X0xMnOla1cuzOnHfeGNRY5X7dCDHg.WzWVmuRe7M17Puj44.eCWLnJAWt4WNjd9vP9X0D0
|
||||
|
||||
chpasswd:
|
||||
expire: false
|
||||
|
||||
apt:
|
||||
primary:
|
||||
- arches: [default]
|
||||
uri: "https://mirrors.ustc.edu.cn/debian"
|
||||
security:
|
||||
- arches: [default]
|
||||
uri: "https://mirrors.ustc.edu.cn/debian-security"
|
||||
# http_proxy: "http://10.15.112.151:3128/"
|
||||
# https_proxy: "http://10.15.112.151:3128/"
|
||||
# http_proxy: "socks5h://10.0.2.2:1080/"
|
||||
# https_proxy: "socks5h://10.0.2.2:1080/"
|
||||
|
||||
# package_update: true
|
||||
|
||||
# packages:
|
||||
# - task-gnome-desktop
|
||||
|
||||
# runcmd:
|
||||
# - systemctl set-default graphical.target
|
||||
# - systemctl enable gdm3.service
|
||||
|
||||
# power_state:
|
||||
# delay: now
|
||||
# mode: reboot
|
||||
# message: "Cloud-init configuration completed; rebooting."
|
||||
# condition: true
|
||||
Reference in new issue
Block a user