RHEL 4/5 DVD光盘的制作及其注意事项

Chris Kloiber 发布的一个 shell script 可以将下载的 iso 制作成 DVD,其注意事项如下:

1.通常安装时系统不安装 anaconda-runtime,因此/usr/lib/anaconda-runtime/implantisomd5
  无法执行,所以制作的DVD不能安装前检测。如果你想制作一个能安装前检测的DVD,制作前清检查
     你的系统。
2. 不同版本的anaconda-runtime所在的光盘不同,下面是 RHEL 4/5的,手动安装:
     RHEL AS 4u4 i386 disc4 anaconda-runtime-10.1.1.46-1.i386.rpm
     RHEL AS 4u4 x86_64 disc4 anaconda-runtime-10.1.1.46-1.x86_64.rpm
     RHEL Server 5 i386 disc5 anaconda-runtime-11.1.2.36-1.i386.rpm
     RHEL Server 5 x86_64 disc6 anaconda-runtime-11.1.2.36-1.x86_64.rpm
3. Chris Kloiber 的 shell script 没有添加 label,我把它加上了,用法如下
        mkdvd /path/to/iso /home/prometheus/rhel-as-4-i386-dvd.iso "RHEL AS 4 DVD"
        mkdvd /path/to/src /home/prometheus/rhel-as-4-i386-dvd.iso RHEL-AS-4-DVD
     label 中间带空格时要加引号,如 "rhel as 4u4 i386 dvd ",但需要修改环境变量,
   建议不带空格。不超过32字符,Windows 显示16个字符。
4. 我用 RHEL AS 4 i386/x64 和 RHEL 5 i386/x86 做了测试,都没有问题。
5. 如果直接拷贝下面的 shell script,请存成 ASCII 码,以免不能执行。你也可以直接下在附件。

#!/bin/bash
# by Chris Kloiber <ckloiber@redhat.com>
# 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 you want implant iso md5 into DVD, Be sure /usr/lib/anaconda-runtime/implantisomd5
# is installated correctlly. anaconda-runtime rpm in the following disc.
# RHEL AS 4 i386 disc4 anaconda-runtime-10.1.1.46-1.i386.rpm
# RHEL AS 4 x86_64 disc4 anaconda-runtime-10.1.1.46-1.x86_64.rpm
# RHEL Server 5 i386 disc5 anaconda-runtime-11.1.2.36-1.i386.rpm
# RHEL Server 5 x86_64 disc6 anaconda-runtime-11.1.2.36-1.x86_64.rpm
# Usage:
# mkdvd /path/to/iso /home/prometheus/rhel-as-4-i386-dvd.iso "RHEL AS 4 DVD"
# mkdvd /path/to/src /home/prometheus/rhel-as-4-i386-dvd.iso RHEL-AS-4-DVD

if [ $# -lt 3 ]; then
    echo "Usage: `basename $0` source iso_file iso_label"
    echo ""
    echo " 'source' can be either a directory containing a single"
    echo " set of isos, or an exploded tree like an ftp site."
    echo " 'iso_file' is the iso file to be created."
    echo " 'iso_label' is the DVD disk label."
    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 -V $3 -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 ""
 

--------------------

原文地址:http://www.aoxue.org/cgi-bin/bbs/topic_show.cgi?id=109820&bpg=1&age=0

红帽企业 Linux 详情 服务器解决方案 红帽企业 Linux AS 最高性能的企业级服务器,支持高端系统和用于关键任务的系统。可提供最高级别的支持服务。 红帽企业 Linux ES 适用于当今大多数商业计算环境中的小到中型服务器解决方案。 客户机解决方案 红帽企业 Linux WS 适用于软件开发,高性能台式机计算,特定的客户端应用程序和高性能计算(HPC)。 红帽 Desktop 红帽 Desktop 是需要大量客户机系统的理想选择。它提供了包括红帽网络代理或红帽卫星服务器的10单元和50单元两种选择。 红帽企业 Linux 包括了大约 1500 个软件包,为用户提供了一个多性能的计算环境。以下列出了其中的一些主要功能。如需了解更多的信息,请参阅产品文档。 2. 红帽企业 Linux 系列中的各个产品有什么不同?我应该选择哪一个? 从技术的角度来讲,红帽企业 Linux 系列中的四种产品 – 红帽企业 Linux AS、ES、WS 和 Desktop 是非常相似的。红帽企业 Linux 系列的一个设计目标是所有的产品都具有高度的共性:无论是运行应用程序的环境还是系统管理的环境都高度的统一。AS 和 ES 是为服务器所设计的;WS 是为计算节点和技术工作站所设计的;而红帽 Desktop 则适用于普通的办公环境。AS 和 ES 提供相同的功能。它们的不同之处在于,ES 支持双 CPU 服务器和16GB的主内存,而 AS 支持任何配置的服务器。WS 和红帽 Desktop 不包括 AS 和 ES 提供的一些服务器应用程序,因此它们并不适用于服务器环境。红帽 Desktop 支持大到4GB内存的单 CPU 系统,而 WS 支持双 CPU, 并且没有对内存的限制。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值