Printer Friendly Version      Send     
Click to Rate and Give Feedback
Related Articles
Make a new tip by beating yourself in the head with a keyboard ...

Read more!

New Tip ...

Read more!

This is teh descriptionBla ...

Read more!

Active Directory, why it rocks! ...

Read more!

This Tip will explain how to send email from Exchange ...

Read more!

Also by this Author

Raymond explains how the one-time powerful Alpha AXP system came out of retirement to help develop a new generation of 64-bit systems.

Raymond Chen

TechNet Magazine August 2008

...

Read more!

The Known DLLs feature was included in Windows as a way to improve performance. Find out how it works, and take a close look at how this feature has changed over time.

Raymond Chen

TechNet Magazine September 2007

...

Read more!

Why can't you copy a list of files in Windows Explorer and then paste them as text to get their file names? The Windows team tried to include this functionality, but it didn't work as planned.

Raymond Chen

TechNet Magazine August 2007

...

Read more!

Microsoft Bob is a lot more prevalent than you might think. Raymond Chen explains how Microsoft Bob made its way into millions of homes.

Raymond Chen

TechNet Magazine July 2008

...

Read more!

How does Windows determine the list of frequently used programs that appears on the Start menu? The concept started with a simple premise that soon required a lot of fine tuning. Here’s an inside look at the logic behind the design of this feature.

Raymond Chen

TechNet Magazine May 2007

...

Read more!

Popular Articles

While User Account Control offers an important improvement in security, the ability to elevate permissions is essential for accomplishing certain administrative tasks and functions. Here are some Elevation PowerToys that make elevation more flexible and powerful.

Michael Murgolo

TechNet Magazine June 2007

...

Read more!

Michael Murgolo is back with an update to his Elevation PowerToys. You'll find enhanced Run as Administrator functionality that works with third-party scripting tools, a way to replace a handy Windows XP feature removed from Windows Vista, and many more useful tools.

Michael Murgolo

TechNet Magazine June 2008

...

Read more!

With Windows Vista, changes to the OS kernel bring about advances in many areas, ranging from memory management to reliability to security. We kick off this series with a look at how the kernel delivers improvements in the areas of processes, threads, and I/O.

Mark Russinovich

TechNet Magazine February 2007

...

Read more!

See how this free utility can help you determine whether problems you are experiencing while running Windows are caused by faulty memory.

Lance Whitney

TechNet Magazine September 2008

...

Read more!

Wikis offer a new, more flexible way to collaborate, promoting an unstructured approach to thinking and exchanging ideas. And MOSS 2007 makes it incredibly easy to implement wikis in your organization. Here’s what you need to know to start building and using wikis in the workplace.

Mauro Cardarelli

TechNet Magazine January 2007

...

Read more!

Our Blog
In this month’s TechNet Magazine, you’ll find the second of a series of Field Notes columns written by Romi Mahajan, Chief Marketing Officer of Ascentium Corporation. As an early innovator in the field of electronic ...

Read more!

"For developers, one difficult problem in SQL Server is tracking what data has changed in a database. An even greater challenge is architecting a simple solution that doesn’t heavily impact workload performance and isn't difficult to create, implement, and manage. So why go to all the trouble to track changes? Is tracking changes really worth all this effort? Two commonly cited examples are to support updates to a data warehouse and to support the synchronization of heterogeneous, occasionally connected systems." ...

Read more!

The latest installment of our online-only Sustainable Computing column is now available.

Find out how you can:

Bring Windows Server 2008 and Windows Vista Power Management Settings into Compliance Bring Windows Server 2003 and Windows XP Power Management Settings into Compliance Enforce Energy-Efficient Architectures ...

Read more!

Did you just go “whoa!” when you saw that title? Bet you never thought you’d see that here! But the times, as they say, are a-changing and we have too. Many organizations today use multiple operating systems. We all have the same goal of providing high-quality, cost-effective IT services to the organization, and one way we can do that is by sharing core software infrastructure like Active Directory. ...

Read more!

Proxy authentication lets users perform a simple bind to an Active Directory Lightweight Directory Services instance but still have an association to an Active Directory account. This can be very useful: it gives developers full access to a user object without giving them access to the Active Directory account, and it allows products that require the X.500 format to be used with Active Directory. ...

Read more!

Windows Confidential The File System Paradox
Raymond Chen


If you take a look around your hard drive, you probably have noticed that a good number of operating system files hang out in the root directory of the boot drive. If you take a closer look at those files, you may notice a theme: boot.ini, NTLDR, and NTDETECT.COM are critical boot files, and hiberfil.sys is the hibernation file. These are all files that are involved in the crucial first stages of booting the operating system or, in the case of hiberfil.sys, resuming from hibernation, and they have to go into the root of the boot drive. Why can't you move them somewhere else?
My colleague Adrian Oney explained: in order to read the boot files off the disk, you need the file system driver, but the file system driver is on the disk, which you can't read until you've loaded the file system driver. Oh no, Catch-22!
The vicious cycle is broken by having a miniature file system driver built into the critical boot files. This miniature driver knows just barely enough to locate files in the root directory and load them into memory. Those files can, in turn, get the operating system off the ground, at which point the real file system driver can take over and look for files in much fancier places like subdirectories.
  
Hibernation follows a similar pattern. Hibernating the operating system means dumping the entire contents of memory into the hibernation file; restoring from hibernation entails sucking that file back into memory and pretending nothing happened. Again, it's another chicken-and-egg problem: to load the hibernation file, you need the file system driver, but the file system driver is in the hibernation file. If you keep the hibernation file in the root directory of the boot drive, the miniature file system driver can be used instead.
Those who have used early versions of MS-DOS® are well aware of this constraint on the location of the operating system boot files. The old SYS command made a boring old floppy disk into a magic bootable floppy disk. However, if you ran it on a floppy disk that already had data on it, there was a good chance the conversion would fail because early versions of MS-DOS required that the boot files occupy specific locations on the floppy disk in order for the boot sector to find them. Later versions of MS-DOS relaxed these requirements by making improvements to the boot loader, but even with the improved version, the system files still must reside in the root directory.
One customer asked, "Can I move the hibernation file into a subdirectory?" After all, why does it matter where the file is? The ACLs on the file would be the same regardless of where you put it. But these folks wanted to put it on a drive different from the boot drive and had been told that can't be done. They didn't really understand the reason for this restriction, so they tried an end run: well, if I can at least move it into a subdirectory, then I can create a directory and make that a junction that points to where I really want the hiberation file. Woo hoo—I relocated the hibernation file!
Of course, the miniature file system driver doesn't understand mount points, because mount points mean talking to the disk management service, and at the time the system is booting, the computer hasn't even loaded the operating system yet, much less some fancy advanced service that knows how to map drive letters back to ARC paths, and even if you somehow got that service running, you still have to find the device drivers for those other hard drives and load the corresponding file system drivers.
It's only a matter of time before somebody asks for a way to put the hibernation file on a DFS junction.

Raymond Chen's Web site, The Old New Thing, and identically titled book (Addison-Wesley, 2007) deal with Windows history and Win32 programming. His Web 2.0 name is Raymond, or maybe Chenster.
© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited.
Page view tracker