| 基于centos4.3的linux发行版制作过程 |
|
| |
|
以前研究的东西了,最近看到网上有很多人为了制作自己的发行版,苦苦挣扎而不得其道,所以把自己的笔记拿出来与大家一起分享! 其中路径/data/disk是我的制作光盘路径,各位可以根据自己的环境进行修改。 基本过程:
定制RPM包 修改 comps.xml 重编comps.rpm 重新生成hdlist 建立pkglist 利用buildinstall处理安装程序 利用mkisofs制作安装映象
------------------------------------------------ 母系统是centos4.3,为了软件最新,先升级自己的系统相关软件 rpm --import http://mirror.be10.com/centos/4.3/os/i386/RPM-GPG-KEY-centos4 rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY >> /dev/null yum -y update
以下为制作安装光盘必须的包 yum install pump-devel gtk2-devel booty bogl-devel bogl-bterm elfutils-devel beecrypt-devel dietlibc yum install anaconda anaconda-runtime busybox-anaconda
============================================== Package Arch Version Repository Size ============================================== Installing: anaconda i386 10.1.1.37-1.centos4.2 base 4.3 M anaconda-runtime i386 10.1.1.37-1.centos4.2 base 526 k busybox-anaconda i386 1.00.rc1-5 base 177 k Installing for dependencies: anaconda-help noarch 10.1.0-1.centos4 base 800 k bogl i386 0.1.18-4 base 93 k booty i386 0.44.3-1 base 85 k pyparted i386 1.6.8-2 base 22 k
检查RPM包依赖关系 cd /data/disk/EServer/RPMS mkdir /tmp/testdb rpm --initdb --dbpath /tmp/testdb rpm --test --dbpath /tmp/testdb -Uvh *.rpm
以下是具体步骤: 1.设置python的系统环境变量 export PYTHONPATH=/usr/lib/anaconda export PATH="$PATH:/usr/lib/anaconda-runtime"
2.更新光盘的文件树 genhdlist --productpath=EServer /data/disk
3.生成下一步需要的pkgfile文件 pkgorder --product EServer /data/disk/ EServer > /data/pkgfile
4.编译生成光盘引导文件和图形安装界面镜像 buildinstall --pkgorder /data/pkgfile \ --version "1.2" \ --product "EServer" \ --release "Beta" \ --prodpath EServer /data/disk
5.制作 ISO
mkisofs -r -T -J -V "EServer 1.2" -b isolinux/isolinux.bin \ -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \ -boot-info-table -x "lost+found" \ -o /data/EServer.iso /data/disk
文件isolinux/boot.cat 会由mkisofs 程序随后产生 ----------------------------------------------------
为光盘生成md5验证值 implantisomd5 /data/EServer.iso Inserting md5sum into iso image... md5 = b49c693f83c23d7e746dfe0f81a56016 Setting supported flag to 0
如果想将图形界面修改成个性化的界面,需要修改stage2.img(光盘引导镜像,如果硬盘安装,需要修改其他img文件……)
附注: anaconda资源修改:
mkdir /data/anaconda mount -o loop /data/disk/EServer/base/stage2.img /data/anaconda cd /data/anaconda tar -cvf /data/stage2.tar . mkdir /data/stage2 cd /data/stage2 tar -xvf /data/stage2.tar chmod +w -R ../stage2 #-----------修改资源-----------------# ..... .... #重新打包img镜像 cd /data mkcramfs stage2/ stage2.img.new cp /data/stage2.img.new /data/disk/EServer/base/stage2.img
光盘启动画面修改:
yum -y install syslinux
The graphic is in a somewhat odd format, called LSS16. As the name indicates, it is limited to 16 colors. To edit the graphic, first convert it to a PPM:
lss16toppm < splash.lss > splash.ppm
Next, edit the file using The Gimp. Save the resulting file as an indexed gif with no more than 14 colors (plus black and white, for a total of 16). Then, convert the file to a pnm/ppm:
giftopnm < splash.gif | ppmtolss16 > splash.lss cp splash.lss /data/disk/isolinux/splash.lss
yum install gcc xorg-x11-devel 编译gif2lss-0.4.tar.gz
保证光盘里面rpm目录下有以下包,这些包是图形化界面制作所必须的,没有他们,buildinstall将会报错。
anaconda anaconda-runtime anaconda-help anaconda-product busybox busybox-anaconda memtest86+ fonts-xorg-base xorg-x11 joe kernel*
附注: rpm -qpi #显示rpm包的信息 rpm -Uvh #安装rpm包 rpm -qpl #列rpm包内的文件
:em18: 上面这些步骤,是经过实践之后的笔记,所以一般都能够成功,还有一些细节部分,如comps.xml的修改,语法,就不多介绍了。
如果发现有什么问题,欢迎跟帖。 Linux联盟收集整理
 |
频道声明:本频道的文章除部分特别声明禁止转载的专稿外,可以自由转载.但请务必注明出出处和原始作者 文章版权归本频道与文章作者所有.对于被频道转载文章的个人和网站,我们表示深深的谢意。
| 原始作者:佚名 |
录入时间:2007-1-2 23:10:19 |
| 信息来源:不详 |
投稿信箱:itqoo@126.com |
|
|
 |
|
|
|
| 教程录入:itqoo 责任编辑:itqoo |
|
上一个教程: Fedora网络配置工具system-config-network介绍
下一个教程: 通过Windows引导Linux |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |