Archive for October, 2018

Windows Setup, the Windows installation tool, unfortunately doesn’t provide any graphical tools for shrinking or expanding an UEFI System Partition (ESP; sometimes EFISYS). You can still create a custom-sized ESP by side-stepping out of Windows Setup and into the Command Line for a minute to partition the disk to your liking. I’ll walk you through the process in this tutorial.

This tutorial assumes you’re working with an empty disk, and that your computer is UEFI compliant. You may need to delete any existing partitions on the drive before proceeding. You can’t rely on this tutorial to grow the UEFI System Partition (ESP) on an existing installation as any attempt would be blocked by your existing partition boundaries. Windows won’t let you recreate an UEFI system outside the Windows Setup installation program. You should follow this tutorial during the initial Windows installation process with Windows Setup.

You are responsible for any data loss and to ensure that you have adequate backups of your own data. Unplug disks you don’t intend to use during the installation to avoid data loss. This is your only warning.

So you’ve booted up into Windows Setup from your installation media, and you’ve selected to perform a Custom installation. Whether you’re planning to and preparing to dual-boot with Linuxor just want to provide a larger margin of error; you may have noticed that the default 105-or-273 MB (100-or-260 MiB) partition for the UEFI System Partition is a tad small. (The default ESP size depends on your disks physical sector size.)

You need to decide what size you want your UEFI System Partition to be before you begin. You can take a pause here to read How large should you make your UEFI System Partition? before your proceed as it will be quite challenging to attempt to change the size you allocate to your ESP after you’ve installed the system without reinstalling.advertisement

Once you’ve decided on the approperiate size for your computer and needs, then you can follow the these steps to proceed. The tutorial begins from the first step of the Custom installation screen in Windows Setup (screenshot of this screen at the end of the article):

  1. Select your installation target and make sure it has no partitions (except unallocated space)
  2. Click the New and then the Apply button.

You should now have four partitions: Recovery, System (ESP), MSR, and Primary.

  1. Select each of the System, MSR, and Primary partitions in turn and click the Delete button to delete these partitions. Leave the Recovery partition in place.
  2. Press Shift+F10 to open the Command Prompt
  3. Type diskpart.exe and press Enter to open the disk partitioning tool
  4. Type list disk and press Enter to list out your disks
  5. Type select disk n where n is the number for the disk you want to install to as identified by the above command and press Enter
  6. Type create partition efi size=550 where 550 is the desired size of the ESP in Mebibytes (MiB), and press Enter
  7. Type format quick fs=fat32 label=System and press Enter to format the ESP
  8. Type exit and press Enter to exit the disk partitioning tool
  9. Type exit and press Enter again to exit the Command Prompt

You should now be back in the graphical Windows Setup partitioning tool where nothing has changed since the last time you looked at it.

  1. Click the Refresh button to detect your partition changes

You should now have a disk with a default Windows Recovery tools partition, a 500 MiB UEFI System Partition, and some unallocated space for your Windows installation.

  1. Select the unallocated space from the disk list and click the New button to automatically recreate the MSR and System partition in the remaining space

The final result should look something like this:

Screenshot of a 550 MiB ESP in Windows Setup

That should be all. From here, you can continue with your Windows installation as normal. If you should run into problems with the system not booting after completing this tutorial, then please refer to your systems manufacturer documentation for any special hardware requirements regarding UEFI boot and the UEFI System Partition in particular. Some older hardware models required non-standard FAT16-formatted ESPs, or had special partitioning size requirements. You should be able to adjust the steps in the tutorial to accommodate such requirements.

Although, having migrated to .net Core for the most part,we all have to support our older applications using .net Framework. As a part of routine, you may tend to update the .net framework in your application only to find out that your test or even prod (yikes!) do not have the latest framework installed. 

One way to find the version is using microsoft’s documentation here:

https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed

You, look at the complexity, and may just give up. I’ve found an easier place to check the same. And it positively has worked for me every time.

All you need is to browse to a folder path:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework

Here’s the structure:

And That’s it. You will see all the framework’s installed on this machine, even a minor version has a different folder as well. Easy on the eye indeed.

How to get multiple TeamCity build agents running on one server.

Found this the hard way, that there is an key thing that needs to be changed before finishing the setup as per teamcity’s official instruction.

First log in to the server where you want the agents to run then open TeamCity from a browser on that box.

Go to the Agents tab.

From the top right of the page choose Install Build Agents then MS Windows Installer.

When prompted choose to run the agent installer. You may have to be an administrator since this will be installing windows services.

Choose the directory where you want the agent configuration and working directories to live. I put them under the TeamCity home directory.

Take the defaults as you work your way through the installer.

The agent directory is being configured.

Here it is important that you choose a unique name and port. The directories should be consistent with your previous choices. You may need to change the server URL and port.

When this popup appears do not click OK yet.

