Skip to content

Instantly share code, notes, and snippets.

View skottler's full-sized avatar

Sam Kottler skottler

View GitHub Profile

Keybase proof

I hereby claim:

  • I am skottler on github.
  • I am skottler (https://keybase.io/skottler) on keybase.
  • I have a public key ASCa8nLfxV-khq9Km_FD-4trWcoOyAOWjfG6AHAKk-brZAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am skottler on github.
  • I am samkottler (https://keybase.io/samkottler) on keybase.
  • I have a public key ASCT60MdsGpZfjvNNtvOIHOW55Kc34TdMx6yHXuutvKuzwo

To claim this, I am signing this object:

Setting up netboot.xyz with an EdgeRouter

This document covers how to setup netboot.xyz, a service that provides iPXE-based installation and live boot of a bunch of operating systems, on a Ubiquiti EdgeRouter.

Assumptions

I've made a few assumptions throughout this document that will probably be different for your setup:

Ohai.plugin(:Trim) do
# This ohai plugin provides data about TRIM support on each underlying block
# device available on the system. Its functionality is rather simple - it
# iterates over each physical device, ignoring partitions, and then runs
# hdparm to find the drives' capabilities, finally grepping for TRIM support.
provides "block_device/trim"
depends "block_device"
collect_data(:default) do

Before:

samkottler@ubuntu:~$ cat /proc/meminfo
MemTotal:        2042728 kB
MemFree:          599932 kB
Buffers:           33268 kB
Cached:          1240816 kB
SwapCached:         3396 kB
Active: 1051100 kB
require 'spec_helper'
describe command("env x='() { :;}; echo vulnerable' bash -c 'echo this is a test'") do
its(:exit_status) { is_expected.to eq 0 }
its(:stdout) { is_expected.not_to match(/vulnerable/) }
end

I'm gonna forgot how to fix this next time I come across it, so using this gist to document the issue. This occurs on Debian 7.5 with the following package installed from testing: openssh-server 1:6.6p1-5, which was pulled in through the ssh metapackage.

Could not load host key: /etc/ssh/ssh_host_ed25519_key

Apparently this is a bug in the debian packaging. Luckily there's a pretty great command for fixing it: ssh-keygen -A, which will generate any missing keys. If you're running with a VM make sure you've got enough available entropy to generate those aforementioned keys. If you don't want to run the creation command for all the missing keys, then you can just run this instead: /usr/bin/ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''.

Keybase proof

I hereby claim:

  • I am skottler on github.
  • I am shk (https://keybase.io/shk) on keybase.
  • I have a public key whose fingerprint is 76EE 0F0F FF19 5505 81F3 0E2F 499C 8210 826E 8956

To claim this, I am signing this object:

samkottler@ip-10-253-6-159:/etc/logrotate.d$ sudo dpkg -S nginx
nginx: /etc/nginx/scgi_params
nginx: /etc/nginx/conf.d/example_ssl.conf
nginx: /etc/nginx/nginx.conf
nginx: /etc/nginx/win-utf
nginx: /opt/nginx/sbin/nginx
nginx: /opt/nginx/html/50x.html
nginx: /etc/nginx/mime.types
nginx: /opt/nginx/conf/uwsgi_params
nginx: /opt/nginx/sbin/nginx.old
#rubygems Central conversation
#rubygems-status: The content of the status site
#rubygems-verification: Checking MD5's against S3