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.

0 comments:

About Me