這段時間流行了一陣
N合
風
最早是WIN
的PRO
SERVER和ADVSERVER三個版本做成一張光盤
剛開始我還以為是簡單的把三個系統的安裝盤刻在一張上面
後來大概算了一下
少說也有
M
G的數據
不太可能
下了一張來看看
發現做法非常新鮮
其實WIN
的三個版本的安裝盤中
有大量的文件是相同的
特別是語言包/字庫(I
\LANG目錄)以及寫字板等自帶應用程序
以及那個
M的driver
cab
不同的只是相對少數的系統文件
這種N合
光盤將ISO映象經過特殊處理
重復的文件
實際數據在光盤上只有一份
通過類似於修改光盤目錄表的辦法
讓不同的目錄/文件指向相同的數據區
完成ISO修改後再刻成光盤
這樣
既省了空間
又讓每個目錄看起來仍然獨立
完整
那麼到底有多少相同呢?我自己做了個實驗
我有一個WIN
K PRO安裝目錄和一個ADV SERVER安裝目錄
分別是
M和
M左右
(為了省空間
我去掉了除簡/繁體中文外的其它語言包
象韓文日文阿拉伯文
我這輩子都用不到)
兩個目錄如果簡單的刻在一張盤上
將占
M左右的空間
而用N合
的方法
相同文件只處理一次
合並下來只有
M左右
照這個數字看來
二者有
%是相同的!不同部分只占各自的
%
%!依此數字估算
就算將SERVER也加進去
最後的大小也應該只有
M
相對於簡單相加的
M
幾乎少了一半
如果你不想將三個差不多的WIN
分別用三張CDR保存的話
可以考慮自己做個N合
光盤
說到這裡不僅要提一下DOS/WIN文件系統的落後
UNIX/LINUX從最開始就提供了符號連接的功能
一個簡單的ln命令就可以完成上面的工作
而在DOS/WIN下
這種操作必須借助專門的軟件通過修改ISO進行
而且這種結構還不能存在於硬盤上
因為它在所有針對DOS/WIN的磁盤檢查軟件看來
都是
交叉連接
會被更正
好了
別扯遠了
話說回來
理解這種方式很容易
實際做起來呢?關鍵是
相同文件
是怎麼判斷
靠人工是很麻煩的
實際上微軟內部提供了一個工具
叫CDIMAGE
專門干這個
加上一個
o參數
就可以實現
自動優化
的功能
MS很多內部發行版本
都是用這個辦法
擠
在一張盤上
這個小工具解壓只有
K
運行cdimage它會給出詳細的命令參數
CDIMAGE
CD
ROM Premastering Utility
Copyright (C) Microsoft
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
t
/
/
:
:
)
g encode GMT time for files rather than local time
h include hidden files and directories
n allow long filenames (longer than DOS
names)
nt allow long filenames
restricted to NT
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
j
encode Joliet Unicode filenames AND generate DOS
compatible
filenames in the ISO
name space (can be read by either
filenames in the ISO
name space (can be read by either
Joliet systems or conventional ISO
systems
but some of the
filenames in the ISO
name space might be changed to comply
with DOS
and/or ISO
naming restrictions)
j
encode Joliet Unicode filenames without standard ISO
names
(requires a Joliet operating system to read files from the CD)
When using the
j
or
j
options
the
n
nt
and
d options
do not apply and cannot be used
js non
Joliet
readme
txt
file for images encoded with
j
option
(e
g
jsc:\location\readme
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
NT
x
etc)
u
encode
UDF
file system along with mirror ISO
file system
(
n
nt
d
c
or
j
j
options apply to ISO
portion)
u
encode
UDF
file system without a mirror ISO
file system
(requires a UDF capable operating system to read the files)
us non
UDF
readme
txt
file for images encoded with
u
option
(e
g
usc:\location\readme
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:\location\cdboot
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 MD
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
w
)
report non
ISO or non
Joliet compliant filenames or depth
report non
DOS compliant filenames
report zero
length files
report each file name copied to image
y test option followed by number (e
g
y
)
used to generate
non
standard variations of ISO
for testing purposes:
encode trailing version number
;
on filenames (
)
round directory sizes to multiples of
K (
)
write \i
directory files first
in reverse sort order
allow directory records to be exactly aligned at ends of sectors
(ISO
conformant but breaks MSCDEX)
warn about generated shortnames for
bit apps under NT
b blocksize
bytes rather than
bytes
b blocksize
bytes rather than
bytes
d suppress warning for non
identical files with same initial
K
k (keep) create image even if fail to open some of the source files
m ignore maximum image size of
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
and may also
NOT be compatibile with one or more operating systems
If you want strict ISO and DOS compliance
use the
w
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
當
From:http://tw.wingwit.com/Article/os/youhua/201311/10949.html