anaconda概述
是Linux安装主程序,提供交互式界面安装,因此有各种选择,例如:语言、键盘、分区、key、软件包等等。
kickstart的含义
目的是把安装系统中的各种选择(语言、键盘、分区、key、软件包等)变成一种文件(ks.cfg),并且把文件提供给anaconda主程序。它是完成管理员与系统交互的这个过程而开发的一种软件。kickstart的使用是通过工具sytem-config-kickstart在图形界面的各种选择,形成文件(ks.cfg)。在liunx系统启动时告诉kc.cfg所在的地方,就完成了安装。
linux引导
- [rhel-server] 描述光盘上仓库
- name=Red Hat Enterprise Linux server 仓库说明
- baseurl=file:///mnt/cdrom/Server 使用本地yum源
- enabled=1 启用该仓库
- gpgcheck=1 签名检测
- gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release 检测钥匙文件
- [rhel-vt]
- name=Red Hat Enterprise Linux vt
- baseurl=file:///mnt/cdrom/VT
- enabled=1
- gpgcheck=1
- gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
- [rhel-cluster]
- name=Red Hat Enterprise Linux cluster
- baseurl=file:///mnt/cdrom/Cluster
- enabled=1
- gpgcheck=1
- gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
- [rhel-clusterstorage]
- name=Red Hat Enterprise Linux clusterstorage
- baseurl=file:///mnt/cdrom/ClusterStorage
- enabled=1
- gpgcheck=1
- gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
8.安装后脚本配置,根据得到的地址自动生成主机名,并且把地址设置为静态地址
- ADDRESS=`ifconfig |grep -i bcast |awk '{print $2}'`
- NUM=${ADDRESS##*.}
- IP=`echo $ADDRESS |awk –F ":"'{print $2}'`
- sed -i "s/HOSTNAME.*$/HOSTNAME=station$NUM.a.com/" /etc/sysconfig/network
- sed -i "s/BOOTPROTO.*$/BOOTPROTO=none/" /etc/sysconfig/network-scripts/ifcfg-eth0
- echo "IPADDR=$IP">>/etc/sysconfig/network-scripts/ifcfg-eth0
- echo "NETMASK=255.255.255.0">>/etc/sysconfig/network-scripts/ifcfg-eth0
- option routers 192.168.2.254;
- option subnet-mask 255.255.255.0;
- option nis-domain "domain.org";
- option domain-name "domain.org";
- option domain-name-servers 222.88.88.88;
- next-server 192.168.2.100;(通过此命令访问到tftp服务器)
- filename "pxelinux.0";
- range dynamic-bootp 192.168.2.101 192.168.2.253;
- service tftp
- {
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- server = /usr/sbin/in.tftpd
- server_args = -s /tftpboot
- disable = no ( 当用户请求服务时唤醒)
- per_source = 11
- cps = 100 2
- flags = IPv4
- }
- cd /tftpboot/
- cp /usr/lib/syslinux/pxelinux.0 ./ (拷贝驱动)
- cp /mnt/cdrom/images/pxeboot/vmlinuz ./ (通过网络启动需要的pxe内核)
- cp /mnt/cdrom/images/pxeboot/initrd.img ./ (跟硬件有关驱动)
- mkdir –pv pxelinux.cfg
- cp /mnt/cdrom/isolinux/isolinux.cfg pxelinux.cfg/default
- vim /tftpboot/pxelinux.cfg/ default(修改默认配置)
- timeout 6 (修改时间 使其快速执行)
- display boot.msg
- F1 boot.msg
- F2 options.msg
- F3 general.msg
- F4 param.msg
- F5 rescue.msg
- label linux
- kernel vmlinuz
- append ks=ftp://192.168.2.100/pub/ks.cfg ksdevice=eth0 initrdinitrd=initrd.img (标明ftp 和网卡)
本文出自 “1” 博客,转载请与作者联系!