加入收藏 | 设为首页 | 会员中心 | 我要投稿 江门站长网 (https://www.0750zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

自己做WIN2000“N合1”光盘

发布时间:2019-12-12 10:12:20 所属栏目:MsSql教程 来源:蓝点
导读:这段时间流行了一阵“N合1”风,最早是WIN2000的PRO,SERVER和ADVSERVER三个版本做成一张光盘,刚开始我还以为是简单的把三个系统的安装盘刻在一张上面,后来大概算了一下,少说也有900M-1G的数据,不太可能。下了一张来看看,发现做法非常新鲜: 其实WIN20
这段时间流行了一阵“N合1”风,最早是WIN2000的PRO,SERVER和ADVSERVER三个版本做成一张光盘,刚开始我还以为是简单的把三个系统的安装盘刻在一张上面,后来大概算了一下,少说也有900M-1G的数据,不太可能。下了一张来看看,发现做法非常新鲜:

  其实WIN2000的三个版本的安装盘中,有大量的文件是相同的,特别是语言包/字库(I386LANG目录)以及写字板等自带应用程序,以及那个50M的driver.cab。不同的只是相对少数的系统文件。这种N合1光盘将ISO映象经过特殊处理,重复的文件,实际数据在光盘上只有一份,通过类似于修改光盘目录表的办法,让不同的目录/文件指向相同的数据区。完成ISO修改后再刻成光盘。这样,既省了空间,又让每个目录看起来仍然独立、完整。

  那么到底有多少相同呢?我自己做了个实验,我有一个WIN2K PRO安装目录和一个ADV SERVER安装目录,分别是260M和280M左右。(为了省空间,我去掉了除简/繁体中文外的其它语言包,象韩文日文阿拉伯文,我这辈子都用不到)。两个目录如果简单的刻在一张盘上,将占540M左右的空间。而用N合1的方法,“相同文件只处理一次”,合并下来只有340M左右。照这个数字看来,二者有70-75%是相同的!不同部分只占各自的25%-30%!依此数字估算,就算将SERVER也加进去,最后的大小也应该只有400-450M,相对于简单相加的800M,几乎少了一半。如果你不想将三个差不多的WIN2000分别用三张CDR保存的话,可以考虑自己做个N合1光盘。

  说到这里不仅要提一下DOS/WIN文件系统的落后。UNIX/LINUX从最开始就提供了符号连接的功能,一个简单的ln命令就可以完成上面的工作,而在DOS/WIN下,这种操作必须借助专门的软件通过修改ISO进行,而且这种结构还不能存在于硬盘上,因为它在所有针对DOS/WIN的磁盘检查软件看来,都是“交叉连接”,会被更正。

  好了,别扯远了。话说回来,理解这种方式很容易,实际做起来呢?关键是“相同文件”是怎么判断。靠人工是很麻烦的。实际上微软内部提供了一个工具,叫CDIMAGE,专门干这个。加上一个-o参数,就可以实现“自动优化”的功能。MS很多内部发行版本,都是用这个办法“挤”在一张盘上。这个小工具解压只有70K。点这里下载

运行cdimage它会给出详细的命令参数:

CDIMAGE 2.39 CD-ROM Premastering Utility

Copyright ? Microsoft, 1993-1997. All rights reserved.

For Microsoft internal use only.

Usage: CDIMAGE [options] sourceroot targetfile

   -l volume label, no spaces (e.g. -lMYLABEL)

   -t time stamp for all files and directories, no spaces, any delimiter

     (e.g. -t12/31/91,15:01:00)

   -g encode GMT time for files rather than local time

   -h include hidden files and directories

   -n allow long filenames (longer than DOS 8.3 names)

   -nt allow long filenames, restricted to NT 3.51 compatibility

     (-nt and -d cannot be used together)

   -d don’t force lowercase filenames to uppercase

   -c use ANSI filenames versus OEM filenames from source

   -j1 encode Joliet Unicode filenames AND generate DOS-compatible 8.3

     filenames in the ISO-9660 name space (can be read by either

     filenames in the ISO-9660 name space (can be read by either

     Joliet systems or conventional ISO-9660 systems, but some of the

     filenames in the ISO-9660 name space might be changed to comply

     with DOS 8.3 and/or ISO-9660 naming restrictions)

   -j2 encode Joliet Unicode filenames without standard ISO-9660 names

     (requires a Joliet operating system to read files from the CD)

     When using the -j1 or -j2 options, the -n, -nt, and -d options

     do not apply and cannot be used.

   -js non-Joliet "readme.txt" file for images encoded with -j2 option

     (e.g. -jsc:locationreadme.txt). This file will be visible as

     the only file in the root directory of the disc on systems that

     do not support the Joliet format (Windows 3.1, NT 3.x, etc).

   -u1 encode "UDF" file system along with mirror ISO-9660 file system

     (-n, -nt, -d, -c, or -j1, -j2 options apply to ISO-9660 portion)

   -u2 encode "UDF" file system without a mirror ISO-9660 file system

     (requires a UDF capable operating system to read the files)

   -us non-UDF "readme.txt" file for images encoded with -u2 option

     (e.g. -usc:locationreadme.txt). This file will be visible as

     the only file in the root directory of the disc on systems that

     do not support the UDF format.

   -b "El Torito" boot sector file, no spaces

     (e.g. -bc:locationcdboot.bin)

   -s sign image file with digital signature (no spaces, provide RPC

   -s sign image file with digital signature (no spaces, provide RPC

    server and endpoint name like -sServerName:EndPointName)

   -x compute and encode "AutoCRC" values in image

   -o optimize storage by encoding duplicate files only once

   -oc slower duplicate file detection using binary comparisons rather

    than MD5 hash values

   -oi ignore diamond compression timestamps when comparing files

   -os show duplicate files while creating image

    (-o options can be combined like -ocis)

   -w warning level followed by number (e.g. -w4)

    1 report non-ISO or non-Joliet compliant filenames or depth

    2 report non-DOS compliant filenames

    3 report zero-length files

    4 report each file name copied to image

   -y test option followed by number (e.g. -y1), used to generate

    non-standard variations of ISO-9660 for testing purposes:

    1 encode trailing version number ’;1’ on filenames (7.5.1)

    2 round directory sizes to multiples of 2K (6.8.1.3)

    5 write i386 directory files first, in reverse sort order

    6 allow directory records to be exactly aligned at ends of sectors

     (ISO-9660 6.8.1.1 conformant but breaks MSCDEX)

    7 warn about generated shortnames for 16-bit apps under NT 4.0

    b blocksize 512 bytes rather than 2048 bytes

    b blocksize 512 bytes rather than 2048 bytes

    d suppress warning for non-identical files with same initial 64K

   -k (keep) create image even if fail to open some of the source files

   -m ignore maximum image size of 681,984,000 bytes

   -a allocation summary shows file and directory sizes

   -q scan source files only, don’t create an image file

   NOTE: Many of these options allow you to create CD images

      that are NOT compliant with ISO-9660 and may also

      NOT be compatibile with one or more operating systems.

      If you want strict ISO and DOS compliance, use the -w2

      warning level and correct any discrepencies reported.

      YOU are responsible for insuring that any generated CDs

      are compatible with all appropriate operating systems.

      Also note that Microsoft company information is placed

      in the image volume header, so don’t use this program

      to generate CDs for companies other than Microsoft.

  当然它不光是用来做WIN2000的N合1。对所有“大量文件重复”的情况,用它都可以发挥极大作用。不过……好象这种情况不多……大家举点例子?

  具体做法:

  1、建一个目录,把它看成是你要做的光盘的根目录,把所有要放上去的内容全弄进去,比如,这个目录叫c:ewin3in1,里面分别有

c:ewin3in1pro

c:ewin3in1server

c:ewin3in1advserver

  目录,分别对应三个WIN2000版本。现在查看目录属性,应该在800M或更多,无法放在一张光盘上。

  2、现在用CDIMAGE程序,在另一目录(你想产生ISO文件的目录)中运行:

cdimage -lWin2K3IN1 -t07/30/01,00:00:00 -h -n -o -m c:ewin2k My3IN1.ISO

直接运行CDIMAGE将显示参数说明。下面简单解释一下常用参数意义:

-l : (是JKL的L,不是IBM的I)这是光盘的卷标

-t : 将所有文件设成指定的时间,看起来很专业

-h : 包括隐藏文件

-n : 允许长文件名

-o : 这是最重要的,CDIMAGE的精华就是它。自动判断重复文件,对重复文件只处理一次,并自动修改相关的文件指向。默认是使用文件大小和MD5算法进行比较(我也不太懂,大概是和CHECKSUM差不多概念的方法吧)从概率角度来看准确性相当高,但并不是“逐字节对比”。如果你要求逐字节对比,用-oc参数。不过速度极慢。

-m : 不加这个参数的话,将不能产生大于650M的ISO映象

c:ewin2k : 这是光盘的根目录。CDIMAGE将以此目录开始构造光盘目录结构,硬盘上的c:ewin2kpro将变成光盘的x:pro

My3IN1.ISO : 这是最后生成的ISO文件的名字。它已经是优化后的了。

  3、最后只需用烧录软件(如EASY CD CREATOR的CREATE DISK FROM IMAGE)将ISO刻成光盘即可。

  至此我们的N合1就做完了。当然这张盘只是简单的将三个安装目录放在一起,而且不能启动。比较理想的情况是,将光盘做成像2000那样自动启动并开始安装的,更理想的情况是开机出现菜单,可以选择安装PRO/SERVER或ADVSERVER,然后自动调用相应的安装程序。

1) MD ewin2kenglishwin2000pro

               server

               AdvSvr

  and put each version into the dir

2) copy Cdrom_ia.5, cdrom_is.5, cdrom_ip.5, cdrom_nt.5 to ewin2k

3) copy anthing else you want into the "root" directory--ewin2k

make the cdimage with the command:

cdimage -lWIN2000_EN -t06/04/00,00:00:00 -h -n -bg:boot.bin -o -m

  主要有两点:一是把CDROM_xx.5这些文件放到光盘根目录,让安装程序认为这是原版。另外需要做一个启动软盘的映象文件如boot.bin然后做CDIMAGE的时候用-bc:boot.bin来让ISO可启动。

  这种盘当然也有缺点,而且是显而易见的:

  1、如果光盘有某个地方损坏,刚好又是大家“共享”的系统文件,那么可能3个WIN2000都将报废,无法安装。普通光盘只是损坏那个文件所属的那一个版本。

  2、最好要有光盘刻录机,这种ISO镜象,用WINIMAGE解是没有意义的,WINIMAGE并不懂得这种修改过的结构,它将按目录表把所有文件解到硬盘,相同文件被复制了若干份。相当于还原成优化之前的状态。象那个EWIN 6合一,解开后好象有1.9G左右。

  不过相对来说这些缺点都不重要。

(编辑:江门站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读