build custom centos7
必读,在以下内容之前。
pre:
0. install log
推荐使用pungi
这哥们写了不少不错的文章。 还有python的设计模式。
pungi --nohash --nosource --nodebugingo -G -C -B -I --name=demo --version=1.0 --destdit=./out -c package.ks
package.ks 是需要安装的包列表。
2. cloud的部署安装
There is a script to create custom iso
3. make the ISO
https://serverfault.com/questions/517908/how-to-create-a-custom-iso-image-in-centos
Create a directory to mount your source.
mkdir /tmp/bootiso
Loop mount the source ISO you are modifying. (Download from Red Hat / CentOS.)
mount -o loop /path/to/some.iso /tmp/bootiso
Create a working directory for your customized media.
mkdir /tmp/bootisoks
Copy the source media to the working directory.
cp -r /tmp/bootiso/* /tmp/bootisoks/
Unmount the source ISO and remove the directory.
umount /tmp/bootiso && rmdir /tmp/bootiso
Change permissions on the working directory.
chmod -R u+w /tmp/bootisoks
Copy your Kickstart script which has been modified for the packages and
%postto the working directory.cp /path/to/someks.cfg /tmp/bootisoks/isolinux/ks.cfg
Copy any additional RPMs to the directory structure and update the metadata.
cp /path/to/*.rpm /tmp/bootisoks/Packages/.
cd /tmp/bootisoks/Packages && createrepo -dpo .. .
Add kickstart to boot options.
sed -i 's/append\ initrd\=initrd.img/append initrd=initrd.img\ ks\=cdrom:\/ks.cfg/' /tmp/bootisoks/isolinux/isolinux.cfg
Create the new ISO file.
cd /tmp/bootisoks && \
mkisofs -o /tmp/boot.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "CentOS 7 x86_64" -R -J -v -T isolinux/. .
(Optional) Use
isohybridif you want toddthe ISO file to a bootable USB key.isohybrid /tmp/boot.iso
Add an MD5 checksum (to allow testing of media).
implantisomd5 /tmp/boot.iso- others
4. other introduce.
make-a-custom-centos-7-or-rhel-7-cd-with-kicktart-file
Make a custom CentOS-7 or RHEL-7 CD With kicktart File
红帽(Red Hat)从Enterprise Server 6.2 开始,启动镜像文件initrd.img 开始改用xz 工具进行压缩,这与以往版本是有区别的
To decompress an image, use the xz -d command. For example
How to unpack and repack an initial ramdisk (initrd/initramfs) image?
三、补充tar.lzma
由于LZMA具有优秀的压缩率及占用资源少的特点,越来越多的工具采用lzma进行打包,后缀名为:tar.lzma。
对于Fedora 11 及以后的版本,可以使用下面的命令操作:
压缩
# tar cfv backup.tar.lzma a/dir --lzma
解压:
# tar xfv backup.tar.lzma --lzma
如果是CentOS 5.3 等老版本,需要安装独立的lzma 工具或用xz 进行:
压缩:
# tar cv a/dir | lzma -c -z > backup.tar.lzma
解压(两个方式都可以):
# cat backup.tar.lzma | lzma -d | tar xv
# xz -dc backup.tar.lzma | tar xvf -
ref:
CentOS7定制封装发行版-基于CentOS minimal
cat buildiso.sh
#!/bin/bash
cd repodata
mv *-minimal*-comps.xml comps.xml
ls .|grep -v "comps.xml"|xargs -i rm -f {}
cd ../
createrepo -g repodata/comps.xml ./
declare -x discinfo=`head - .discinfo`
mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -o/tmp/centos7.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size -boot-info-table .
How to create a Fedora install ISO for testing
Cobbler
Cobbler自动化安装配置实践
build custom centos7的更多相关文章
- Writing custom protocol for nanomsg
http://vitiy.info/writing-custom-protocol-for-nanomsg/ nanomsg is next version of ZeroMQ lib, provid ...
- Solr: a custom Search RequestHandler
As you know, I've been playing with Solr lately, trying to see how feasible it would be to customize ...
- Ubuntu18.04安装Docker, centos7安装Docker
Ubuntu18.04安装Docker 第一种方法从Ubuntu的仓库直接下载安装: 安装比较简单,这种安装的Docker不是最新版本,不过对于学习够用了,依次执行下面命令进行安装. $ sudo a ...
- (转) [it-ebooks]电子书列表
[it-ebooks]电子书列表 [2014]: Learning Objective-C by Developing iPhone Games || Leverage Xcode and Obj ...
- .net Framework Class Library(FCL)
from:http://msdn.microsoft.com/en-us/library/ms229335.aspx 我们平时在VS.net里引用的那些类库就是从这里来的 The .NET Frame ...
- Cheatsheet: 2013 06.01 ~ 06.22
.NET Git for Visual Studio and .NET developers How to download multiple files concurrently using Web ...
- VC++编译MPIR 2.7.0
目录 第1章编译 2 1.1 简介 2 1.2 下载 3 1.3 解决方案 4 1.4 创建项目 5 1.5 复制文件树 6 1.6 不使用预编译头文件 8 ...
- Awesome Swift
Awesome Swift https://github.com/matteocrippa/awesome-swift A collaborative list of awesome Swift re ...
- Ye.云狐J2刷机笔记 | 完美切换内部存储卡和SD卡的改法.vold.fstab
================================================================================Ye.完美切换内部存储卡和SD卡成功.v ...
随机推荐
- vim自动安装插件Vundle
https://github.com/VundleVim/Vundle.vim Set up Vundle: git clone https://github.com/VundleVim/Vundle ...
- vue中使用elementui里的table时不被选中设置
情景:例如提现列表,转账失败后转账金额直接返回用户余额,所以当前数据不可以再次操作 直接粘贴代码: <el-table-column type="selection" wid ...
- webpack配置常用loader加载器
webapck中使用loader的方法有三种 使用loader之前必须运行安装 : npm install --save-dev xxx-loader (1)通过CLI : 命令行中运行 webpac ...
- JAVA8函数式接口
java8 中内置的四大核心函数接口** Consumer<T> :消费型接口* void accept(T t)* Supplier<T> :供给型接口* T get()** ...
- LeetCode111.二叉树的最小深度
给定一个二叉树,找出其最小深度. 最小深度是从根节点到最近叶子节点的最短路径上的节点数量. 说明: 叶子节点是指没有子节点的节点. 示例: 给定二叉树 [3,9,20,null,null,15,7], ...
- Struts2自定义Field级别的错误提示信息
自定义Field级别的错误提示信息步骤: 在action包中新建一个以Action命名的properties文件,如:RegisterAction.properties 2. 然后在该属性文件中指定每 ...
- SQLGetConnectAttr
SQLGetConnectAttr 函数定义: SQLRETURN SQLGetConnectAttr( SQLHDBC ConnectionHandle, SQLINTEGER At ...
- python3(socket 实现udp,tcp套接字编程)
#coding=utf-8 #客户端程序TCP 连接 import socket s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connec ...
- uvalive 4960 Sensor Network
题意: 给出一个无向图,求一个生成树使得这个生成树的最大边与最小边之差最小,输出这个最小的差值.n的最大值为350. 思路: 这题不看题解想破头也不知道怎么写Orz. 暴力的做法是可以从大到小枚举边作 ...
- Python大神成长之路: 第二次学习记录
数据类型 数据操作 bytes 类型 "".encode() 编码-->二进制 "".decode() 解码 判断字符串里的字符是否全为 ...