Tuesday, February 23, 2016

Adding Windows 10 to Windows' 7 boot menu

So, I installed Windows 10. I didn't liked it (at all) so I installed after that Windows 7 (on a different partition).
Now after 6 months I would like to see if Window 10 has improoved a bit, but Windows 7 won't show it in its boot menu. So, I cannot boot into Win 10 anymore.

Solution: bcdedit
Run the command prompt as administrator. Type bcdedit and it will show all installed operating systems (that it can recognize).

In my case (Win 7 primary, Win 10 'lost' partition) the output is this:


C:\>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=K:
description             Windows 10
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {24334bef-7a25-11e5-866b-bca012dbdc37}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 0

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {24334bf1-7a25-11e5-866b-bca012dbdc37}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {24334bef-7a25-11e5-866b-bca012dbdc37}
nx                      OptIn

As you can see the current OS is Windows 7 on C: partition.





First of all, make a backup copy of your boot entries, in case you fuck up something:

C:\>bcdedit /export c:\bdc_entry_backup
The operation completed successfully.




Then type the following command. It will add Win 10 (identified as 'bootmgr') at the list of available bootable OS's:


C:\>bcdedit /displayorder {current} {bootmgr} 

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=K:
description             Windows 10
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {24334bef-7a25-11e5-866b-bca012dbdc37}
displayorder            {current}
                        {bootmgr}
toolsdisplayorder       {memdiag}
timeout                 0

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {24334bf1-7a25-11e5-866b-bca012dbdc37}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {24334bef-7a25-11e5-866b-bca012dbdc37}
nx                      OptIn


Done.
_________

More details about bcdedit here: https://msdn.microsoft.com/en-us/library/windows/hardware/ff541231%28v=vs.85%29.aspx#editing_the_boot_menu_in_windows_vista_and_later