Jun 21

[原]自定义Linux发行版光盘 晴

linuxing , 18:01 , 基础知识 » RPM , 评论(6) , 引用(0) , 阅读(45877) , Via 本站原创 | |

五、注意事项
从步骤中可以看到,大部分的内容还是沿用了系统安装光盘自带的文件。下面为一些未提及的信息简单的补充一下:
1、增加额外驱动
这可以通过修改isolinux/initrd.img文件,可参考:分析initrd.img文件
2、自定义安装界面
stage2.img保存了安装界面使用的信息,通过修改该文件可个性化安装界面,日后我会另外说明;
3、修改光盘启动画面
光盘的启动画面是isolinux/splash.lss,通过安装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 &#124; ppmtolss16 > splash.lss
cp splash.lss /data/disk/isolinux/splash.lss

4、关于splittree.py脚本
如果你还是必须分开多张CD光盘,可参考下面的做法:(注意,与上面的例子无关)

RELEASE="Fedora Core 2 (Tettnang) with updates to $(date '+%Y-%M-%d %H:%m')"

rm -rf i386-disc[1-9]
splittree.py --arch=i386 --total-discs=8 --bin-discs=4 --src-discs=4 --release-string="$RELEASE" \ --pkgorderfile=$FCBASE/fedora/pkgfile.`date +%Y-%m-%d` \ --distdir=$FCBASE/fedora/i386 \ --srcdir=$FCBASE/fedora/i386/SRPMS --productpath=Fedora

rm -f $FCBASE/i386-disc1/Fedora/base/hdlist*
$FCBASE/genhdlist --withnumbers --fileorder \ $FCBASE/fedora/pkgfile.`date +%Y-%m-%d` \ $FCBASE/fedora/i386-disc[1234]

刻录:
#!/bin/sh

myname="Joe Blow <joe@joe.blow>"
bootimg="isolinux/isolinux.bin"
bootcat="isolinux/boot.cat"
distname="Tettnang"
distvers="2"
mkisopts="-R -J -T"
bootopts="-no-emul-boot -boot-load-size 4 -boot-info-table"
mydate="$(date '+%d %b %Y')"
mkisofs $mkisopts $bootopts \
-V "Fedora Core $distver ($distname) UPDATED Disk 1" \
-A "Fedora Coret $distver ($distname) update created on $mydate" \
-P "$myname" \
-p "$myname" \
-b "$bootimg" \
-c "$bootcat" \
-x lost+found \
-o "$distname"-i386-disc1.iso \
i386-disc1

for i in 2 3 4 ; do
mkisofs $mkisopts \
-V "Fedora Core $distver ($distname) UPDATED Disk $i" \
-A "Fedora Core $distver ($distname) update created on $mydate" \
-P "$myname" \
-p "$myname" \
-x lost+found \
-o "$distname"-i386-disc${i}.iso \
i386-disc${i}
done

for i in 1 2 3 4 ; do
mkisofs $mkisopts \
-V "Fedora Core $distver ($distname) UPDATED Disk $i" \
-A "Fedora Core $distver ($distname) update created on $mydate" \
-P "$myname" \
-p "$myname" \
-x lost+found \
-o "$distname"-SRPMS-disc${i}.iso \
i386-disc$(( $i + 3 ))
done

5、关于buildinstall脚本
原来,在anaconda安装程序的制作中,buildinstall脚本是运行在mkisofs前的最后一步。它可以自动生成新的stage2.img等镜像文件,以便在安装程序中使用。
但在实际操作中,我发现该脚本必须依赖很多的rpm包,并从其中提取适当的执行脚本生成stage2.img等文件,而要满足依赖要求是比较复杂的事情。可参考下面的链接说明:
Buildinstall package requirements
六、附录
参考资料:
fedora Anaconda
Linux: Updating and Rebuilding Fedora Core 2 Installation CDs
Création de CD d'installation de Fedora avec les mises à jour(法语)
基于centos4.3的linux发行版制作过程
How to make your own distro in 3 not-so simple steps
这个链接比较慢,我打包了一份:

Customization of Anaconda Installer on Fedora Core 1
内文分页: [1] [2]
Tags: , ,
yorks Email
2009/09/07 14:38
请问一下
tar cf - ./|tar xf - -C /data/disk/install

解压出来的东西可以不放到光盘根目录吗?如果可以是要修改.discinfo吗?不是很明白.discinfo的编写是如何?
linuxing 回复于 2009/09/11 10:50
必须放在光盘的根目录,因为这是由安装程序固定的。至于.discinfo,你打开该文件看看就明白了,最主要是首两行的内容。
test
2008/12/25 17:54
个性化那篇文章在哪里呢?sweat
linuxing 回复于 2008/12/26 20:58
晕倒,就在后面咯。
http://www.linuxfly.org/read.php/136.htm
路过者
2008/04/02 15:55
大虾。。
有个问题要麻烦你下。。
关于anaconda程序执行到 writeconfiguration的时候
它是怎么执行的呢?能不能帮我描述下写入配置的过程??
比如它从哪里读取数据,然后调用到哪里的安装包来安装。。等等。。。
linuxing 回复于 2008/04/08 15:30
不好意思,我也没详细去看anaconda的运行过程。只知道他是根据xml的结构顺序来安装rpm的。若要增加rpm、组,看看个性化那篇里面有写到。
路过者
2008/03/30 20:06
大虾,问个关于stage2.img的问题,就是你一般在mount它的时候使用什么操作命令阿?还有更改某些文件之后重新做成stage2.img又是什么命令阿?
我用mount -t squashfs stage2.img /mnt/img来挂载它
然后在cbe环境下用mksquashfs  ./   stage2.img来把文件夹做成stage2.img
但是我这样做完后重新制作的*.iso有问题。运行时不读取光盘内容。。而进入网络安装选择界面。。我用排除法排除了其他出错的可能。。大虾帮看下这上面两部的命令对不对阿?是不是我命令错了造成的问题阿?
linuxing 回复于 2008/03/30 22:59
我用的是这个:
mkcramfs stage2/ stage2.img
路过者
2008/03/28 19:46
大虾更新挺快阿grin
那个问题我自己解决了。哈哈。还是谢谢哈。
路过者
2008/03/28 13:09
sweatsweatsweat
大虾。你在前面说关于重新生成stage2.img在附录里说明。。
但是你在附录里又说,关于这点以后另外说明。。。
这不是忽悠人么。。。sweat
linuxing 回复于 2008/03/28 15:09
当时想写到一篇文档里面,但后来发现太长了。所以,把其分开到了个性化那篇中,里面有较详细的描述的。底层的修改需要有python的知识,可先看看相关的知识。
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]