Installing Solaris 8 x86 on VirtualBox 7.0.20 – when to remove the iso during install

After initially booting from disk 1 and following the prompts to format the disk, you’ll reach a prompt where it asks you to remove the install media and reboot. Note that it also says to only remove the media after the machine has reset before you eject- this is important otherwise the disk will not be bootable:

The sequence that appears to work is:

  • press Enter
  • wait for VM to reset
  • remove mounted iso in VirtualBox just as the VM is restarting and you see the VirtualBox logo/BIOS screen

At this point you’re asked what partition to boot from (select 1) and the installer will continue as normal from that point:

If you remove the iso from the VM before it resets, you’ll see the screen to select either the boot disk or the cdrom (the initial installer screen, not the partition selection screen above), and if you select the disk at this point it will not boot (after pressing Enter it appears there’s a few seconds delay where there is a disk sync step, and this needs to complete before the machine resets and when it’s safe to remove the iso).

Automating ssh key passphrases on MacOS

As a reminder, here’s how to use ssh keys to access remote hosts:

Adding hosts to a ~/.ssh/config file to use different keys with different git hosts is something I find I only need to do once in a while, but I made a note here because I can never remember how this is configured:

#Edit ~/.ssh/config and for each repo add the following block:
host hostname-of-repo
user your-id-for-this-repo
identityfile ~/.ssh/filename-of-key
view raw gistfile1.txt hosted with ❤ by GitHub

If you are required to use passphrases with ssh keys, being prompted to enter your passphrase every time you use a key can get tiresome. On MacOS however you can automate using your passphrase with by adding:

UseKeychain yes

to your ~/.ssh/config file (suggestion from this post here).

Deploying a container to Google Cloud Run via gcloud cli

If you don’t already have one, create an Artifact Registry:

gcloud artifacts repositories create your-repo-name \
--repository-format=docker \
--location=europe-west2 \
--description="your-repo-description" \
--immutable-tags \
--async

Authorize gcloud cli access to the registry in your region:

gcloud auth configure-docker europe-west2-docker.pkg.dev

This adds config to $HOME/.docker/config.json, you can look in this file to see what GCP registries you have already authenticate with.

The image you’re deploying needs to listen on port 8080, and needs to be built for linux/amd64. If you’re building on an Apple Silicon Mac, build your image with:

docker build . --platform linux/amd64 -t image-tag-name 

Tag the image ready to push to your registry:

docker tag SOURCE-IMAGE LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE:TAG

where:

LOCATION = GCP region, e.g. europe-west2

Authenticate your local Docker with your GCP Artifact Repository:

gcloud auth configure-docker LOCATION-docker.pkg.dev

Push your image to the Artifact Repository with:

docker push LOCAITION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE:TAG

After pushing you can browse your Artifact Registry in the Console and see your image there.

To deploy a new service using the image you just pushed:

gcloud run deploy gcp-nginx-test --project your-project-name --image LOCAITION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE:TAG

These steps are a summary of the Artifact Registry docs here, and the Cloud Run docs here.

GitLab Runner “Runner has never contacted this instance”

I just installed and configured a GitLab Runner on a separate Ubuntu 22.04 server. Following tips here and here, I’ve started the runner with ‘sudo gitlab-runner start’ and I’ve verified the config with ‘sudo gitlab-runner verify’, but the GitLab server is still showing the ‘never contacted this instance’ error:

Following the troubleshooting steps here, I used journalctl to view the logs:

sudo journalctl --unit=gitlab-runner.service -n 100 --no-pager

and this gave me a clue:

Oct 19 14:36:24 proxmox-ubuntu2204-server systemd[1]: Started GitLab Runner.
Oct 19 14:36:25 proxmox-ubuntu2204-server gitlab-runner[1264]: FATAL: failed to get user home dir: $HOME is not defined
Oct 19 14:36:25 proxmox-ubuntu2204-server systemd[1]: gitlab-runner.service: Main process exited, code=exited, status=1/FAILURE
Oct 19 14:36:25 proxmox-ubuntu2204-server systemd[1]: gitlab-runner.service: Failed with result 'exit-code'.

To set a home dir for the gitlab-runner user, I checked /etc/passwd, found the line for gitlab-runner and it has an entry towards the end of the line for /home/gitlab-runner, so that seems ok.

Following tips here, I edited the service config with:

sudo systemctl edit gitlab-runner

which edits
/etc/systemd/system/gitlab-runner.service.d/override.conf and added this section:

[Service]
Environment="HOME=/home/gitlab-runner"

Restarted the service with:

sudo systemctl restart gitlab-runner

checked the logs again with jornalctl and now we’re up and running, and the runner is reported as available on the Runners page. Done!

Oct 19 14:51:48 proxmox-ubuntu2204-server gitlab-runner[1400]: Runtime platform                                    arch=amd64 os=linux pid=1400 revision=66a723c3 version=17.5.0
Oct 19 14:51:48 proxmox-ubuntu2204-server gitlab-runner[1400]: Starting multi-runner from /etc/gitlab-runner/config.toml... builds=0 max_builds=0
Oct 19 14:51:48 proxmox-ubuntu2204-server gitlab-runner[1400]: Running in system-mode.
Oct 19 14:51:48 proxmox-ubuntu2204-server gitlab-runner[1400]:
Oct 19 14:51:48 proxmox-ubuntu2204-server gitlab-runner[1400]: Configuration loaded builds=0 max_builds=1