PXE批量部署Linux之三:同一台服务器部署多个发行版
2016-03-16 10:13
363 查看
部署多个发行版的思路是传递给NBP不同发行版的内核文件,为此在pxelinux.0同级目录下创建目录。
这里从最简单的红帽系开始,整理好的结构类似这样。
ubuntu和ks不那么契合,一时搞不定preseed,先挖个坑以后来填
[root@localhost ~]# tree /var/lib/tftpboot/pxe/
/var/lib/tftpboot/pxe/
├── centos
│ ├── 63
│ │ ├── initrd.img
│ │ └── vmlinuz
│ ├── 66
│ │ ├── initrd.img
│ │ └── vmlinuz
│ └── 71
│ ├── initrd.img
│ └── vmlinuz
├── pxelinux.0
├── pxelinux.cfg
│ └── default
├── splash.jpg
├── vesamenu.c32
编辑pxelinux.cfg/default增加多系统选单。
PS:这里需要注意内核参数格式,7的inst.ks,6系是ks。
label 2
menu label ^2) Install CentOS 6 x64 with local Repo
kernel centos/66/vmlinuz
append initrd=centos/66/initrd.img ks=ftp://192.168.1.200/pub/ks/centos/66/co.cfg
这里我们把前方7生成的kickstart做适当修改
[root@localhost ~]# cat /var/ftp/pub/ks/centos/66/co.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --enabled --ssh
# Install OS instead of upgrade
install
# Use network installation
url --url="ftp://192.168.1.200/pub/iso/centos/66"
# Root password
rootpw --iscrypted $1$u3Z6DS70$0i.X7A5xhzNebhrvuy0mc1
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --permissive
# Do not configure the X Window System
skipx
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone --isUtc Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr
autopart #这里如果使用kickstart图形界面生成ks配置,同时没有创建分区,需要添加此参数,否则安装会停在硬盘分区
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
%packages
@base
@basic-desktop
#@virtualization-client
#@virtualization-platform
rsync
vim-enhanced
%end
这里从最简单的红帽系开始,整理好的结构类似这样。
ubuntu和ks不那么契合,一时搞不定preseed,先挖个坑以后来填
[root@localhost ~]# tree /var/lib/tftpboot/pxe/
/var/lib/tftpboot/pxe/
├── centos
│ ├── 63
│ │ ├── initrd.img
│ │ └── vmlinuz
│ ├── 66
│ │ ├── initrd.img
│ │ └── vmlinuz
│ └── 71
│ ├── initrd.img
│ └── vmlinuz
├── pxelinux.0
├── pxelinux.cfg
│ └── default
├── splash.jpg
├── vesamenu.c32
编辑pxelinux.cfg/default增加多系统选单。
PS:这里需要注意内核参数格式,7的inst.ks,6系是ks。
label 2
menu label ^2) Install CentOS 6 x64 with local Repo
kernel centos/66/vmlinuz
append initrd=centos/66/initrd.img ks=ftp://192.168.1.200/pub/ks/centos/66/co.cfg
这里我们把前方7生成的kickstart做适当修改
[root@localhost ~]# cat /var/ftp/pub/ks/centos/66/co.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --enabled --ssh
# Install OS instead of upgrade
install
# Use network installation
url --url="ftp://192.168.1.200/pub/iso/centos/66"
# Root password
rootpw --iscrypted $1$u3Z6DS70$0i.X7A5xhzNebhrvuy0mc1
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --permissive
# Do not configure the X Window System
skipx
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone --isUtc Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr
autopart #这里如果使用kickstart图形界面生成ks配置,同时没有创建分区,需要添加此参数,否则安装会停在硬盘分区
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
%packages
@base
@basic-desktop
#@virtualization-client
#@virtualization-platform
rsync
vim-enhanced
%end
相关文章推荐
- linux下NIS搭建
- CentOS7.1 KVM虚拟化之虚拟机内存、CPU调整(6)
- Linux中的叹号命令
- linux系统服务名称
- linux下.sh文件语法
- Linux常用命令(包括刷机指令、Linux单步调试、预装android系统应用)
- centos7安装pip
- Linux创建以当前日期命名的文件夹
- Linux常用命令(4)
- Cgroup – Linux的IO资源隔离
- linux如何查看磁盘剩余空间
- Linux的IO调度
- linux下使用tree命令显示目录的树结构
- How can I patch the kernel in Yocto Project
- Linux进程与线程的区别
- Linux 安装paramiko模块
- Linux驱动开发--1、设备驱动基础
- linux系统一些加固
- template模板在Windows和Linux下的不同用法
- Linux 驱动开发-0、内核模块设计