全自动安装 linux光盘,CentOS 7.1全自动安装光盘制作详解
安装系统的话,常用方式就是通过U盘,光盘,kickstart网络自动化安装,网络自动化安装固然好,但是有时候在现场做项目的话根本就没有kickstart环境,甚至连基本的网络建设都没有弄好,此时该如何安装系统呢,通过u盘或者光盘,手动安装的话需要很多选项要自己填写,那么我们能不能把自动化的ks环境做到系统镜像里面去呢,答案是很定的,接下来我们就来介绍CentOS 7.1全自动安装光盘制作
第一步我们挂载原始光盘镜像,假如挂载点是/mnt/cdrom,然后做如下操作
cp -ar /mnt/cdrom/* /tmp/martin/
cp -ar /mnt/cdrom/.treeinfo /tmp/martin/
cp -ar /mnt/cdrom/.discinfo /tmp/martin/
createrepo -g/tmp/martin/repodata/*-comps.xml /tmp/martin/
/tmp/martin/isolinux
boot.cat grub.conf isolinux.bin ks_a.cfg ks_raid_ab.cfg memtest TRANS.TBL vesamenu.c32
boot.msg initrd.img isolinux.cfg ks_b.cfg ks_raid_bc.cfg splash.png upgrade.img vmlinuz
在该目录下面新建四个ks文件,其实只要一个即可,这里做成四个是为了硬盘不同的分区方案而做的,
这里我们只介绍一个ks_raid_ab.cfg的配置,其实就是一份定义了软raid的分区
# platform=x86, AMD64, or Intel EM64T
# Use text mode install
#text
# Use graphical install
graphical
# Install OS instead of upgrade
install
# Use CDROM media
cdrom
# Use NFS installation media
#nfs --server=172.16.15.10 --dir=/centosinstall
# Use HTTP installation media
#url --url ftp://172.16.15.10/Public/iso/7.1-x64/
# Use FTP installation media
#url --url ftp://:@/
#url --url ftp://172.16.15.10/
# System language
lang en_US.UTF-8
# System keyboard
keyboard us
# Network information
network --bootproto=dhcp --hostname martin --onboot=on
#Root password
rootpw 123456
#firewall --enabled --ssh
firewall --disable
# System authorization information
authconfig --useshadow --enablemd5
# SELinux configuration
selinux --disabled
# System timezone
timezone Asia/Shanghai
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
#clearpart --all --initlabel --drives=sda
#part /boot --fstype="ext4" --size=300 --ondisk=sda
#part pv.01 --size=4096 --grow --ondisk=sda
#volgroup VolGroup00 --pesize=32768 pv.01
#logvol / --fstype="ext4" --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
#logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=512
# Partition clearing information
clearpart --all --initlabel
# Soft RAID1 partitioning information
part swap --fstype="swap" --ondisk=sda --size=4096
part raid.01 --fstype="raid" --grow --ondisk=sda --size=1
part swap --fstype="swap" --ondisk=sdb --size=4096
part raid.02 --fstype="raid" --grow --ondisk=sdb --size=1
raid / --device=md0 --fstype="ext4" --level=1 raid.01 raid.02
# Reboot after installation
reboot
# Do not configure the X Window System; if to configure it, uncomment following line
skipx
# X Window System configuration information
#xconfig --defaultdesktop=GNOME --depth=32 --resolution=1024x768
%packages
@ additional-devel
@ base
@ core
@ debugging
@ gnome-desktop
@ development
@ mariadb
@ emacs
@ web-server
@ network-file-system-client
@ java-platform
@ platform-devel
@ php
expect
iptraf-ng
libaio-devel
libpcap-devel
lksctp-tools
lrzsz
nasm
net-snmp-utils
php-mysql
php-pear
php-soap
system-config-kickstart
# Add these system perfomance enhanced tools
vsftpd
logwatch
postfix
nmap-ncat
nmap
ftp
telnet
lsscsi
# Update the sysstat version from 9.0.4 to 10.1.6
sysstat
%end
[[email protected] isolinux]# vim isolinux.cfg 修改该文件,增加如下内容
label ks_a
menu label ^Custom ks_a CentOS 7 --This is sinlgle_a
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_a.cfg
label ks_b
menu label ^Custom ks_b CentOS 7 --This is sinlgle_b
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_b.cfg
label ks_ab
menu label ^Custom ks_ab CentOS 7 --This is raid_ab
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_raid_ab.cfg
label ks_bc
menu label ^Custom ks_bc CentOS 7 --This is raid_bc
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_raid_bc.cfg
此时我们将该目录/tmp/martin/ 重新生成镜像即可,centos7.1原始镜像有7个多G,我们可以对其做裁剪,方法我们下次介绍
本文出自 “martin” 博客,谢绝转载!
全自动安装 linux光盘,CentOS 7.1全自动安装光盘制作详解相关推荐
- CentOS 7.0全自动安装光盘制作详解
CentOS 7.0全自动安装光盘制作详解 1 复制光盘文件 1 )挂载 iso 镜像 创建目录用于挂载光盘: mkdir /root/centos7 挂载 iso 镜像 mount -o loop ...
- linux系统安装(CentOS 7) 和软件安装(mysql,tomcat,jdk)
linux系统安装(CentOS 7) 和软件安装(mysql,tomcat,jdk) 目录 linux系统安装(CentOS 7) 和软件安装(mysql,tomcat,jdk) 软件准备 ## 系 ...
- 虚拟机安装linux(centos),详细
本人从事linux环境下qt的相关开发,于是决定从环境搭建开始,将linux环境和qt相关知识点以博客的形式记录下来,本文从安装linux开始 2022.5.30更新:第一次写的版本冗长繁杂,特此更新 ...
- win10安装linux子系统CentOS
win10安装linux子系统CentOS(windows subsystem linux)流程记录 参考文章 win10系统设置 子系统安装 安装方式的选择 流程 下载 安装 启用 wsl1 升级至 ...
- FAST FW 150UW USB 无线网卡Linux (CentOS 5.6)安装记录
FAST FW 150UW USB 无线网卡Linux (CentOS 5.6)安装记录 1. 网卡的芯片是 RTL8188eu. 下载 rtl8188eu_USB_linux.tar.gz 2. 解 ...
- linux系统在硬盘上安装程序,怎么样用硬盘上的镜象文件来安装Linux系统?我都进入安装界面了,但是那个安装程序好像找不到那几个镜象文件,请指点...
怎么样用硬盘上的镜象文件来安装Linux系统?我都进入安装界面了,但是那个安装程序好像找不到那几个镜象文件,请指点 光盘镜象文件名字为: 5.1-RELEASE-i386-disc1.iso 5.1- ...
- u盘安装linux怎么样,怎么用U盘安装Linux
原标题:怎么用U盘安装Linux 怎么用U盘来安装Linux?没那么简单,也没大家想的那么难,今天荣新教育来给大家简单的介绍下到底该如何进行操作. Linux也有不同的版别,尽管各自都有各自的利益,但 ...
- 怎么在虚拟机上安装linux mint,如何在VirtualBox上安装Linux Mint?
本文概述 在VirtualBox上安装Linux Mint的分步指南. Linux Mint是社区驱动的基于ubuntu的开源操作系统.它是免费使用的:这就是为什么它受到全球数百万用户的喜爱和采用的原 ...
- 1. 安装Linux虚拟机:centos7操作系统 2. 安装openstack-rocky版本 allinone环境
1. 安装Linux虚拟机:centos7操作系统 2. 安装openstack-rocky版本 allinone环境 (1)虚拟机创建 (2)NetworkManager服务.禁用防火墙与SELin ...
- linux在vi创建文件,Linux下创建文本文件(vi/vim命令使用详解)
vi test.txt 或者 vim test.txt 再或者 touch test.txt vim是vi的升级版,指令更多,功能更强. 下面是收集的vim用法,当在vim里面要实现退出,首先要做的是 ...
最新文章
- ERROR: Failed to resolve: com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.46
- 用Leangoo泳道完美实现Scrum任务看板
- python ssh登录远程执行命令
- Linux学习笔记(三)|Vim编辑器
- leetcode116. 填充每个节点的下一个右侧节点指针(层序遍历07)
- 与时间相关的java源码_Java 基于当前时间获取和计算时间
- 【matlab】随意记录
- jupyter notebook运行的快捷键_AI Studio-Notebook基础使用教程(一)
- linux学习之路(1)
- 新加入一个团队,我们应该怎么做?
- Git工作流(简单)
- 迪普科技负载均衡助力金关工程(二期)核心业务交付
- 手机拍的图片资料打印很黑怎么解决?
- icem二维非结构网格划分_ICEM_CFD划分六面体结构网格
- 智能眼镜的两种显示方式
- 初探Java设计模式4:JDK中的设计模式
- 2021-04-19 一万小时定律
- maven打包报错 Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar
- 关于error C2065 错误
- tomcat环境变量设置
热门文章
- [蓝桥杯2019初赛]迷宫-DFS、BFS两种方法
- 湖南大学第十六届程序设计竞赛 B Yuki with emofunc and playf 同余最短路
- Educational Codeforces Round 108 (Rated for Div. 2) D. Maximum Sum of Products 思维 + dp
- 【CF1189F】Array Beauty【dp】【复杂度玄学优化】
- 【洛谷3768】简单的数学题【莫比乌斯反演】【杜教筛】【小学奥数】
- 2020牛客暑期多校训练营(第二场)Just Shuffle
- E - Flow Gym - 102471E
- Strange Partition CodeForces - 1471A
- 「LibreOJ Round #11」Misaka Network 与测试 (网络流跑二分图匹配)
- 【李超树】李超线段树维护凸包(凸壳) (例题:blue mary开公司+线段游戏+ZZH的旅行)