Showing posts with label Vista. Show all posts
Showing posts with label Vista. Show all posts

Tuesday, 27 January 2009

boot.ini is dead, long live BCDEdit.exe

Since Windows Vista (including Windows Server 2008, Windows 7), Microsoft has changed the way the partitions are managed when you have a dual boot machine. Before Vista (and going back to Windows NT 4.0, I think) there was a file on the boot partition called "boot.ini" which contained  a list of bootable operating systems and which partition they were installed to. On booting, Windows would look at this file and present the user with a list of options matching the list in the file. This made it easy to manually edit the boot options, all you needed to do was edit the file in notepad.exe.

In recent operating systems, the boot options are managed by a program called bcdedit.exe (find in %systemdrive%\windows\system32). A full guide with examples can be found here:


Recently I needed to rename my boot options, I had a dual boot set-up with both partitions having Windows Server 2008. One was 32 bit which I have been running for a while, the other is 64 bit (to test out Hyper-V which only runs on 64 bit). Both boot options had the default name of "Windows Server 2008" which was confusing on the boot menu. To rename my 32 bit boot option I executed the following:

bcdedit.exe /set description "Windows Server 2008 x86"

This was while logged on to the 32 bit OS, that command updates the boot name for the current partition. To rename the 64 bit OS in the boot options (while still booted in the 32 bit OS) I need to pass an ID for the partition. The IDs of the available partitions can be found by running bcdedit.exe with no arguments. Once I had this ID, I simply ran:

bcdedit.exe /set {GUID} description "Windows Server 2008 x64"

Where "GUID" is exactly that, inside the curly braces e.g.

bcdedit.exe /set {00000000-0000-0000-0000-000000000000} description "Windows Server 2008 x64"

This command allows you to update an option for a partition you are not booted into.

Thursday, 16 October 2008

Repairing the .NET Framework 2.0 and 3.0 on Windows Vista and Windows Server 2008

I had a problem recently with some files from the .NET Framework 2.0 being corrupt. I think the root cause of the problem was use of Virtual Machines. Anyway, I needed to repair the .NET Framework 2.0, specifically aspnet_regiis.exe.

The problem is that under Windows Vista and Windows Server 2008 these components are part of the operating system so you can't do a repair with the MSI like you normally can with installed programs. After doing some digging I found the answer here:

http://blogs.msdn.com/astebner/archive/2007/03/26/how-to-repair-the-net-framework-2-0-and-3-0-on-windows-vista.aspx

The short story is to run "sfc /scannow" with elevated privileges.

About Me