Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1116706
  • 博文数量: 309
  • 博客积分: 6093
  • 博客等级: 准将
  • 技术积分: 3038
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-03 17:14
个人简介

linux学习记录

文章分类

全部博文(309)

文章存档

2014年(2)

2012年(37)

2011年(41)

2010年(87)

2009年(54)

2008年(88)

分类: LINUX

2008-07-02 09:59:33

1.  创建repodata文件夹:mkdir repodata

2.  创建comps.xml文件

3.  createrepo -g repodata/comps.xml . (注意.)

4.  添加autorun文件,使光盘可以自动运行,内容如下:

#!/bin/sh
#
# Autorun script for NeoShine Linux Develop disk
# Copyright (c) 2004 CS2S, Inc.

/usr/bin/layer-product-installer >/dev/null 2>&1

5.  添加隐藏文件.discinfo,格式如下:

20081014.000000
SVR5.0
i386
1
NeoShine

6.  添加隐藏文件.productinfo.General,格式如下:

NeoShine Linux General Server
5.0/Annapurna
Build07/20081014

7.  添加隐藏文件.productinfo.DATABASE,格式如下:

NeoShine Linux DateBase Server
5.0/Annapurna_build07
Build02/20081014

8.  制作ISO映像:

mkisofs -J -T -R -V volume_id -o mycd.iso source_dir

 

mkisofs 主要参数说明:

-J -r 分别是兼容 Windows/Unix 文件格式

-J/-joliet 使用 Joliet 格式的目录和文档名称

-T/-translation-table 为每个目录都生成一个 TRANS.TBL 文档名转换表文档

-R/-rock 使用 Rock Ridge Extensions

-V/-volid  指定光盘的卷标ID

 

9.  制作具备自我校验功能的光盘

ISO文档在网络传输过程中可能会发生改变,这个能够通过MD5校验码来检测文档的完整性,即:发布ISO的同时也公开其MD5校验码,这样他人下载 ISO后,再进行一次MD5运算,假如得到的MD5值和提供的相同,则ISO文档和原始文档一定相同,否则就得重新下载。

ISO刻录到光盘后,又如何校验光盘上刻录的内容是否和原始ISO中的内容完全相同呢?因为在刻录过程中,也许...也许会出现错误。

这就需要用到 isomd5sum 这个工具了

加入MD5校验信息:

implantisomd5 --force ISO文档

刻录后,能够通过 checkisomd5 --verbose  来校验数据完整性。




附ISO制作完整脚本(带MD5校验)
==============================
脚本运行参数
============
    mkiso.sh   
               
               
               
               
                #!/bin/sh
#****************************************************
#         Author: Muddyboot - toobyddum@gmail.com
#  Last modified: 2007-09-11 21:21
#       Filename: mkiso.sh
#    Description: script for easy creating ISO image
#****************************************************
if [ $# -lt 3 ]; then
    echo -e "\nUsage: `basename $0` source_dir output_iso cd_label \n"
    exit 1
fi
source=$1
output=$2
label=$3
### extra mkiso argument
shift 3
for i in $@; do
    extra_args="$extra_args $1 "
    shift
done
if [ ! -e "$source" ]; then
    echo -e "\nERR: Source file or directory does not exist ! \n"
    exit 1
fi
## remove exists TRANS.TBL files
if [ -d "$source" ]; then
    find $source -name TRANS.TBL | xargs rm -f
fi
### 制作ISO
mkisofs -J -T -R $extra_args \
    -V $label -o $output $source
### 加入 MD5 校验信息
MD5_CHECKSUM=`whereis implantisomd5|awk -F': ' '{print $2}'`
if [ -z "$MD5_CHECKSUM" ]; then
    echo -e "\n** WARNING: implantisomd5 not found, no md5sum added.\n"
else
    echo -e "\n** Good, implantisomd5 program found."
    echo "Adding md5sum information for ISO image ..."
    implantisomd5 --force $output
fi
echo
echo "** ISO image $output created successfully ! "
echo
阅读(1755) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~