Cobbler+preseed自动化安装Ubuntu系统

简介:

Cobbler+preseed自动化安装Ubuntu 14.04系统:

建议在Ubuntu 14.04系统上搭建,Ubuntu 16.04上会有apache2的python和mod_wsgi模块版本冲突

安装apache2、tftpd-hpa、kickstart略

apt-get install cobbler

netstat -ntplu (查看服务端口,包括tcp和udp)

curl -I http://127.0.0.1/cobbler (验证网页是否能打开)

cobbler check

apt-get install debmirror

cp -rv /usr/share/doc/debmirror/examples/debmirror.conf /etc/

vi /etc/debmirror.conf (注释掉下面2行)

#@dists="precise";

#@arches="i386";
:wq

service cobbler restart

cobbler sync

echo "xxxx" | openssl passwd -1 -stdin (此次xxxx为客户端的root初始密码)

vi /etc/cobbler/settings (将上补生成的乱码贴进去)

default_password_crypted: "$1$cobbler$nBCRhq3fBRuMs35Rp4EUX/"
:wq

cobbler sync

导入iso镜像

mount -t iso9660 -r -o ro,loop ubuntu-14.04.3-server-amd64.iso /root/iso/

cobbler import --name=UBT14043 --arch=x86_64 --path=/root/iso

cobbler list

cobbler distro list

cobbler profile list

cobbler profile report --name=UBT14043-x86_64 #查看profile设置

cobbler distro report --name=UBT14043-x86_64 #查看安装镜像文件信息

cobbler profile remove --name=UBT14043-x86_64 #移除profile

cobbler profile add --name=UBT14043-x86_64 --distro=UBT14043-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ubt14043.seed #添加

cobbler profile edit --name=UBT14043-x86_64 --distro=UBT14043-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ubt14043.seed #编辑

cobbler profile add --name=UBT14043-x86_64 --kickstart="/var/lib/cobbler/kickstarts/ubt14043.seed"

cobbler profile report

service cobbler restart

cobbler sync

cat /var/lib/tftpboot/pxelinux.cfg/default内容:

DEFAULT menu
PROMPT 0
MENU TITLE Cobbler | http://www.cobblerd.org/
TIMEOUT 0
#TOTALTIMEOUT 6000
#ONTIMEOUT local

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT -1

LABEL UBT14043-x86_64
kernel /images/UBT14043-x86_64/linux
MENU LABEL UBT14043-x86_64
append initrd=/images/UBT14043-x86_64/initrd.gz ksdevice=bootif lang= locale=en_US priority=critical text auto-install/enable=true priority=critical url=http://10.0.0.2/cblr/svc/op/ks/profile/UBT14043-x86_64 hostname=aa domain=ming.com suite=trusty netcfg/choose_interface=em1 netcfg/dhcp_timeout=120
ipappend 2

MENU end

注:
1、指定网卡需写到default文件里,写到seed文件里不认
2、如果用的是AD的DHCP,一定要在default文件里写上dhcp_timeout时间,不然DHCP失败概率会很高

cat ubt14043.seed内容:

d-i live-installer/net-image string http://10.0.0.2/cobbler/links/UBT14043-x86_64/install/filesystem.squashfs
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string 
d-i netcfg/choose_interface select auto
d-i clock-setup/utc boolean true
d-i partman-auto/method string regular
d-i partman-auto/disk string /dev/sda
d-i partman-auto/expert_recipe select \
boot-root :: \
100000 80 100000 ext4 \
$bootable{ } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
102 60 1000 linux-swap \
$primary{ } \
method{ swap } format{ } \
. 
d-i partman-auto/choose_recipe boot-root

