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
%post
to 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
isohybrid
if you want todd
the 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 ...
随机推荐
- iOS 开发笔记-获取某个APP素材
2019.02.01 更新 以下这种方式只适合越狱的手机,目前12.1以后,iTools已经不适合了,请看最下面第二种方式. 有时候,我们看到别人的APP做得挺漂亮的,那么我们想查看该APP的图片素材 ...
- JavaScript 字符串replace全局替换
一般使用replace let str = "2018-8-14"; str.replace('-','/')//2018/8-14 并没有替换第二个”-“, 所以我们用正则表达式 ...
- JavaScript-switch-case-电话系统
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- binTreepreorderTraversal二叉树前序遍历
原题 Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binar ...
- arc 092C 2D Plane 2N Points
题意: 有n个红色的点和n个蓝色的点,如果红色的点的横坐标和纵坐标分别比蓝色的点的横坐标和纵坐标小,那么这两个点就可以成为一对友好的点. 问最多可以形成多少对友好的点. 思路: 裸的二分图匹配,对于满 ...
- 20165305 学习基础和C语言基础调查
学习基础和C语言基础调查 <优秀的教学方法---做教练与做中学>心得 在<优秀的教学方法---做教练与做中学>文章中又一次提到了"做教练"这一学习方法,因为 ...
- Linux下实现免密登录
过程如下: 1.Linux下生成密钥 通过命令”ssh-keygen -t rsa“ 2.1 通过ssh-copy-id的方式 命令: ssh-copy-id -i ~/.ssh/id_rsa.put ...
- 项目方说性能达到百万TPS,如何测试它的可信度?
项目方说性能达到百万TPS,如何测试它的可信度? 应用系统性能提升的关键在于运维端的接入管理模型(AAA,认证 Authentication.授权 Authorization.计费 Accountin ...
- 【JavaScript 6连载】六、认识原型
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- Poj3253 Fence Repair (优先队列)
Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 67319 Accepted: 22142 De ...