Category

Booting

Booting Windows 2016 on HP G8 Microserver MicroSD Card

As good as FreeNAS has been, most of the clients on my home network are Windows based and speak CIFS/SMB,  and I’ve not had great success with FreeNAS reliably/stably serving these protocols.   Under load, the shares sometimes lock up and stop responding, and permissions can be a bit hit and miss.

FreeNAS support forums drink their own special brand of cool aid, so I’ve decided to try Windows, which, whilst being part of their own borg collective has a much wider base of users and obviously native integration with my client base.  So I’m piloting Windows Server 2016 with its various storage capabilities to see how it compares.
I’ve got a HP Microserver G8 which as well as 4 disk trays, supports a fifth SATA device via an additional ODD port, an internal USB and a MicroSD port, as well as various external USBs.
My FreeNAS is a previous N54L Microserver, which installs and boots easily to a USB drive, but Windows is a bit more pig-headed at booting from USB/MicroSD devices.
However, with the help of Daniels Tech Blog https://www.danielstechblog.info/how-to-deploy-windows-server-2016-tp3-onto-an-sd-card/  I have managed to get my Microserver booting from the MicroSD Card
Daniels instructions are more or less spot on, except for one change.
diskpart
list disk
select disk x
clean
create partition primary
format quick fs=ntfs label="SD"
active
assign letter=C
exit
dism /Apply-Image /ImageFile:D:sourcesinstall.wim /index:2 /ApplyDir:C:
bootsect /nt60 C: /force /mbr
bcdboot C:Windows

I couldn’t get that final line to write to the MicroSD. I kept getting errors about BCDBOOT not being able to write the files, or unable to find the source location. However, I read the documentation about BCDBOOT at Microsofts MSDN site https://msdn.microsoft.com/en-gb/windows/hardware/commercialize/manufacture/desktop/bcdboot-command-line-options-techref-di and happened upon the command for writing to USB devices.

bcdboot C:Windows /s C: /f ALL

This seems to work fine, and a reboot allows Windows 2016 to boot.

SysRescueCD v3.1.2

So to kick off, we’ll start with booting SysRescueCD from http://www.sysresccd.org/.

From Wikipedia:
SystemRescueCd is an operating system for the x86 computer platform, though the primary purpose of SystemRescueCD is to repair unbootable or otherwise damaged computer systems after a system crash. SystemRescueCD is not intended to be used as a permanent operating system. It runs from a Live CD or a USB flash drive. It was designed by a team led by François Dupoux, and is based on the Gentoo Linux distribution.

For this activity, I used the download versioned v3.1.2 which I got from http://goo.gl/F36zV 

My issue was that the machine I was trying to boot from didn’t seem to have enough memory to use the memdisk/iso boot option common for most installs, which meant I had to try and boot the ISOLINUX image.

The Software:
Open the ISO in your favorite ISO opening tool (I use 7zip).  
Extract the following files into your web boot server.  I used a sub-directory called SysRescueCD

  • sysrcd.dat
  • sysrcd.md5
  • ISOLINUX/rescue32 (or 64)
  • ISOLINUX/initram.igz

Note,  I assume rescue64 is the 64 bit version of the kernel, and rescue32 is the 32bit kernel.  There is also altkrn32 and altkrn64 which are referenced in ISOLINUX as alternative kernel builds.  They all seem to work.


The Webserver Config:
This is the menu display section of the config:
item SysRescueCD32 SysRescueCD – 32bit

And this is the execution program required to boot it.

############ SYSRESCUECD ############
:SysRescueCD32
echo Starting Sys RescueCD (32bit) with default options
initrd http://boot.server/SysRescueCD/initram.igz
chain http://boot.server/SysRescueCD/rescue32 cdroot docache dodhcp setkmap=uk netboot=http://boot.server/SysRescueCD/sysrcd.dat
boot || goto failed
goto start

Note, you can change setkmap= to your preferred keyboard mapping; I’m in the UK so that is the one I use.  If you leave this option unset,  it will prompt you when you boot the server.
If you change
rescue32 to rescue64 or one of the alternate kernel images,  the same commands seem to work.  There doesn’t seem to be any difference in using netboot= or boothttp= to locate the main disk image.

Finally, I’m using a Thecus NAS as my boot webserver,  using FaJo’s Apache Webserver module.  For some reason,  whilst the initrd and kernel load perfectly well,  the image refused to boot, freezing at ‘null’ in the download.  Another Apache webserver didn’t exhibit the same condition, but its something to be aware of.  If I find the cause,  I’ll update this post.