Friday, 26 April 2024

GRUB menu not displayed?

GRUB is usually configured to show a menu for a few seconds on boot, but some distributions will set it to skip the menu.

The answer is to press a hotkey to enter the menu.

If BIOS is booting the system, press SHIFT

If UEFI is booting the system, press ESCAPE

When booking a VM, you get precious little time before it boots the system, so just hold the key down during POST!

Tuesday, 10 May 2022

Power Query authentication issues refreshing queries

Power Query is an extremely handy tool, especially now that it's baked into Excel, but it has an annoying tendency to not show system dialog boxes when it can't authenticate to datasources.

A common error is "Exception of type 'Microsoft Mashup Engine.Interface.ResourceAccessForbiddenException' was thrown" although there are probably many more.

In order to do a turn-it-off-and-back-on-again reset of the stored (and failing) authentication credentials:

1. Go to Data -> Queries & Connections and right click on a query and edit it.  T|his should bring up the query editor.

2. Then click on data source settings and Global Permissions. Select all the data sources listed and click edit permissions

3. Under credentials, click edit and select a different type of authentication and click save.  Then go back in and re-select the right one, signing or entering username/password as appropriate.

4. Then select the appropriate Privacy Level.  If it's not a confidential document you can just choose None.

5. You may need to repeat for the "data sources in current workbook" although Global Permissions to take precedence

Close the dialogue and refresh the queries.

Monday, 7 March 2022

Configuring Hashicorp repositories in Linux Mint (and other Ubuntu based distributions)

Hashicorp distributes Packer and Terraform as both binaries and packages for popular Linux distributions.  

They also have a handy apt repository for use with Ubuntu and Debian, but it generates a 404 error during apt-get update with other derivatives:

e.g.
Err: 9 https://apt.releases.hashicorp.com ulyssa Release
404  Not Found [IP: 151.101.2.49 443]

The reason is the respository only appears to contain branches for the Ubuntu and Debian codenames.

The solution is to edit the sources list and change it to use the equivalent Ubuntu/Debian codename instead:

  • Edit /etc/apt/sources.list.d/additional-repositories.list with your text editor of choice
  • The line that contains apt.releases.hashicorp.com will have the distribution codename in it
    • e.g. for Linux Mint 20.1 which has codeame ulyssa:
    • deb [arch=amd64] https://apt.releases.hashicorp.com ulyssa main
    • (use lsb_release -a to identify the codename)
  • Change the codename in the entry to the equivalent Ubuntu or Debian codename
    • deb [arch=amd64] https://apt.releases.hashicorp.com focal main
Then update the apt repository list and it should find the packages when you try to install Terraform or Packer with apt-get install





Tuesday, 14 December 2021

Diskspd - ERROR: Error adjusting token privileges for SeLockMemoryPrivilege (error code: 1300)

This error is sometimes generated when choosing the -l option for DiskSpd (Use large pages for IO buffers)

I'm not sure what the benefit of testing with large pages is, so I usually just leave it off

Sunday, 19 July 2020

Unable to install Powershell modules

Installing powershell modules from powershell gallery on a machine with no direct internet access but which has access via a proxy just needs the proxy url / credentials supplied on the install-module command.

e.g. install-module vmware.vim -proxy http://<proxyip>:<proxy port>

However if you have no repositories registered with Powershell (such as the powershell gallery) you may still see errors relating to the NuGet provider:

NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet
 provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\administrator\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by
running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install
and import the NuGet provider now?

And when attempting to install nuget, even specifying a proxy you may still get errors because the repository isn't registered.

The solution is to register the default repository via proxy, which will then allow modules to be installed

PS C:\> Get-PSRepository
WARNING: Unable to find module repositories.

PS C:\> Register-PSRepository -Default -Proxy http://<proxy ip>:<proxy port>

PS C:\> Get-PSRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2

You should now be able to install modules via the proxy with the -proxy parameter


Thursday, 2 July 2020

Error after docker upgrade: "docker: Error response from daemon: OCI runtime create failed"

After upgrading docker and docker cli (CentOS 7), a previously working container decided to bomb out with the following error: 

docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"write /proc/self/attr/keycreate: permission denied\"": unknown. 

 It turns out that container-selinux also needs to upgraded to match.  

e.g. run yum upgrade docker-ce.x86_64 docker-ce-cli.x86_64 container-selinux 

Wednesday, 28 March 2018

Importing DFSR debug & Event logs info vRealize Log Insight

If you're running a large DFS replication cluster with a large (millions) number of files, you probably have a very high turnover of both Windows Event logs and DFSR debug logs.

There are many log aggregation tools, from the freeware ELK stack and Greylog to the paid for Splunk and vRealize from VMware.  The vRealize Log Insight tool doesn't have the per GB licencing model that Splunk has, but also comes up a little short on functionality in the way of pre-built "apps".

Neither have an app for DFSR but luckily it doesn't take much in Log Insight to import the DFSR logs.  It's also (OVA) appliance based, so to add capacity you just deploy another appliance and join it to the cluster.

To import the DFSR logs you need to deploy the Windows Log Insight Agent to the file servers in question.

msiexec SERVERHOST=<log insight ip> /qn /i <agent msi filename>

Then once the agents are reporting into Log Insight, go to the administration page and choose management->Agents. Create a new group containing the File servers and enter this configuration

[filelog|DFSR_logs]
directory=C:\Windows\debug
include=Dfsr01000.log
event_marker=^\d\d\d\d\d\d\d\d\s\d\d:\d\d:\d\d.\d\d\d

[winlog|DFS_Replication]
channel=DFS Replication
tags={"ms_product":"activedirectory"}
parser=auto


This will ensure the DFSR debug logs are imported in multiline format as a datestamp is applied at the start of every new record.