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自动化安装配置实践
最新文章
- “全能”选手—Django 1.10文档中文版Part3
- CSS中定义CLASS时,中间有空格和每空格的区别
- 手持终端PDA应用固定资产管理系统(资产查询 盘点)软件程序系统
- 无法嵌入互操作类型“Microsoft.Office.Interop.Excel.ApplicationClass”。请改用适用的接口
- POJ 3264 区间最大最小值Sparse_Table算法
- 黑马入学基础测试(三)求斐波那契数列第n项,n<;30,斐波那契数列前10项为 1,1,2,3,5,8,13,21,34,55
- OSI参考模型 VS TCP/IP参考模
- Reducing the Dimensionality of data with neural networks / A fast learing algorithm for deep belief net
- java 截取字符串 拆分字符串
- Spring+SpringMVC+MyBatis整合进阶篇(四)RESTful实战(前端代码修改)
- Android Service组件在新进程绑定(bindService)过程
- 中国地图(Highmaps)
- C# 流总结
- 01-Mirrorgate简介
- dos基本指令
- sudoers的权限被改,又忘记了root密码,又不能重启。这么做。
- 11月11日光棍节考试总结hhh
- Java第三阶段学习(四、缓冲流)
- Linux下QTCreator代码自动补全(是真的自动补全,不是手动触发)
- CSS中的动画
热门文章
- 海量交通大数据应用平台MTDAP_nchang的经验记录
- web前端 ajax请求报415/400错
- SVN windows内修改日志内容(错误解决)
- php高并发,大流量
- multiprocessing 源码解析 更新中......
- 使用js实现登录随机验证码的效果
- 1.python虚拟环境的安装-用以同时使用py2,py3
- 关于SQL语句中的distinct和group by
- (Review cs231n) Gradient Vectorized
- 35 个最好用的 Vue 开源库