Skip to content

Instantly share code, notes, and snippets.

@gistbucket
gistbucket / Vagrantfile
Created November 6, 2021 19:42 — forked from rgl/Vagrantfile
Vagrant environment that lets you copy a virtual disk image into a physical USB disk using qemu-img
# this lets you easily convert a virtual disk image into a physical disk.
#
# # Usage for converting a vmdk on the host to an attached physical USB disk
#
# vagrant up
# vagrant ssh
# qemu-img info /vagrant/box-disk1.vmdk
# sudo qemu-img info /dev/sdb
# sudo qemu-img convert -p /vagrant/box-disk1.vmdk /dev/sdb
#
@gistbucket
gistbucket / create-cloud-template.sh
Last active November 19, 2021 11:57 — forked from chriswayg/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@gistbucket
gistbucket / inet-share.sh
Created January 1, 2022 12:04 — forked from dzervas/inet-share.sh
RasPi Scripts
#!/bin/sh
sudo sysctl -w net.ipv4.conf.usb0.forwarding=1
sudo iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE

Automatically deploy CoreOS server on Proxmox

For my Kubernetes experiments I wanted automated CoreOS deployments. I managed to do that by abusing the smbios1 fields in the qemu configuration of a VM on Proxmox.

Using Ignition to run a one-time systemd service which sets the ip address and gateway, and the 'core' user's initial password, so my ansible scripts can come in and install CoreOS.

@gistbucket
gistbucket / pxeboot.md
Created January 1, 2022 12:15 — forked from jo-makar/pxeboot.md
Setup a PXE boot server

Setup a PXE boot server

Using dnsmasq (on Debian)

apt-get install dnsmasq pxelinux syslinux-common syslinux-efi

mkdir /srv/tftpboot

ln -s /usr/lib/PXELINUX/pxelinux.0 /srv/tftpboot/
@gistbucket
gistbucket / install_debian_with_debootstrap_howto.md
Created January 5, 2022 03:28 — forked from varqox/install_debian_with_debootstrap_howto.md
Instructions how to install Debian using debootstrap
@gistbucket
gistbucket / gist:d6d7f46c03befaef7e4ffbd82e08a6b1
Last active January 23, 2022 21:22 — forked from map7/gist:bdcef100f7f9ecba38a439fed12bea53
debian 10 LTSP 20.3 install with chroot
- [-] Install *LTSP 20.3* on *debian10-ltsp*
- [X] Change to root
: su -
- [X] Configure PPA
The PPA gets updated before the repository (even debian testing)
: wget https://ltsp.org/misc/ltsp-ubuntu-ppa-bionic.list -O /etc/apt/sources.list.d/ltsp-ubuntu-ppa-bionic.list
: wget https://ltsp.org/misc/ltsp_ubuntu_ppa.gpg -O /etc/apt/trusted.gpg.d/ltsp_ubuntu_ppa.gpg
@gistbucket
gistbucket / deploy.sh
Created February 21, 2022 07:27 — forked from jjpeleato/deploy.sh
Shell script for remote deployment. (Script run on Ubuntu 18.04)
#!/bin/bash
#
# Shell script for remote deployment.
#
# Notes:
# - Git is assumed
# - Composer is assumed
# - NPM is assumed
# - Windows host and Cygwin environment is assumed
@gistbucket
gistbucket / README.md
Created March 7, 2022 06:48 — forked from RichardBronosky/README.md
A bash plugin to manage plugins

bash-bashplug

A bash plugin to manage plugins

Installation

Set up bash_plugins folder

(Skip this step if you already have a bash_plugins folder.)

{
# simply copy-pasta this whole block, or customize these vars and copy-pasta the rest
@gistbucket
gistbucket / README.md
Created March 8, 2022 22:41 — forked from RichardBronosky/README.md
Using cloud-init for cloudless provisioning of Raspberry Pi

Installing cloud-init on a fresh Raspbian Lite image

This is a work in Progress!

Purpose

This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.

I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash so everything I do, you could also do at the command line. (Even the for loop.)