pxe无人值守自动安装
rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum list
yum update
yum -y install tftp-server
rpm -ql tftp-server
/var/lib/tftpboot tftp根目录
chkconfig tftp on
chkconfig xinetd on
chkconfig --list tftp
ss -unlp | grep 69
vi /etc/xinetd.d/tftp
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -u nobody -s /var/lib/tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
yum install syslinux
mount -o loop CentOS-6.6-x86_64-bin-DVD1.iso /mnt
cp /mnt/isolinux/{vesamenu.c32,vmlinuz,initrd.img} /var/lib/tftpboot/
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/
mkdir /var/lib/tftpboot/pxelinux.cfg
cp /mnt/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
yum -y install dhcp
vim /etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.108;
option time-offset -18000;
range dynamic-bootp 192.168.1.200 192.168.1.230;
default-lease-time 21600;
max-lease-time 43200;
# Group the PXE bootable hosts together
# # PXE-specific configuration directives...
next-server 192.168.1.108;
filename "pxelinux.0";
authoritative;
}
service dhcpd configtest
yum install httpd
vi /etc/httpd/conf/httpd.conf
ServerName 127.0.0.1:80
/etc/init.d/httpd start
ss -ntlp | grep 80
umount /mnt/
mount -o loop /data/CentOS-6.6-x86_64-bin-DVD1.iso /var/www/html/centos6/
vim /var/www/html/pxe-ks.cfg
# Kickstart file automatically generated by anaconda.
#version=DEVEL
install
url --url=http://192.168.1.108/centos6
lang zh_CN.UTF-8
keyboard us
network --onboot yes --device eth0 --bootproto dhcp --noipv6
rootpw --iscrypted $6$k80gonzUBxLGIIOw$q2VJzcf5gqIbxhEJRdLzqHxWjW/b3z9KzpuQBRCnxGLxpOsluzwFUoUmJIV84Eptftp6J4zhgWem/p1Ug1tNt1
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
reboot
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
zerombr
clearpart --all
part /boot --fstype=ext4 --asprimary --size=600
part / --fstype=ext4 --asprimary --size=10240
part swap --asprimary --size=2048
part /data --fstype=ext4 --grow --asprimary --size=200
repo --name="CentOS" --baseurl=http://192.168.1.108/centos6 --cost=100
%packages
@base
@chinese-support
@core
@british-support
@system-management-snmp
@server-policy
@system-admin-tools
@workstation-policy
python-dmidecode
sgpio
device-mapper-persistent-data
%end
vi /var/lib/tftpboot/pxelinux.cfg/default
末尾添加:
label pxe
menu label ^pxe
kernel vmlinuz
append initrd=initrd.img ks=http://192.168.1.108/pxe-ks.cfg
--------------------------------------------------------------------------------------
vi /var/lib/tftpboot/pxelinux.cfg/default 启动界面在这修改
default linux # 默认启动的是 'label linux' 中标记的启动内核
prompt 1 # 显示 'boot: ' 提示符
timeout 60 # 等待超时时间,单位为 1/10 秒,超时后自动启动 默认指定的label
display boot.msg # 显示boot.msg的内容,文件路径是相对tftp server 的根目录(默认 /tftpboot),所以boot.msg文件绝对路径在 /tftpboot/boot.msg
menu.c32 提供类菜单模式的功能
pxelinux.0 开机管理程式
pxelinuxcfg 开机的选单设定
vesamenu.c32 图形化界面菜单
vmlinuz 安装软件核心文档(kernel file)
initrd.img 开机过程所需要的模块参数
isolinux.cfg -->demo 作为pxe所需开机菜单
--size 规范分割的大小
--grow 系统自动去判断最大可用容量,然后通通分给该分区
--asprimary 将该分割强制列在主要分割类型中
--grub-crypt rootpw密码获取
part / --fstype ext3 --start=1 --end=250 --ondisk=sda 根分区类型、挂载点、大小
part /home --fstype ext3 --start=251 --end=1000 --ondisk=sda
part /usr --fstype ext3 --start=1001 --end=5000 --ondisk=sda
part /usr/local --fstype ext3 --start=5001 --end=7000 --ondisk=sda
%pre,%post 安装前、安装后的额外动作
%pre
#----创建raid---------#
#创建strip size 64k的raid0
megacli -cfglddel -L1 -a0
megacli -cfgldadd -r1[32:6,32:7] -wt -ra -strpsz64 -force -a0
megacli -CfgLdAdd -r0[14:2] wb ra Cached -strpsz64 -a0
megacli -cfgldadd -r5[0:2,0:3,0:4] -wb -ra Cached -strpsz64 -a0
%post
MegaCli-8.07.10-1.noarch
pxe无人值守自动安装的更多相关文章
- PXE网络启动无人值守自动安装 centos 全程实录
PXE网络启动无人值守自动安装 centos 全程实录 http://shayi1983.blog.51cto.com/4681835/1549854/ 搭建Pxe服务器无人听应答全自动安装CentO ...
- linux系统PXE+Kickstart自动安装系统
一.PXEPXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服 ...
- cobbler无人值守自动安装
无人值守安装(自动按定制的需求来批量安装linux系统) kickstart cobbler linux安装系统的方法: 1,光盘 把iso镜像刻录(windows下有类似nero这类软件)到光盘 ...
- PXE+kickstart自动安装ubuntu14.04
本文参考了诸多文章,先感谢这些文章的作者. 使用pxe安装系统需要安装dhcp,tftp,http等服务(当然也可以使用其他文件共享方式比如nfs,ftp). 实验环境: 1. vmware 12 2 ...
- 在xp下无人值守自动安装系统
无人值守安装可以大大缩短安装系统的时间.我在虚拟机测试成功. 先给文件链接https://files.cnblogs.com/files/sishenzaixian/%E8%87%AA%E5%8A%A ...
- centos7/rhel7下配置PXE+Kickstart自动安装linux系统
应用场景:临时安装一个系统或者批量安装linux系统,无需人工介入选择下一步,减少在安装系统上的时间浪费,提高工作效率. DHCP + TFTP + Syslinux + FTP + Kickstar ...
- PXE远程自动安装操作系统
一.PXE的工作原理 PXE:基于Client/Server的网络模式,支持远程主机通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统:PXE可以引导和安装Windows,linux等多种操 ...
- RedHat7搭建无人值守自动安装Linux操作系统(PXE+Kickstart)
Kickstart服务器 IP: 192.168.136.253 掩码:255.255.255.0 网关:192.168.136.2 DNS:192.168.136.2 安装部署HTTP服 ...
- CentOS 7.2 下 PXE+kickstart 自动安装系统
一.简单概述 1.1 Kickstart 概述 对于网络安装系统,在linux 下面最熟悉的应该就是 Kickstart 以及 cobbler.写这篇文章的目的在于我公司目前使用的就是 Kicksta ...
随机推荐
- java 程序命名规则
程序命名规则提示:模块设计人员确定本软件的模块命名规则(例如类.函数.变量等),确保模块设计文档的风格与代码的风格保持一致.可以从机构的编程规范中摘取或引用(如果存在的话).命名规则1.包命名 ...
- Spoken English Practice (yesterday) (Look, I just wanted to apologize again for yesterday? It's fine, I know you didn't mean it. / when I say it, I mean it.)
绿色:连读: 红色:略读: 蓝色:浊化: 橙色:弱读 下划线_为浊化 口语蜕变(2017/7/12) ...
- Chrome cookies folder
w本地存储数据2种形式. http://superuser.com/questions/292952/chrome-cookies-folder-in-windows-7 chrome://setti ...
- Aggregated Counting-----hdu5439(2015 长春网络赛 找规律)
#include<stdio.h> #include<string.h> #include<iostream> #include<math.h> #in ...
- Period---hdu1358(循环节 kmp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1358 题意 :求给你个串,前i位子串由某个字符串重复k次得到,求所有的i和k(k>1); 例如: ...
- Cyclic Nacklace ---hdu3746(循环节,kmp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3746 给你一个字符串,让你在后面加尽量少的字符,使得这个字符串成为一个重复串. abca---添加bc ...
- new Option() 创建一个option标签
//add() 方法用于向 <select> 添加一个 <option> 元素. //new Option() 创建一个option标签 school.add(new Opti ...
- [golang]内存不断增长bytes.makeSlice
------------------------------------------ 2015.7月更新 后面发现这里其实有一个sb的问题,在于内存回收和释放. 每个http请求,都会带一个http. ...
- Python中字符串拼接的N种方法
python拼接字符串一般有以下几种方法: ①直接通过(+)操作符拼接 s = 'Hello'+' '+'World'+'!'print(s) 输出结果:Hello World! 使用这种方式进行字符 ...
- Shiro框架简介
Apache Shiro是Java的一个安全框架.对比另一个安全框架Spring Sercurity,它更简单和灵活. Shiro可以帮助我们完成:认证.授权.加密.会话管理.Web集成.缓存等. A ...