Skip to content

Instantly share code, notes, and snippets.

View risaacson's full-sized avatar

Richard Isaacson risaacson

View GitHub Profile
@risaacson
risaacson / centos7-setup.sh
Last active August 30, 2016 02:18
CCIS2122-40
## Make sure that you are in the sudoers
id
# If your user is not in the 'wheel' group execute the next command.
su -
usermod -a -G wheel YOUR_USERNAME
exit
newgrp wheel
# Log out of your worksation and log back in
# check to make sure that you are in the wheel group.

Keybase proof

I hereby claim:

  • I am risaacson on github.
  • I am risaacson (https://keybase.io/risaacson) on keybase.
  • I have a public key ASCbAHxWvn5nfhe0RtxanGQYbvElWNWW1TL4l1RKv04LAwo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am risaacson on github.
* I am risaacson (https://keybase.io/risaacson) on keybase.
* I have a public key whose fingerprint is 8D3A A61A BC27 766E 2B2B D289 F650 D155 D276 FD09
To claim this, I am signing this object:
@risaacson
risaacson / rip_kernel_and_ramdisk_from_raw_img.sh
Last active December 16, 2015 09:48
Expanding on Gist:5414535 this is a simple script to pull the kernels and ramdisks from a raw image with expected partitions.
#!/usr/bin/env bash
# set -x
# DEBUG='echo'
device=$1
[ ! -f "${device}" ] && exit 1
output_dir=$( echo "${device}" | sed 's/.img//g' )
[ -d "${output_dir}" ] && exit 1
mkdir -p "${output_dir}"
@risaacson
risaacson / rip_rootfs_from_raw_img.sh
Last active December 16, 2015 09:39
This is a continuation from gist:5409137 but based off of Euca linux image creation instructions. So as long as you have created your raw image with the three partitions correctly this script will pull out the root image.
#!/usr/bin/env bash
# set -x
# DEBUG='echo'
get_next_multiplier() {
current_multiplier=$1
multiplier=$(( ${current_multiplier} * 2 ))
}
@risaacson
risaacson / efficent_dd_with_start_and_count.sh
Last active December 16, 2015 08:58
Efficient root fs extraction using dd. As a part of my training I am learning how to create a linux image from a VM installed under KVM. I got to the point of ripping the root fs out of my original image and the instructions had told me to use a block size of 1. It also suggested how it could be sped up and gave the general idea. Finding the gre…
#!/usr/bin/env bash
# set -x
while getopts ":h" opt; do
case ${opt} in
h)
echo "efficent_dd_with_start_and_count.sh INPUT_FILE OUTPUT_FILE START_BYTE BYTE_SIZE"
exit 0
;;
\?)