在 Debian 环境下使用 Cobbler 重装系统,通常有两种常见场景:
下面按步骤说明。
确保你已经:
cobbler、cobbler-web示例:
cobbler distro list
cobbler profile list
mount /iso/debian-12.iso /mnt
cobbler import --path=/mnt --name=debian12 --arch=x86_64
debian12-x86_64)✅ 适合:裸机、重装整机
适合:系统还能开机,但想重装
apt install koan
koan --server=cobbler-server-ip --list-profiles
koan --server=cobbler-server-ip --profile=debian12-x86_64 --replace-self
reboot
重启后会自动进入 Cobbler 安装流程。
Debian 一般用 preseed
示例:
cobbler profile edit --name=debian12-x86_64 \
--kickstart=/var/lib/cobbler/kickstarts/debian.preseed
d-i mirror/country string manual
d-i mirror/http/hostname string deb.debian.org
d-i passwd/root-password password xxx
cobbler check
cobbler sync
manage_dhcp: 1/etc/cobbler/dhcp.templatecurl http://cobbler-ip/cobbler/
| 场景 | 方法 |
|---|---|
| 裸机/整机重装 | PXE + Cobbler profile |
| 已开机系统重装 | koan --replace-self |
| 批量部署 | profile + preseed |
如果你愿意,可以告诉我:
我可以给你一份可直接用的配置示例。