Open an Explorer window and navigate the the launcher/conf directory under the build agent directory you configured above.

Edit wrapper.conf and change the name of the ntservice to match your agent name as appropriate. This is important because each agent runs under a different service and they must have unique names, otherwise only one will connect at a time.

Now you can click OK on the popup.

And choose the defaults the rest of the way through the installer.

If you open Services

You should see the service you named.

The new agent should connect and be visible from the TeamCity Agents page within a few moments.

Repeat the steps to add additional agents.


I have a love-hate relationship with ad blockers. On the one hand, I despise the obnoxious ads that are forced down our throats at what seems like every turn. On the other hand, I appreciate the need for publishers to earn a living so that I can consume their hard-earned work for free. Somewhere in the middle is a responsible approach. If they can do it in 140 characters and a link, I’m happy. That is all. No images. No video. No script. No HTML tags. No tracking.

 

Which brings me to Pi-hole. I’m going to keep the intro bits as brief as possible but, in a nutshell, Pi-hole is a little DNS server you run on a Raspberry Pi in your local network then point your router at such that every device in your home resolves DNS through the service. It then blacklists about 130k domains used for nasty stuff such that when any client on your network (PC, phone, smart TV) requests sleazy-ad-domain.com, the name just simply doesn’t resolve. Scott Helme put me onto this originally via his two excellent posts on Securing DNS across all of my devices with Pi-Hole + DNS-over-HTTPS + 1.1.1.1 and Catching and dealing with naughty devices on my home network. Go and read those because I’m deliberately not going to repeat them here. In fact, I hadn’t even planned to write anything until I saw how much difference the service actually made. More on that in a moment, the one other bit I’ll add here is that the Raspberry Pi I purchased for the setup was the Little Bird Raspberry Pi 3 Plus Complete Starter Kit:

Little Bird Raspberry Pi 3 Plus Complete Starter Kit

This just made it a super easy turnkey solution. Plus, Little Bird Electronics down here in Aus delivered it really quickly and followed up with a personal email and a “thank you” for some of the other unrelated stuff I’ve been up to lately. Nice 🙂

I went with an absolute bare bones setup which essentially involved just following the instructions on the Pi-hole site (Scott gets a bit fancier in his blog posts). I had a bit of a drama due to some dependencies and after a quick tweet for help this morning followed by a question on Discourse, I was up and running. I set my Ubiquiti network to resolve DNS through the Pi and that’s it – job done! As devices started picking up the new DNS settings, I got to see just how much difference was made. I set my desktop to manually resolve through Cloudflare’s 1.1.1.1 whilst my laptop was using the Pi-hole which made for some awesome back to back testing. Here’s what I found:

Let’s take a popular local Aussie news site, news.com.au. Here’s what it looks like with no Pi-hole:

news.com.au without pi-hole

In the grand scheme of ads on sites, not too offensive. Let’s look at it from the machine routing through the Pi-hole:

news.com.au with pi-hole

Visually, there’s not a whole lot of difference here. However, check out the network requests at the bottom of the browser before and after Pi-hole:

news.com.au network without pi-hole

news.com.au network with pi-hole.jpg

Whoa! That’s an 80% reduction in network requests and an 82% reduction in the number of bytes transferred. I’d talk about the reduction in load time too except it’s really hard to measure because as you can see from the waterfall diagrams, with no Pi-hole it just keeps going and going and, well, it all gets a bit silly.

Let’s level it up because I reckon the smuttier the publication, the bigger the Pi-hole gain. Let’s try these guys:

dailymail.co.uk with no pi hole

And for comparison, when loaded with the Pi-hole in place:

dailymail.co.uk-with-pi-hole

And now – (drum roll) – the network requests for each:

dailymail.co.uk network with no-pi-hole

dailymail.co.uk network with pi-hole

Holy shit! What – why?! I snapped the one without Pi-hole at 17.4 mins after I got sick of waiting. 2,663 requests (one of which was to Report URI, thank you very much!) and 57.6MB. To read the freakin’ news. (Incidentally, in this image more than the others you can clearly see requests to domains such as fff.dailymail.co.uk failing as the Pi-hole prevents them from resolving.)

After just a few quick tests, I was pretty blown away by the speed difference. I only fired this up at about 8am this morning and I’m just 9 hours into it but already seeing some pretty cool stats:

Pi-hole-dashboard

It’s also flagging a bunch of things I’d like to look at more, for example my wife’s laptop being way chattier than everything else:

Top clients

Top blocked clients

Wife's laptop requests

So in summary, no compromising devices, no putting your trust in the goodwill of an extension developer, no per-device effort, the bad stuff is blocked and the good stuff still works:

Sponsor message still works

Lastly, Pi-hole has a donate page and this is one of those cases where if you find it as awesome as I have already, you should absolutely show them some love. Cash in some of that time you’ve reclaimed by not waiting for rubbish ads to load 😎