Windows硬盘恢复方案的设计与实现.doc_第1页
Windows硬盘恢复方案的设计与实现.doc_第2页
Windows硬盘恢复方案的设计与实现.doc_第3页
Windows硬盘恢复方案的设计与实现.doc_第4页
Windows硬盘恢复方案的设计与实现.doc_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Windows7硬盘恢复方案的设计与实现一、目标参照Lenovo OEM模式,实现Windows 7从硬盘上隐藏分区中恢复到出厂状态,用户可通过高级恢复方式或在启动时按F8修复计算机触发实现。二、主要步骤l 利用Windows AIK或Windows OPK构建Windows 7应答文件和进行OEM定制;l 在参考计算机上安装Windows 7,然后创建安装映像和恢复映像l 创建批处理文件,在目标计算机上应用映像,并执行sysprep命令实现Windows 7首次体验l 在目标计算机上,两种方式下测试硬盘恢复方案三、前提条件一台技术人员计算机(Windows 7系统,安装Windows AIK、UltraISO 9.3,配置刻录机)一台参考计算机一台目标计算机Windows 7 AIK DVDWindows 7 产品DVD(采用网络下载MSDN Windows 7 Ultimate X86 ISO映像)BenQ 80G移动硬盘一只OEM定制文件夹及图片信息(从网络获取,以Lenovo为样本)刻录机/空白CD/DVD技术人员计算机的主要操作l 安装Windows 7 OPKl 制作Windows PE的DVD和移动硬盘启动媒介l 创建分布式共享,添加OEM定制信息到分布式共享中l 构建三个应答文件(AutoUnattend.xml、OOBE.xml、Sysprepunattend.xml)制作Windows PE启动光盘步骤 1:设置 WindowsPE 构建环境l 单击“开始”,依次指向“所有程序”、Windows OPK 或 Windows AIK,右键单击“部署工具命令提示符”,然后选择“以管理员身份运行”。定位到C:Program Filesx86Tools 中l 在命令提示符下运行 Copype.cmd 脚本copype.cmd x86 c:winpe_x86l 将winpe.wim复制到 Winpe_x86ISOsources 文件夹,并将该文件重命名为 Boot.wim。copy c:winpe_x86winpe.wim c:winpe_x86ISOsourcesboot.wim步骤 2:添加Imagex.exe到Windows PE中(两种方式添加:一种启动后即在当前目录下,另一种在另一个盘符中,推荐第一种,修改boot.wim)copy C:program filesToolsx86imagex.exe C:winpe_x86iso步骤 3:使用 Oscdimg 创建 .iso 文件。在命令提示符下,键入:oscdimg -n -bC:winpe_ C:winpe_x86ISO C:winpe_x86winpe_x86.iso步骤 4:将映像刻录到 CD-ROM 或 DVD-ROM 上在移动硬盘上创建可启动的 Windows PE RAM 磁盘步骤一和步骤二:同制作Windows PE启动光盘步骤三:准备 UFDl 在技术人员计算机上,插入移动硬盘。l 在管理员命令提示符下,使用 Diskpart 将移动硬盘格式化为跨越整个磁盘的NTFS,然后将此分区设置为活动状态。diskpartselect disk 1cleancreate partition primaryselect partition 1activeformat quick fs=ntfsassignexit步骤四:将步骤二完成后ISO目录中的所有内容复制到移动硬盘中,可手动拷贝或执行命令:xcopy c:winpe_x86iso*.* /e f:制作三个应答文件。以Ultimate版本为例,启动Windows OPK,对Windows 7 Ultimate.cfg进行操作。第一,制作AutoUnattend.xml应答文件l 添加和配置Windows设置Component Configuration Pass Microsoft-Windows-DeploymentReseal oobeSystem Microsoft-Windows-International-Core-WinPE windowsPE Microsoft-Windows-SetupDiskConfigurationDiskCreatePartitions CreatePartition windowsPE Microsoft-Windows-SetupDiskConfigurationDiskModifyPartitions ModifyPartition windowsPE Microsoft-Windows-SetupImageInstallOSImageInstallTo windowsPE Microsoft-Windows-Setup UserData windowsPE l 组件的属性值设置Component Value Microsoft-Windows-International-Core-WinPE InputLocale = zh-CN SystemLocale = zh-CN UILanguage = zh-CN UserLocale = zh-CN Microsoft-Windows-International-Core-WinPESetupUILanguage UILanguage = zh-CN Microsoft-Windows-Setup UseConfigurationSet = True Microsoft-Windows-SetupDiskConfiguration WillShowUI = OnError Microsoft-Windows-SetupDiskConfigurationDisk DiskID = 0 WillWipeDisk = true Microsoft-Windows-SetupDiskConfigurationDiskCreatePartitionsCreatePartition Extend = true Order = 1 Type = Primary Microsoft-Windows-Setup DiskConfigurationDiskModifyPartitionsModifyPartition Active = true Format = NTFS Label = WIN7_OS Letter = C Order = 1 PartitionID = 1 Microsoft-Windows-SetupImageInstallOSImage WillShowUI = OnError Microsoft-Windows-SetupImageInstallOSImageInstallTo DiskID = 0 PartitionID = 1 Microsoft-Windows-Setup UserData AcceptEula = true Microsoft-Windows-Setup UserDataProductKey Key =XXXXX-XXXXX-XXXXX-XXXXX-XXXXXWillShowUI = OnError Microsoft-Windows-DeploymentReseal ForceShutdownNow = false Mode = Audit 第二,添加OEM配置信息l 添加和配置Windows设置Component Configuration Pass Microsoft-Windows-DeploymentRunSynchronousRunSynchronousCommand auditUser Microsoft-Windows-DeploymentRunSynchronousRunSynchronousCommand auditUser Microsoft-Windows-IE-InternetExplorerFavoritesListFavoriteItem Specialize Microsoft-Windows-IE-InternetExplorerStartPagesStartPage Specialize Microsoft-Windows-IE-InternetExplorerStartPagesStartPage Specialize Microsoft-Windows-PerfCenterCPLWindowsExperienceIndexOemInfo oobeSystem Microsoft-Windows-Shell-SetupOEMInformation Specialize l 组件属性值设置Component Value Microsoft-Windows-IE-InternetExplorerFavoritesListFavoriteItem FavID = Favorite1 FavTitle = Lenovo FavURL = http:/www.M Microsoft-Windows-IE-InternetExplorerStartPagesStartPage StartPageKey = Home page 1 StartPageURL = Microsoft-Windows-IE-InternetExplorerStartPagesStartPage StartPageKey = Home page 2 StartPageURL = .hk/ Microsoft-Windows-Shell-Setup OEMInformation HelpCustomized = false Logo = c:WindowsSystem32OOBEInfoLenovo.bmp Manufacturer = China Lenovo Group SupportHours = Every Day from 7:00 to 19:00 SupportPhone =SupportURL = http:/www.L Microsoft-Windows-PerfCenterCPLWindowsExperienceIndexOemInfo HardwareUpgradeURL = http:/www.L/ Logo = c:WindowsSystem32OOBEInfoLenovo.png 第三,利用记事本程序制作OOBE.XML文件,内容如下: Lenovo c:WindowsSystem32OOBEInfoLenovo.png true c:WindowsSystem32OOBEInfousertile.bmp 第四,制作命令行下执行Sysprep所需的Sysprepunattend.xmll 添加和配置Windows设置Component Configuration Pass Microsoft-Windows-Shell-Setup_neutralSpecializeMicrosoft-Windows-International-Core_neutraloobeSystemMicrosoft-Windows-Shell-Setup_neutraloobeSystemMicrosoft-Windows-Shell-Setup_neutralOOBEoobeSystemMicrosoft-Windows-Shell-Setup_neutralUserAccounts LocalAccountsoobeSystemMicrosoft-Windows-Shell-Setup_neutralUserAccounts LocalAccountsPasswordoobeSysteml 组件的属性值设置Component Value Microsoft-Windows-Shell-Setup_neutralComputerName=ThinkPad-T410Microsoft-Windows-International-Core_neutralInputLocale = zh-CN SystemLocale = zh-CN UILanguage = zh-CN UserLocale = zh-CNMicrosoft-Windows-Shell-Setup_neutralTimeZone = China Standard TimeMicrosoft-Windows-Shell-Setup_neutralOOBEHideEULAPage = TrueNetworkLocation = WorkProtectYourPC = 1Microsoft-Windows-Shell-Setup_neutralUserAccountsLocalAccountsDescription = Win7RE UserDisplayName = ThinkPadGroup = AdministratorsName = ThinkPadMicrosoft-Windows-Shell-Setup_neutralUserAccountsLocalAccountsPasswordValue = ThinkPadRE第五,验证应答文件,确保无警告信息、无错误、无遗漏、无重复,然后保存应答文件。第六,创建分布式共享,d:windows7,将网络下载的OEM文件夹信息包含到分布式共享的”$OEM$ Folder”中第七,在d:windows7创建配置集ConfigSet1第八,将配置集ConfigSet1中的文件及文件夹、ISO安装映像提取到可启动的USB硬盘中或利用UltroISO软件编辑后刻录成DVD启动光盘。参考计算机上的操作l 执行自动安装,进入审计模式l 捕获审计模式镜像l 捕获OOBE模式镜像l 捕获恢复镜像步骤如下:1. 利用定制的光盘启动,自动完成安装Windows 7,进入审计模式2. 命令提示符下,定位到c:windowssystem32sysprep下,执行命令:sysprep /generalize /audit /shutdown 3. 利用定制的光盘启动到PE环境,执行命令( e: 是移动硬盘盘符):e:imagex /capture c: e:W7audit.wim Windows 7 Audit Image 4. 捕获Windows 7审计模式镜像完成后,重启计算机,仍然进入审计模式5. 命令提示符下,定位到c:windowssystem32sysprep下,执行命令:sysprep /generalize /oobe /shutdown 6. 利用定制的光盘启动到PE环境,执行命令( e: 是移动硬盘盘符):e:imagex /capture c: e:install.wim Windows 7 OOBE7.OOBE镜像捕获成功完成后,依次执行命令:ren e:install.wim *.txtmd e:recoveryrecoverywindowsRE move e:install.txt recoveryrecoverywindowsRE imagex /capture /compress fast e:recovery e:recovery.wim End User Recovery 8. 恢复镜像捕获成功完成后,关闭参考计算机制作脚本文件第一,利用记事本程序,编辑制作三个文件:DeployWindows7.cmd 、configHDSetup.txt、configHDRE.txt。DeployWindows7.cmd:核心脚本,应用Windows7镜像(Audit及OOBE)到目标计算机,拷贝恢复镜像到恢复分区configHDSetup.txt:配置目标计算机硬盘分区信息configHDRE.txt:将目标计算机的恢复分区设置为隐藏=DeployWindows7.cmd echo off diskpart /s configHDSetup.txt /配置磁盘分区imagex /apply w7audit.wim 1 c: /应用审计模式镜像到C盘c:windowssystem32bcdboot.exe c:windows /配置引导环境md r:recoverywindowsre imagex /apply recovery.wim 1 r: /应用恢复镜像到R盘ren r:recoverywindowsreinstall.txt *.wim copy c:windowssystem32recoverywinre.wim r:recoverywindowsre c:windowssystem32reagentc.exe /setreimage /path r:recoverywindowsre /target c:windows /设置恢复代理参数c:windowssystem32reagentc.exe /setosimage /path r:recoverywindowsre /target c:windows /设置恢复代理参数diskpart /s configHDRE.txt /隐藏恢复盘=configHDSetup.txtselect disk 0 clean create partition primary size=500 select partition 1 active format fs=ntfs label=System quick create partition primary size=10000 select partition 2 format fs=ntfs label=Recovery quick assign letter = R create partition primary select partition 3 format fs=ntfs label=WIN7_OS quick assign letter = C=configHDRE.tx

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论