Skip to content

Instantly share code, notes, and snippets.

View shaposhnikoff's full-sized avatar
🏠
Working from home

Shaposhnikoff shaposhnikoff

🏠
Working from home
View GitHub Profile

Encrypted root filesystem on Debian Wheezy

This documents how to set up an encrypted root filesystem (except for /boot) on Debian Wheezy with automatic mounting using a keyfile on a USB drive.

Basic setup

In the Debian Installer, choose "Guided - use entire disk and set up encrypted LVM". That's it, on boot you will be asked to enter you passphrase using the keyboard. My system does not usually have a keyboard attached, so that's not very convenient (but read on).

---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
---
- digital_ocean: >
state=present
command=ssh
name={{ digitalocean.sshkeyname }}
ssh_pub_key="{{ digitalocean.sshkey }}"
client_id={{ digitalocean.clientid }}
api_key={{ digitalocean.apikey }}
- digital_ocean: >
@shaposhnikoff
shaposhnikoff / rpm-from-source.sh
Last active August 29, 2015 14:27 — forked from fernandoaleman/rpm-from-source.sh
How to create an RPM from source with spec file
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.7.7.3
# Step: 1
# Install rpmbuild
@shaposhnikoff
shaposhnikoff / local.conf
Last active September 1, 2015 19:59 — forked from etoews/local.conf
DevStack local.conf for OpenStack Icehouse
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services
mkdir bottle
cd bottle
pip install virtualenv==12.0.7
virtualenv venv
source venv/bin/activate
pip install bottle==0.12.8
pip freeze > requirements.txt
git init
git add .
git commit -m "initial commit"
@shaposhnikoff
shaposhnikoff / gtk-firefox.sh
Created February 7, 2016 20:26 — forked from joekiller/gtk-firefox.sh
INSTALL FIREFOX ON AMAZON LINUX X86_64 COMPILING GTK+
#!/bin/bash
# GTK+ and Firefox for Amazon Linux
# Written by Joseph Lawson 2012-06-03
# http://joekiller.com
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/
# chmod 755 ./gtk-firefox.sh
# sudo ./gtk-firefox.sh
@shaposhnikoff
shaposhnikoff / jdk_download.sh
Created May 15, 2016 17:45 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@shaposhnikoff
shaposhnikoff / rPi3-ap-setup.sh
Created November 9, 2016 11:11 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2016 rpi jessie image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@shaposhnikoff
shaposhnikoff / Jenkinsfile.groovy
Created January 25, 2017 18:49 — forked from intel352/Jenkinsfile.groovy
Demandware Jenkinsfile build
node {
stage 'Checkout'
checkout scm
env.BUILD_TAG_CLEANED = "${env.BUILD_TAG}".replaceAll(/\%\d[a-zA-Z]/, "-").replaceAll(/[^\w-]+/, "")
env.ENABLE_TWO_FACTOR = 'false'
env.ENVIRONMENT_INSTANCE = 'dev03' // test build sandbox for branches != develop
if (env.BRANCH_NAME == 'develop') {