pxe+kickstart网络自动安装ubuntu server 11.10

本文将指导您如何在 Ubuntu 10.10 Desktop 环境下搭建 PXE 服务器,包括配置 DHCP、TFTP 和 Apache 服务,并详细解释如何复制和设置相关文件及配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


ubuntu10.10Desktop作为pxe服务器。ip是192.168.22.4.安装dhcp3,tftpd-hpa,apache


1. 创建/etc/default/tftpd-hpa

# /etc/default/tftpd-hpa
RUN_DAEMON="yes"
#OPTIONS="-l -s -c /tftpboot"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -c"



2. 修改/etc/dhcp3/dhcpd.conf


next-server 192.168.22.4; 

subnet 192.168.22.0 netmask 255.255.255.0 {
option domain-name "pxe.env";
option domain-name-servers 192.168.22.4;
option routers 192.168.22.1;
option broadcast-address 192.168.22.255;

range  192.168.22.100 192.168.22.200;
default-lease-time 600;
max-lease-time 7200;
filename "pxelinux.0";
}

3. 复制ubuntu server 11.10光盘上的所有内容到/var/www/1110US文件夹

    复制ubuntu server 11.10光盘上的install/netboot目录下的pxelinux.cfg,ubuntu-install文件夹到/tftpboot文件夹

    复制ubuntu-install/amd64文件夹里的initrd.gz, linux, pxelinux.0到/tftpboot文件夹

    修改/tftpboot/ubuntu-install/amd64/txt.cfg

default install
label install
	menu label ^Install
	menu default
	kernel ubuntu-installer/amd64/linux
	append vga=788 ks=http://192.168.22.4/ks initrd=ubuntu-installer/amd64/initrd.gz -- quiet 


4. 编辑/var/www/ks 

    

#Generated by Kickstart Configurator
#platform=x86

#System language
lang en_US
#Language modules to install
langsupport zh_CN --default=en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone Asia/Shanghai
#Root password
rootpw --iscrypted $1$M7yl.UVQ$vpD7QEvcnfimi60Do9EPH/
#Initial user
user xxx --fullname "" --iscrypted --password $1$h9vSmEta$x3hgA8diUxGfTxHlAhPVg.
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://192.168.22.4/1110US/
#System bootloader configuration
bootloader --location=mbr 
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel 
#Disk partitioning information
part / --fstype ext4 --size 15000 --grow 
#System authorization infomation
auth  --useshadow  --enablemd5 
#Network information
network --bootproto=static --ip=None --netmask=None --gateway=None --nameserver=None --device=None
#Firewall configuration
firewall --disabled 
#Do not configure the X Window System
skipx
#Package install information
%packages
@everything



                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值