|
发表于 2009-4-13 09:45:07
|
显示全部楼层
Post by conanx;1973414
郁闷!每个RH的企业版都可以把CD的镜像合并成DVD,下面是一篇我以前收藏的文章,而且我也合并了RHEL4.5成功了。
所用工具:UltraISO
1.用UltraISO打开第一张光盘的镜像文件RHEL4-U5-i386-AS-disc1.iso
2.提取出根目录下的.discinfo文件到桌面
3.用记事本打开
1105116601.310480
Red Hat Enterprise Linux 4
i386
1
RedHat/base
RedHat/RPMS
RedHat/pixmaps
用记事本打开修改为:
1105116601.310480
Red Hat Enterprise Linux 4
i386
1,2,3,4,5
RedHat/base
RedHat/RPMS
RedHat/pixmaps
保存,再把这个文件添加回去,替换掉老的那个!
4.用UltraISO分别打开其它光盘的镜像文件,提取出目录/RedHat/RPMS下的所有文件(是.RPM文件)到一个临时文件夹Temp下(有重复就替换掉都没关系,因为只有一个TRANS.TBL文件会重复,这个文件最后还要删除它.)
5.然后把刚提取出的临时文件夹Temp下的所有文件添加到母盘的/RedHat/RPMS目录下.
6.删除所有这个母盘下的TRANS.TBL文件,包括所有目录下的TRANS.TBL文件都要删除.
7.选择"文件"下的"属性...",在"文件系统"选项卡选择优化文件!这一步的目的是使保存后的文件不会出奇的大!设置好后保存就可以啦!要等一些时间就可以完成!可能完成后会多出一个无用的文件(较小的那个)!删除它,另外一个比较大就就是新产品啦!
8.可以命名为RHEL4-U5-i386-AS-dvd.iso有2.2G.
你这种做法是不能通过光盘检测的。
要做的话网上找个脚本。全部在LINUX下操作。还可以通过光盘检测。
把rhel5 cd iso合并成dvd的脚本
经合并后,在vmware中以该dvd.iso启动,并正常安装了rhel5.
用法: ./script.sh /TheCdIsoPath /home/username/dvd.iso
- #!/bin/bash
- # by Chris Kloiber <[email]ckloiber@redhat.com[/email]>
- # A quick hack that will create a bootable DVD iso of a Red Hat Linux
- # Distribution. Feed it either a directory containing the downloaded
- # iso files of a distribution, or point it at a directory containing
- # the "RedHat", "isolinux", and "images" directories.
- # This version only works with "isolinux" based Red Hat Linux versions.
- # Lots of disk space required to work, 3X the distribution size at least.
- # GPL version 2 applies. No warranties, yadda, yadda. Have fun.
- if [ $# -lt 2 ]; then
- echo "Usage: `basename $0` source /destination/DVD.iso"
- echo ""
- echo " The 'source' can be either a directory containing a single"
- echo " set of isos, or an exploded tree like an ftp site."
- exit 1
- fi
- cleanup() {
- [ ${LOOP:=/tmp/loop} = "/" ] && echo "LOOP mount point = \/, dying!" && exit
- [ -d $LOOP ] && rm -rf $LOOP
- [ ${DVD:=~/mkrhdvd} = "/" ] && echo "DVD data location is \/, dying!" && exit
- [ -d $DVD ] && rm -rf $DVD
- }
- cleanup
- mkdir -p $LOOP
- mkdir -p $DVD
- if [ !`ls $1/*.iso 2>&1>/dev/null ; echo $?` ]; then
- echo "Found ISO CD images..."
- CDS=`expr 0`
- DISKS="1"
- for f in `ls $1/*.iso`; do
- mount -o loop $f $LOOP
- cp -av $LOOP/* $DVD
- if [ -f $LOOP/.discinfo ]; then
- cp -av $LOOP/.discinfo $DVD
- CDS=`expr $CDS + 1`
- if [ $CDS != 1 ] ; then
- DISKS=`echo ${DISKS},${CDS}`
- fi
- fi
- umount $LOOP
- done
- if [ -e $DVD/.discinfo ]; then
- awk '{ if ( NR == 4 ) { print disks } else { print ; } }' disks="$DISKS" $DVD/.discinfo > $DVD/.discinfo.new
- mv $DVD/.discinfo.new $DVD/.discinfo
- fi
- else
- echo "Found FTP-like tree..."
- cp -av $1/* $DVD
- [ -e $1/.discinfo ] && cp -av $1/.discinfo $DVD
- fi
- rm -rf $DVD/isolinux/boot.cat
- find $DVD -name TRANS.TBL | xargs rm -f
- cd $DVD
- mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .
- /usr/lib/anaconda-runtime/implantisomd5 --force $2
- cleanup
- echo ""
- echo "Process Complete!"
- echo ""
复制代码 |
|