Jump to content
RESET Forums (homeservershow.com)

ODD booting with AHCI and OS Upgrading


Recommended Posts

On 8/27/2013 at 9:52 PM, TheBiggerMan said:

OK – I’ve put together some instructions for the board.  Note that (1) these have not been tested, although I did use this approach on my MicroServer successfully, and (2) by using these instructions you agree that I take no responsibility (nor liability in perpetuity) for the effect your usage of these instructions may have on your data – you’re on your own and if it all goes horribly wrong, please do not be surprised!  I would strongly recommend you do not have any data on the server at this stage…

Before you start, you need the following:

  • A copy of Windows installed (Windows Server 2008 R2 or later will do, any edition – this may work on Windows Server 2008 too, but earlier editions have a different method that these instructions do not cover) on the MicroServer and booting successfully.  Note that if you've installed Windows onto a drive in the ODD, you will need to physically remove all the hard drives from the trays (just pulling them out 1/2" will do to be able to boot the server from the ODD), otherwise the MicroServer will try and boot from one of the non-ODD hard drives first.  There is no way to specifically prioritize the ODD drive above the others.
  • Insert the MicroSD (or USB key) into the internal slot before you boot.  If you are unable to boot, go into the Setup Utility (BIOS) and ensure that the boot order has USB set to lowest priority.
  • Boot the MicroServer into your copy of Windows.
  • Mount the Windows setup ISO.  Windows Server 2012 and later has an ISO mounter built in - but if you're running another version, you can use something like Virtual CloneDrive, available at http://www.slysoft.com/en/virtual-clonedrive.html Make a note of the drive letter.
  • Go to "My Computer" or similar in Explorer and make a note of the drive letter and size of your MicroSD card or USB key.  If you cannot see it here, then there are a couple of reasons - if the drive is not formatted properly you may be able to get it working by consulting the Disk Management MMC snap-in and formatting it there.  Also, if you didn't use Intelligent Provisioning, and you're using the MicroSD card, you may not have the right drivers installed - in which case go and grab them from the HP site and install.

Now for the fun stuff:

  1. Start an elevated command prompt. Start | type cmd | Right-click cmd (top of menu) | Run as Administrator.  Note that you can just run a command prompt if you have UAC turned off (standard for Windows Server installs).
  2. Next, run Diskpart to prepare the disk.  Enter each of the commands in order.  Be very careful as a mistake here can have serious consequences! Note that the question mark “?” below should be replaced with the disk number of the drive you are using:

list disk

select disk ?


create partition primary

select partition 1


format fs=ntfs quick


  1. Now copy the boot sector to the MicroSD card or USB key.  You should still be in the command prompt window.  Replace $ below with the drive letter of your mounted ISO image, and ? with the drive letter of your newly formatted MicroSD card or USB key.

$:\>cd boot
$:\boot>bootsect /nt60 ?:
   Target volumes will be updated with BOOTMGR compatible bootcode.

   Bootcode was successfully updated on all targeted volumes.

Note that if you get an error message here, normally you can fix this by closing any open windows with that drive and try again.  You could also use the /force switch for bootsect if you prefer.

  1. Now we need to copy critical boot files to the MicroSD card/USB key.  Using Windows Explorer, copy the following directories and files to the MicroSD card/USB key:

bootmgr (file)

bootmgr.efi (file)
boot (directory)

efi (directory)
Nothing else is required.

  1. Delete the file "bcd" from the directory "boot" on the MicroSD card/USB Key - we'll be recreating it shortly.
  1. Start another elevated command prompt. Start | type cmd | Right-click cmd (top of menu) | Run as Administrator.  Note that you can just run a command prompt if you have UAC turned off (standard for Windows Server installs).
  1. Replace ? in the following BCDEDIT commands with the current drive letter of your MicroSD card or USB key:


bcdedit /createstore ?:\boot\bcd
bcdedit /store ?:\boot\bcd /create {bootmgr}
bcdedit /store ?:\boot\bcd /set {bootmgr} device boot
bcdedit /store ?:\boot\bcd /timeout 30
bcdedit /store ?:\boot\bcd /create /d "<Your OS Name Here>" /application osloader

That returns a new GUID that you should plug into this next command:

bcdedit /store ?:\boot\bcd /default {<GUID>}

For the next commands where I've denoted *:, replace it with the drive letter of your current Windows boot drive.  So if I'm booted on my MicroServer into the OS I am looking to boot from my MicroSD/USB Key and it's C:, that's what you need to enter here.  It doesn't matter what the drive will be when you boot - it matters what the OS you're currently executing the bcdedit command sees!

bcdedit /store ?:\boot\bcd /set {default} device partition=*:
bcdedit /store ?:\boot\bcd /set {default} path \windows\system32\boot\winload.exe
bcdedit /store ?:\boot\bcd /set {default} osdevice partition=*:
bcdedit /store ?:\boot\bcd /set {default} systemroot \Windows
bcdedit /store ?:\boot\bcd /set {default} detecthal yes
bcdedit /store ?:\boot\bcd /set {default} nx optin
bcdedit /store ?:\boot\bcd /displayorder {default} /addlast

Finally...  If you want to run Hyper-V (and have a capable edition of Windows Server, and have installed the role), you must enter the following command (otherwise the Hypervisor won't start and Hyper-V Manager will throw up all sorts of errors):

bcdedit /store ?:\boot\bcd /set hypervisorlaunchtype auto

  1. Boot into the Setup Utility (BIOS) on your MicroServer and prioritize USB boot as the first item (MicroSD comes under the USB boot order too).  I have not been able to find a way to prioritize within the USB boot devices.  Therefore, you will need to remove all other storage devices from the USB2 ports (the two USB3 ports on the back of the server are fine as they aren't seen by the BIOS and aren't active until you get into a compatible OS).
  1. OK - your MicroSD card or USB key should be all setup.  At this point you can install drives into the drive trays and you should be good.

I welcome comments from my fellow board members.

I hope this is helpful!



I created a booting MicroSD using the above guide and it has worked for years and now i'm thinking up updating the OS does anyone know if i can upgrade the OS from Server 2012R2 to 2019 and this will just work, or will it break booting?

  • Sad 1
Link to comment
Share on other sites

  • 3 months later...

I followed the original instructions and got Server 2016 installed but I've not had to upgrade it yet, so presently have no idea...  but I've just shut down an older Gen8 that needs reinstalling, so I'm happy to stick W2012R2 on and upgrade to test this... just need time to do it - I have MSDN so no problem with licensing doing this... and I will let you know 🤞

  • Sad 1
Link to comment
Share on other sites

i have the same question...i have followed the above instructions years ago and created a boot usb stick and i did not have any problems with WIN7.


i just bought a XEON cpu and a new SSD 120gb drive to upgrade the G8.


What should i do to install WIN10 ???? 


my current setup is SSD 60gb in ODD and using the 4 bays with 4tb HDD each for simple storage. Not raid or anything fancy.


please advice.

Link to comment
Share on other sites

I managed to install the XEON and the SSD256gb, Windows 10 also installed flawlessly. ( AHCI mode)


As expected when inserting my 4 x 4TB Western Digital drives...the machine cannot get to WIN10. 


The usb boot stick working for years with windows7 is not helping anymore. 😞 


I will try to follow again the instructions and prepare it again for WIN10.....any other solutions? 

Link to comment
Share on other sites

i confirm that usb boot stick for win10 using the above method works !!!!!!!!!!!!! 🙂 


i had to remake the procedure again on the G8. 


Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...