d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/default_filesystem string ext4
d-i clock-setup/utc boolean true
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 10.0.0.3
d-i base-installer/kernel/image string linux-server
d-i passwd/root-login boolean false
d-i passwd/make-user boolean true
d-i passwd/user-fullname string super
d-i passwd/username string super
d-i passwd/user-password password xxxxxx
d-i passwd/user-password-again password xxxxx
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false
d-i passwd/user-default-groups string sudo
d-i mirror/country string manual
d-i mirror/protocol string http
d-i mirror/http/hostname string 10.0.0.2
d-i mirror/http/directory string /cobbler/ks_mirror/UBT14043-x86_64
d-i apt-setup/services-select multiselect security
d-i apt-setup/security_host string 10.0.0.2
d-i apt-setup/security_path string /cobbler/ks_mirror/UBT14043-x86_64
d-i debian-installer/allow_unauthenticated string false
d-i pkgsel/upgrade select none
d-i pkgsel/language-packs multiselect 
d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean true
d-i grub-installer/skip boolean false
d-i lilo-installer/skip boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i finish-install/keep-consoles boolean false
d-i finish-install/reboot_in_progress note 
d-i cdrom-detect/eject boolean true
d-i debian-installer/exit/halt boolean false
d-i debian-installer/exit/poweroff boolean false
d-i pkgsel/include string openssh-server

本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/2052396如需转载请自行联系原作者


yangzhimingg

相关文章
|
安全 Linux iOS开发
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
1076 6
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
|
Ubuntu 安全 iOS开发
Nessus Professional 10.10 Auto Installer for Ubuntu 24.04 - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for Ubuntu 24.04 - Nessus 自动化安装程序
1596 5
|
安全 Ubuntu iOS开发
Nessus Professional 10.10 Auto Installer for Windows - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for Windows - Nessus 自动化安装程序
444 3
Nessus Professional 10.10 Auto Installer for Windows - Nessus 自动化安装程序
|
Ubuntu 编译器 开发工具
在Ubuntu系统上搭建RISC-V交叉编译环境
以上步骤涵盖了在Ubuntu系统上搭建RISC-V交叉编译环境的主要过程。这一过程涉及了安装依赖、克隆源码、编译安装工具链以及设置环境变量等关键步骤。遵循这些步骤,可以在Ubuntu系统上搭建一个用于RISC-V开发的强大工具集。
1197 22
|
机器学习/深度学习 人工智能 测试技术
EdgeMark:嵌入式人工智能工具的自动化与基准测试系统——论文阅读
EdgeMark是一个面向嵌入式AI的自动化部署与基准测试系统,支持TensorFlow Lite Micro、Edge Impulse等主流工具,通过模块化架构实现模型生成、优化、转换与部署全流程自动化,并提供跨平台性能对比,助力开发者在资源受限设备上高效选择与部署AI模型。
1140 9
EdgeMark:嵌入式人工智能工具的自动化与基准测试系统——论文阅读
|
Ubuntu 网络协议 网络安全
解决Ubuntu系统的网络连接问题
以上步骤通常可以帮助解决大多数Ubuntu系统的网络连接问题。如果问题仍然存在,可能需要更深入的诊断,或考虑联系网络管理员或专业技术人员。
2597 18
|
Ubuntu 网络协议 Linux
在Ubuntu 22.04系统中无需重启设置静态IP地址
以上步骤断言性地描述了如何在不重启Ubuntu系统情况下通过命令行界面手动更新并且实施一个固定IPv4 地址给特指网络界面(NIC)。这个过程需要管理员权限以及一些基础知识关于Linux 系统与其内置终端操作指南。这些操作可以确保用户能够有效地管理其机器上得联络能力而不需要完全重启机器即可立刻见效果,在专业环境里尽可能减少服务停机时间是非常有价值得一点考量因素。
5012 48
|
安全 Ubuntu iOS开发
Nessus Professional 10.10 Auto Installer for macOS Tahoe - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for macOS Tahoe - Nessus 自动化安装程序
424 5
|
Ubuntu 安全 关系型数据库
安装MariaDB服务器流程介绍在Ubuntu 22.04系统上
至此, 您已经在 Ubuntu 22.04 系统上成功地完成了 MariadB 的标准部署流程,并且对其进行基础但重要地初步配置加固工作。通过以上简洁明快且实用性强大地操作流程, 您现在拥有一个待定制与使用地强大 SQL 数据库管理系统。
684 18
|
Ubuntu 安全 关系型数据库
安装MariaDB服务器流程介绍在Ubuntu 22.04系统上
至此, 您已经在 Ubuntu 22.04 系统上成功地完成了 MariadB 的标准部署流程,并且对其进行基础但重要地初步配置加固工作。通过以上简洁明快且实用性强大地操作流程, 您现在拥有一个待定制与使用地强大 SQL 数据库管理系统。
959 15