Scott Dorman

blog

  Home  |   Contact  |   Syndication    |   Login
  512 Posts | 9 Stories | 459 Comments | 66 Trackbacks

News


Post Categories

Image Galleries



Creative Commons License


Microsoft MVP


MCP Profile


Subscribers to this feed

TwitterCounter for @sdorman

Locations of visitors to this page

View blog authority

Add to Technorati Favorites

Windows Live Alerts

Support This Site

IM me

Scott [MVP]

Get Free Shots from Snap.com

Community Credit Hall of Fame

Get Feedghost

AddThis Social Bookmark Button

Xobni outlook add-in for your inbox

TechEd Bloggers

Party with Palermo

PDC 2008

Windows Live Translator

Twitter












Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

Boot Configuration Database (BCD)

Vista unifies the boot mechanism to be platform independent. The information stored in the boot.ini file is now replaced by the BCD, which abstracts the firmware and is unified across different OS installations. The BCD also uses Unicode strings to support internationalization. To help ensure the security of the boot environment, the BCD is stored in the registry in a binary format and is protected by registry key security.

 

In order to edit the BCD data, Microsoft provides a WMI interface that is completely scriptable. A command line editor called BCDEdit is also provided. BCDEdit uses the WMI interfaces, so anything that can be done through the command line utility should also be possible in custom scripts.

Pre-Boot Executables

The pre-boot executable environment has also undergone changes in Vista. The NTLDR boot loader has been split in to two sections:

 

Windows Boot Manager

The Windows boot manager is launched by the Master Boot Record (MBR) code and replaces the first half of NTLDR (the part that read boot.ini) and now reads the data stored in the BCD. This is handled by the files in the \Bootmgr partition on the system drive and can launch other Windows pre-boot executables.

 

Some of these other pre-boot executables include a new resume loader that helps improve startup time when returning from a sleep state. (This used to be implemented by NTLDR and is now implemented in \Systemreoot\System32\Winresume.exe.) Another pre-boot executable is a windows memory diagnostic tool called \Boot\Memtest.exe.

Operating System Loader

The OS loader replaces the second half of NTLDR which was responsible for loading the OS image, boot drivers, and System registry hives. There is a single OS loader per installation located in the \Systemroot\System32\Winloader.exe program executable.

Startup Process Changes

Prior to Vista, session creation was done serially by the Session Manager (SMSS) which would result in a bottleneck for Terminal Services. The SMSS created the Winlogon and Csrss processes for each session. Winlogon (which is the interactive logon manager) would then create the Local Security Authority(Lsass.exe) and Services (services.exe) processes.

 

In Vista, this behavior follows a similar model to the Windows Installer service. The Initial SMSS creates an instance of itself to initialize each session. This permits parallel session creation of anywhere between 4 and the number of processors.

 

The initial SMSS process runs in Session 0 and runs Wininit.exe. Wininit starts what Winlogon used to start, namely lsass.exe and services.exe. It also starts a new process, the Local Session Manager (lsm.exe).

 

Once each subsequent session is started, that sessions SMSS create the session specific instances of winlogon and csrss.

 

This process will allow more concurrent users to log on to a terminal services server at the same time with much less stress on the operating system and provide faster logon times for the users.

 

Since the initial SMSS process runs in Session 0, the Console user now runs in Session 1 and cannot connect to Session 0. This eliminates name collisions and prevents poorly written services from displaying windows to the user. Prior to Vista, the console user ran in Session 0, which allowed the opportunity for “shatter“ attacks.

Address Space Load Randomization (ASLR)

Prior to Vista, executables and DLLs loaded at fixed locations and buffer overflow attacks commonly relied on known system function addresses to cause specific code to execute.

 

The Vista loader bases modules at one of 256 random locations in the address space. Operating system images now include relocation information and this relocation is performed once per image and is shared across processes. The user stack locations are also randomized.

posted on Saturday, June 17, 2006 4:42 PM

Feedback

# re: Windows Vista: Kernel Changes - Pre-Boot and Startup 2/14/2008 10:43 PM Javier
I have a question for you. What can I do if winloader.exe is corrupted?, may I install windows again? or you have another solution for this problem? I have Ubuntu linux installed in one HD and Windows Vista installed in another disk, they have been working ok till today, when I restart my PC windows vista print this on screen "File: \Windows\system32\winload.exe" [...] "Info:The selected entry could not be loaded because the application is missing or currupt", and, I don't want to reinstall again windows vista, so, I'm trying to find a solution for this problem. If you know what can I do for fix this, please send me an e-mail.

Thank You.

Javier.

# re: Windows Vista: Kernel Changes - Pre-Boot and Startup 2/16/2008 10:49 AM Javier
Hi!, that's OK, I've just fixed the problem, and guess how... I've copyed the file C:\windows\system32\boot\winload.exe to c:\windows\system32\winload.exe, and that's it, It works XD.

Thanks anyway!!

Javier.

# re: Windows Vista: Kernel Changes - Pre-Boot and Startup 6/28/2008 6:13 AM Rennie
vista sp 1, crashed my laptop, i got BOOTMGR, and because I wasn't given a cd with the lap top when I bought it. My computer can't be repaired, nor can I rescue and restore it. I hate vista and i'm having both of my comps with vista wiped and getting xp back on it, had nothing but problems for a year and I've had it.

# re: Windows Vista: Kernel Changes - Pre-Boot and Startup 7/28/2008 5:12 PM Hmmm
'Tis always irritating to see random support requests or idiot non-technical in blog entries such as these.

# re: Windows Vista: Kernel Changes - Pre-Boot and Startup 11/9/2008 10:27 AM Igor Levicki
It would be much more interesting to find out how to write a boot application such as memtest.exe but for another purpose (disk testing, recovery, etc). Unfortunately writing boot applications seems to be completely undocumented.

# re: Windows Vista: Kernel Changes - Pre-Boot and Startup 11/15/2008 10:10 PM Scott
Igor, You are correct. There is very little documentation on writing these types of applications (property called native applications). The best article is by Mark Russinovich on Microsoft TechNet (http://technet.microsoft.com/en-us/sysinternals/bb897447.aspx). There is also some information on Wikipedia (http://en.wikipedia.org/wiki/Native_API)

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 8 and 7 and type the answer here: