无忧启动论坛

标题: [原创]PE2.0启动过程及VISTA DVD 中PE2.0与元旦版PE2.0的融合 [打印本页]

作者: victor888    时间: 2007-1-18 14:20
标题: [原创]PE2.0启动过程及VISTA DVD 中PE2.0与元旦版PE2.0的融合
这是我经过几天搜索在微软网站上找到的一篇非常有用的文章:

PE2.0的启动过程
出处:http://technet2.microsoft.com/Wi ... 51033.mspx?mfr=true

How Windows PE Works
Windows PE version 2.0 is a minimal Win32 subsystem with limited services, based on the Windows Vista kernel running in protected mode.

Windows PE Optimal Environment
An optimal environment for running Windows PE has the following characteristics:
•        Sufficient RAM for RAM disk boot.
•        If you choose to use a USB Flash Drive (UFD) device, it must meet all the requirements for booting Windows PE.
•        The appropriate network adapter and mass storage drivers available, either on the Windows PE CD or available to place on a customized Windows PE image.
•        Physical access to the computer, or, if using Emergency Management Services (EMS) to use Windows PE in the configuration of a remotely administered server, the computer properly supports EMS.
•        If you choose to use Windows DS, the server must run Windows Server 2003 RIS server, and the destination computers must have a network adapter that enables PXE or one that is supported by the Windows DS start disk.
Order of Operations in Windows PE
The boot process of Windows PE is as follows.
1.         The boot sector on the particular media is loaded. Control is passed to Bootmgr. Bootmgr extracts basic boot information from the Boot Configuration Data (BCD) and passes control to winload.exe that is contained in Boot.wim. Winload.exe then loads the appropriate Hardware Abstraction Layer (HAL), and loads the System registry hive and necessary boot drivers. After it finishes loading, it prepares the environment to execute the kernel, Ntoskrnl.exe.         Note:

        If you start Windows PE from read-only media such as a CD, Windows PE stores the registry hives in memory so that applications can write to the registry. Any changes made to the registry by the applications do not persist across different Windows PE sessions.

2.         Ntoskrnl.exe is executed and finishes the environment setup. Control is passed to the Session Manager (SMSS).
3.         SMSS loads the rest of the registry, configures the environment to run the Win32 subsystem (Win32k.sys) and its various processes. SMSS loads the Winlogon process to create the user session, and then starts the services and the rest of the non-essential device drivers and the security subsystem (LSASS).
4.         Winlogon.exe runs setup based on the registry value HKLM\SYSTEM\Setup\CmdLine. Winpeshl.exe will launch %SYSTEMDRIVE%\sources\setup.exe if it exists, otherwise it looks for an application specified in %SYSTEMROOT%\system32\winpeshl.ini. If no application is specified, Winpeshl.exe will execute cmd /k %SYSTEMROOT%\system32\startnet.cmd. By default, Windows PE contains a Startnet.cmd file which will launch Wpeinit.exe. Wpeinit.exe loads network resources and coordinates with networking components like DHCP.
5.         When Wpeinit.exe completes, the Command Prompt window is displayed. The boot process of Windows PE is complete.



Winpeshl.ini Files
Winpeshl.ini controls whether a custom shell is loaded in Windows PE instead of the default Command Prompt window. To load a custom shell, create a file named Winpeshl.ini and place it in %SYSTEMROOT%\System32 of your custom Windows PE image. The .ini file must have the following section and entry.
[LaunchApp]
AppPath = %SYSTEMDRIVE%\myshell.exe
[LaunchApps]
%SYSTEMDRIVE%\mydir\application1.exe, -option1 -option2
application2.exe, -option1 -option2
Set the AppPath entry to the path to your shell application. The path can be either fully qualified, or you can use environment variables, such as %SYSTEMROOT%\System32\Myshell.exe. The AppPath entry does not support command-line options.
Use the [LaunchApps] section to run applications with command-line options. The applications run in the order listed; separate the name of the application from its options with a comma.
When you exit the Command Prompt window or your custom shell application, Windows PE restarts.
        Important:

        Do not edit the value of CmdLine in the HKEY_LOCAL_MACHINE\SYSTEM\Setup registry key of Setupreg.hiv to start your shell application. The value of CmdLine calls Winpeshl.exe, which performs a number of functions, including calling the default Command Prompt window in Windows PE or your custom shell application.


看明白了吗?

我们可以修改VISTA PE的注册表加载CMD命令,该命令运行后会给出选择菜单,是继续安装VISTA(即运行SETUP文件)还是运行PE2.0(whinpeshl.exe)文件。

这种方式做出的VISTA+PE2.0元旦版的盘体积会更小,不同于我写的通过修改BCD文件的方法。

欢迎探讨!

[ 本帖最后由 原名丢了 于 2007-1-18 02:51 PM 编辑 ]
作者: xieliuyun    时间: 2007-1-18 14:23
《VistaPE系统维护盘》元旦版 (支持NAT上网)[2007.1.1更新]
http://bbs.wwwfox.net/viewthread ... amp;highlight=vista

是不是跟这个融合?
作者: victor888    时间: 2007-1-18 14:26
原帖由 xieliuyun 于 2007-1-18 02:23 PM 发表
《VistaPE系统维护盘》元旦版 (支持NAT上网)
http://bbs.wwwfox.net/viewthread ... amp;highlight=vista

是不是跟这个融合?


是的。
作者: dgxhls    时间: 2007-1-18 14:42
如果不是原创,请加上[转贴]字样。
作者: victor888    时间: 2007-1-18 14:46
是我的原创,因为论坛没有选项,我就没写。
作者: wengyaoming    时间: 2007-1-18 16:28
是一篇好文章,不过英文水平的关系,看得很辛苦,感谢楼主的分享。
作者: willsion    时间: 2007-1-18 17:51
不错。学习一下。
作者: LIYANGZHUO    时间: 2007-1-31 20:27
是这个吗?请LZ看看:

Snap1.jpg (75.38 KB, 下载次数: 54)

Snap1.jpg





欢迎光临 无忧启动论坛 (http://wuyou.net./) Powered by Discuz! X3.3