Adding a Kernel to Windows Boot Menu
c, kernel, visual-studio, windows
Solution
The MSDN page for bcdedit states:
[N]ew boot loader entries are not added to the boot menu automatically. You can place the boot loader entries in any order.
You must use the `bcdedit /displayorder` command to explicitly add your new entry to the menu. For example:
bcdedit /displayorder {current} {1c8a5e74-84ff-11e3-a4da-8050f0e41ed6}
Problem
I'm trying to get a kernel started and I'm having problems getting it on the Windows boot menu. I've written and built a small test kernel with this guide, but I don't know how to get the actual PE file to connected to the boot menu. I read here and here that you use `BCDedit` to add it to the boot menu, so I tried to do it this way: ``` bcdedit /create /d "Test Boot" /application bootsector // gave the guid: {1c8a5e74-84ff-11e3-a4da-8050f0e41ed6} bcdedit /set {1c8a5e74-84ff-11e3-a4da-8050f0e41ed6} path \Users\Taylor\Workspace\boot\kernel.exe ``` Here's the output of the working directory: ``` C:\Users\Taylor\Workspace\boot>dir Volume in drive C has no label. Volume Serial Number is 9249-0892 Directory of C:\Users\Taylor\Workspace\boot 06/03/2014 04:03 PM <DIR> . 06/03/2014 04:03 PM <DIR> .. 06/02/2014 09:17 PM 980 kernel.c 06/02/2014 09:20 PM 16,384 kernel.exe 06/02/2014 09:04 PM 372 kernel.h 06/02/2014 09:20 PM 847 kernel.map 06/02/2014 09:17 PM 825 kernel.obj 5 File(s) 19,408 bytes 2 Dir(s) 61,853,569,024 bytes free ``` But it still doesn't show up on my boot menu. I probably am missing some basic information, but I can't seem to find very much information on using Microsoft tools to develop kernels. Does anyone know how to do this?