star-cd linux安装,linux 使用PXE方式,kickstar网络安装系统

本文介绍如何通过PXE实现Linux系统的网络安装,包括DHCP、TFTP、FTP等服务的配置步骤,并详细展示了kickstart应答文件的设置过程。

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

软件需求:(可使用yum方式安装)

0.DHCP服务

1.xinet

2.kickstar包

3.tftp

4.vsftpd

5.启动文件、系统内核文件、系统镜像

[root@test ~]# cd /var/lib/tftpboot/ #拷贝相关文件到tftp目录

[root@test tftpboot]# ll

总用量 34168

-r--r--r-- 1 root root 84 10月 25 14:40 boot.msg

-r--r--r-- 1 root root 29608959 10月 25 14:40 initrd.img

-rw-r--r-- 1 root root 26828 10月 25 11:17 pxelinux.0

drwxr-xr-x 2 root root 4096 10月 25 14:23 pxelinux.cfg

-r--r--r-- 1 root root 1236005 10月 25 14:40 splash.jpg

-r--r--r-- 1 root root 162860 10月 25 14:40 vesamenu.c32

-r-xr-xr-x 1 root root 3938800 10月 25 14:40 vmlinuz

chmod 755 /var/ftp/ks.cfg #此文件权限设置为755

在linux图形界面启动kickstar,定制应答文件.命令如下

#system-config-kickstart

kf.cfg由kickstar定制生成的,存放在ftp目录下

kf.cfg配置文件

[root@test pub]# cat ks.cfg

key --skip 在此处添加跳过输入序列号指令

[root@test tftpboot]# cd pxelinux.cfg/

[root@test pxelinux.cfg]# ll

总用量 4

-rwxr-xr-x 1 root root 999 10月 25 14:23 default

[root@test pxelinux.cfg]#

[root@test pxelinux.cfg]# ^C

[root@test pxelinux.cfg]# cat default #启动加载程序后安装菜单配置文件

default vesamenu.c32

#prompt 1

timeout 6 选择菜单时间

display boot.msg

menu background splash.jpg

menu title Welcome to Red Hat Enterprise Linux 6.2!

menu color border 0 #ffffffff #00000000

menu color sel 7 #ffffffff #ff000000

menu color title 0 #ffffffff #00000000

menu color tabmsg 0 #ffffffff #00000000

menu color unsel 0 #ffffffff #00000000

menu color hotsel 0 #ff000000 #ffffffff

menu color hotkey 7 #ffffffff #ff000000

menu color scrollbar 0 #ffffffff #00000000

label linux

menu label ^Install or upgrade an existing system

menu default

kernel vmlinuz

append ks=ftp://10.15.62.186/pub/ks.cfg ksdevice=eth0 initrd=initrd.img #ks.cfg 位置

label vesa

menu label Install system with ^basic video driver

kernel vmlinuz

append initrd=initrd.img xdriver=vesa nomodeset

label rescue

menu label ^Rescue installed system

kernel vmlinuz

append initrd=initrd.img rescue

label local

menu label Boot from ^local drive

localboot 0xffff

label memtest86

menu label ^Memory test

kernel memtest

append -

[root@test pxelinux.cfg]#

cd /var/ftp/pub/ #此FTP目录,存放linux系统镜像iso文件

[root@test pub]# cat /etc/dhcp/dhcpd.conf #dhcpd.conf具体设置

ddns-update-style interim;

ignore client-updates;

allow booting;

allow bootp;

subnet 10.15.62.0 netmask 255.255.255.0 {

range dynamic-bootp 10.15.62.100 10.15.62.250;

}

option subnet-mask 255.255.255.0;

option broadcast-address 10.15.62.255;

default-lease-time 21600;

max-lease-time 43200;

Next-server 10.15.62.186;

Filename "pxelinux.0"; #pxe客户端获取ip后,找的启动加载文件pxelinux.0

[root@test pub]#

重启相关服务

#service vsftpd restart

#service xinetd restart

#service dhcpd restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值