iMac 发表于 2005-12-24 03:07

longhorn wim封装不再神秘---install.wim剖析

前些天笔者下载了“WinXP_W2K3_WIM_免激活预封装_for_FtpDown_v1.0”,便对“WIM”封装起了兴趣。
众所周知,微软从WINDOWS LONGHORN开始,其封装及其安装采取新的方式:WINPE+INSTALL.WIM镜像。
本来想法挺简单的:自己用ximage.exe做个镜像文件,然后替换原来ccfly888里的install.wim。但是,在测试时发现并不能出现winpe的启动画面。
随后,我联系了hnlyzhd,经他指点,知道是自己的install.wim出了问题,于是我用ximage /info d:\install.wim查看了ccfly888里的install.wim(见下图)。
从这个图可以看出,ccfly888的install.wim分成3部分了。第一部分:WinPE Boot Image; 第二部分:WinPE Drive Image; 第三部分:windows xp
知道了文件的结构就不难制作了,于是,我就想怎样将前两部分加到我自己的install.wim中,接着我用ximage /?查看了其中的帮助看到里面有 /boot和/append两个参数。于是,我一下子明白是怎么回事了。现在将具体的制作思路写在下面:
step 1.从ccfly888的install.wim提取第一部分:WinPE Boot Image到指定的空分区(盘符设为J:),然后执行命令:ximage /apply D:\install.wim J: 1
(“1”不能少,用来指定提取第一部分启动信息)
step 2.用ximage /boot 来生成带启动信息的WIM镜像,具体命令如下:
ximage /boot /capture /lzx /flags 1 J: e:\install.wim "WinPE Boot Image"
/capture表示生成镜像,/flags 1 表示用户自定义的标记。这里仍然遵循原镜像的约定。
/lzx 是压缩参数,经过测试,这是最大的压缩参数。
引号里的参数是自定义的描述性信息
step 3.删除D分区所有文件,从原install.wim里释放第二部分到D分区,命令如下
ximage /apply D:\install.wim J: 2
(“2”不能少,用来指定提取第二部分驱动信息)
step 4将D分区里的驱动信息追加到step 2中生成已经带启动信息的install.wim中,命令如下:
ximage /append /lzx /scroll /flags 2 D: e:\install.wim "WinPE Drive Image"
(/append表示追加,/scroll表示以滚屏方式显示进度,/flags 2表示作的标记,仍然遵循原镜像的约定)
到此为止,主要工作就完成了,现在生成的wim镜像已经含有PE必需的启动信息和驱动信息.剩下的工作是,你找个裸机,安装xp-减肥-封装。然后再用ximage /append命令将xp追加到step 4生成的wim镜像中,然后你再用这个install.wim镜像替换ccfly888提供的ISO里的相应到此的文件
到此为止所有工作完成!
如有不妥之处,敬请指正!
从老外的论坛里copy了一下文字,供大家参考,主要谈论了用 Longhorn 的技术来repack xp. 有些乱!
Use the Sysprep version installed by Longhorn 4074. USe it's GUI to set the following settings: Mode: factory, image:yes, exit:exit.
When you install Longhorn 4074, you get a folder named sysprep on your installation drive.If you enter, there is a file called sysprep.exe. Sysprep is one of the deployment tools for all Windows NT-based OS. Also, I've found out that this won't fully work, as the installer will request the product key for Longhorn, not for XP. To avoid this, copy pidgen.dll and setupp.ini from the original (non-repacked) installation CD to the ISO image using UltraISO overwriting the previous ones.
Well i needed a repacked version cos i am creating Windows XP Live-CD and now i can create Windows XP Live-CD WIM Edition, thnks guys! Yeah i have made a bootable CD with booting Windows XP Preinstallation Environment created with PEBuilder and when it's booting from WIM it booting realy fast!
P.S: When i sysprep my XP with Sysprep of LH4074 i getted a BSOD but i think that just a trouble with sysprepping my system with non-cooling Riva TNT Video Card.
So please in points how can i sysprep my XP so i can put it in WIM and i can be guranteed that it will work on another PC if i unpack it there? I have heard about some patch which fixes 0x0000007B which is about IDE controller problem and i can find it but it's not the same as sysprepping XP...
Remove the FAKE section, as that's unneeded, and it's possible that it won't even boot. What you need to do is to change the image index numbers. And I forgot a few steps.
Before sysprepping the OS, do the following:
1. Copy the I386 (and AMD64&IA64 if they exist) folder(s) of the installation disc to the system root of that OS. Be sure to do this from inside the OS.
2. Install TweakUI to it, and modify the installation source to %SystemRoot%\I386 (or AMD64/IA64 if you use a different platform).
3. If you don't want to pack TweakUI together with the OS, then remove it now.
4. Copy the SYSPREP folder of the Longhorn 4074 or 5048 installation or extracted WIM.
5. Run the uncabsrc.cmd file of the copied SYSPREP folder from inside the OS being repacked.
And finally, sysprep the installation using the SYSPREP program in the newly copied folder.
It's recommended that you do this in a PC emulator, such as VMware, Bochs, Virtual PC or Virtual Server.

[ 本帖最后由 血竹 于 2008-12-22 12:20 编辑 ]

aiyuxiyuan 发表于 2006-1-10 15:53

gonghao 发表于 2006-2-19 01:19

kan bu dong!!!!!!!

jiayi 发表于 2006-3-5 16:38

luckboys 发表于 2006-5-18 09:26

学习一下!谢谢!

inim 发表于 2006-5-19 16:22

谢谢楼主分享!!

沙同 发表于 2006-6-2 20:26

向楼主学习,我失败了N次,但都不知其解

rerfdsfsder 发表于 2006-7-25 13:16

学习!真是不错的地方啊

est 发表于 2006-7-25 18:13

支持啊~六个字

ggg 发表于 2006-8-10 02:12

lfan_cn 发表于 2006-8-10 13:48

有学习的东西了,感谢LZ

onestto 发表于 2006-8-14 14:21

我还是不懂,谁能教教我啊

菜鸟先飞 发表于 2006-9-9 00:28

vforum 发表于 2006-10-16 08:57

不懂,有何用啊?

ald 发表于 2006-10-16 12:18

虽然看不懂,但知道有这么回事就行了!

鬼谷先生 发表于 2006-11-1 20:45

晕倒!晕倒!

fbuluo 发表于 2006-11-8 16:49

真得好好学习一下了

billasx 发表于 2006-11-11 10:11

太密了,太吃力

dreambrain 发表于 2006-11-14 13:16

aspirants 发表于 2006-11-17 14:18

页: [1] 2
查看完整版本: longhorn wim封装不再神秘---install.wim剖析