RedHat DVD安装盘制作

Redhat 4(光驱生成ISO)

第一步:先准备一个较大的硬盘空间,大约4.5G,有条件最好大一点;

第二步:建立一个目录,存放CD的ISO文件;
    

mkdir /mnt/iso 


第三步:制作CD的ISO文件;

    分别将RedHatEL4的四张光盘,放入光驱,进行光盘镜像,制作ISO格式文件;

    dd if=/dev/hdc of=/mnt/iso/disk1.iso

    dd if=/dev/hdc of=/mnt/iso/disk2.iso

    dd if=/dev/hdc of=/mnt/iso/disk3.iso

    dd if=/dev/hdc of=/mnt/iso/disk4.iso


 第四步:建立目录,以便mount刚才的镜像文件;

    mkdir /mnt/el4_iso

    mkdir /mnt/el4_iso/disk{1,2,3,4} /mnt/el4_iso/docs


第五步:挂载上面制作的ISO文件

    mount -o loop /mnt/iso/disk1.iso /mnt/el4_iso/disk1

    mount -o loop /mnt/iso/disk2.iso /mnt/el4_iso/disk2

    mount -o loop /mnt/iso/disk3.iso /mnt/el4_iso/disk3

    mount -o loop /mnt/iso/disk4.iso /mnt/el4_iso/disk4


第五步:拷贝isolinux及.discinfo文件;

    cd /mnt/el4_iso

    cp -av disk1/isolinux disk1/.discinfo ./


第六步:编辑.discinfo文件,将第4行的1换成1,2,3,4,以表示要用这四4个ISO文件;

第七步:制作DVD的ISO文件;

mkisofs -o dvd.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot

-boot-load-size 4 -boot-info-table -R -m TRANS.TBL -x disk1/.discinfo -x disk1/isolinux

-graft-points disk1 .discinfo=.discinfo isolinux/=isolinux RedHat/=disk2/RedHat

RedHat/=disk3/RedHat RedHat/=disk4/RedHat docs/=docs/



     OK,到此为止,已经成功将4张CD制作成一张DVD了!将其刻录到DVD盘上,以后安装RedHat就不用做那令人厌烦的换盘的事情了!
如果想把extra那张盘上的程序包制作到DVD中,可以把Extras这张盘mount到disk5目录下,mkisofs命令中加入 -x disk5/RedHat/base RedHat=cd5/RedHat/

Redhat 5(mount镜像)

mkdir disk{1,2,3,4,5}
mkdir docs
mount -o loop rhel-5-server-i386-disc1.iso disk1/
mount -o loop rhel-5-server-i386-disc2.iso disk2/
mount -o loop rhel-5-server-i386-disc3.iso disk3/
mount -o loop rhel-5-server-i386-disc4.iso disk4/
mount -o loop rhel-5-server-i386-disc5.iso disk5/
cp -av disk1/isolinuxdisk1/.discinfo ./
vi .discinfo
#将第4行的1改为1,2,3,4,5
mkisofs -o RHEL5dvd.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 5 -boot-info-table -R -m TRANS.TBL -x disk1/.discinfo -x disk1/isolinux -graft-points disk1 .discinfo=.discinfo isolinux/=isolinux Server/=disk2/Server/ Server/=disk3/Server/ Server/=disk4/Server/ Server/=disk5/Server/ Cluster/=disk5/Cluster ClusterStorage/=disk5/ClusterStorage/ VT/=disk5/VT/ docs/=docs/

如何通过media test
生成dvdiso镜像后, 运行/usr/sbin/implantisomd5 --force RHEL5dvd.iso, 就可以通过media test了.

另, 如果系统没有implantisomd5, 可以从http://www.rocklinux.net/sources/misc/isomd5sum/下载源码,
先make, 然后 mv implantisomd5 checkisomd5 /usr/sbin.

注意事项:
可能会出现如下错误
Using BOOT000.CAT;1 for  isolinux/boot.cat (boot.cat)
mkisofs: Error: '(NULL POINTER)' and 'isolinux/boot.cat' have the same Rock Ridge name 'boot.cat'.
mkisofs: Unable to sort directory isolinux

删除boot.cat文件
cd isolinux
rm boot.cat

改进制作的iso镜像
按以上方法制作的镜像文件在windows下直接读取的话文件名全部遵循iso09660规范,而且没有加入Joliet文件系统,给我们的使用带来了很大的不方便。添加J、D、U、T参数后,除了光盘的名称为默认的”CDROM“外,基本和Redhat官方的DVD iso格式一致。

mkisofs -o dvd.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -JRDUT -m TRANS.TBL -x disk1/.discinfo -x disk1/isolinux -graft-points disk1 .discinfo=.discinfo isolinux/=isolinux RedHat/=disk2/RedHat RedHat/=disk3/RedHat RedHat/=disk4/RedHat

-J 创建Joliet文件系统(windows)

-R 创建Rock Ridge文件系统(unix/linux,保留权限信息)

-r     This  is  like  the -R option, but file ownership and modes are
              set to more useful values.  The uid and gid are  set  to  zero,
              because  they  are  usually only useful on the author’s system,
              and not useful to the client.  All the file read bits  are  set
              true,  so  that  files and directories are globally readable on
              the client.  If any execute bit is set for a file, set  all  of
              the  execute  bits, so that executables are globally executable
              on the client.  If any search bit is set for a  directory,  set
              all  of  the  search  bits,  so  that  directories are globally
              searchable on the client.  All write bits are cleared,  because
              the  CD-Rom  will  be mounted read-only in any case.  If any of
              the special mode bits are set, clear them, because  file  locks
              are  not useful on a read-only file system, and set-id bits are
              not desirable for uid 0 or gid 0.  When used on Win32, the exe-
              cute  bit  is set on all files. This is a result of the lack of
              file permissions on Win32 and the Cygwin POSIX emulation layer.
              See also -uid -gid, -dir-mode, -file-mode and -new-dir-mode.

-D 彻底隐藏rr_moved目录 -disable-deep-relocation Disable deep directory relocation (violates ISO9660)

-U 不转换文件名 -untranslated-filenames Allow Untranslated filenames (for HPUX & AIX - violates ISO9660). Forces -l, -d, -N, -allow-leading-dots, -relaxed-filenames, -allow-lowercase, -allow-multidot

-T 产生TRANS.TBL文件 Generate translation tables for systems that don't understand long filenames

-graft-points
Allow to use graft points for  filenames.  If  this  option  is used,  all filenames are checked for graft points. The filename is divided at the first unescaped equal sign.  All  occurrences of  ’//’  and  ’=’  characters  must  be  escaped  with
’//’ if -graft-points has been specified.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值