Skip to content

Instantly share code, notes, and snippets.

View pawaanv's full-sized avatar

Pawan pawaanv

View GitHub Profile
@pawaanv
pawaanv / sysctl.conf
Created June 23, 2020 14:39 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@pawaanv
pawaanv / sysctl.conf
Created June 23, 2020 14:39 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
############################# ON ERL3 #############################
# First SSH to the ELR3 then edit the configuration
configure # drops you into the configuration terminal
# Set the boot file.
set service dhcp-server shared-network-name LAN1 subnet 172.16.24.0/22 bootfile-name pxelinux.0
# Set the boot server.
set service dhcp-server shared-network-name LAN1 subnet 172.16.24.0/22 bootfile-server 172.16.24.90
@pawaanv
pawaanv / leeroy.cfg
Created July 10, 2018 18:26 — forked from atuttle/leeroy.cfg
This is my preseed file for auto-installing Ubuntu 11.04 on my Jenkins server
#### Contents of the preconfiguration file (for squeeze)
### Localization
# Preseeding only locale sets language, country and locale.
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
#d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.
#d-i localechooser/supported-locales en_US.UTF-8, nl_NL.UTF-8
d-i debian-installer/locale string en_US
@pawaanv
pawaanv / gist:f8d78ee3f1a62f32492731c19a4aaeb5
Created July 5, 2018 11:40 — forked from hugoduncan/gist:1001548
debian squeeze preseed late_command for automated install of virtualbox guest additions
# Install virtualbox additions.
# Requires the guest additions iso connected to the secondary slave.
# This seems overly complicated, but is a combination
# that seems to work:
# the vbox ose packages were somehow being installed by the standard task,
# the LSB header is required for update-rc.d, which in turn is needed,
# due to straight linking to rc2.d not working (automatic boot sequence,
# and dependency management),
# cdrom source not being removed at the point when this script runs.
# Deletes /etc/udev/rules.d/70-persistent-net.rules to allow cloning.
@pawaanv
pawaanv / make-pxe-environment.sh
Created June 17, 2018 11:59 — forked from gdamjan/make-pxe-environment.sh
Make and start a PXE server
#!/bin/sh
mkdir /home/tftproot
# install syslinux from package and symlink it or just download and extract it
ln -s /usr/lib/syslinux /home/tftproot/syslinux
mkdir /home/tftproot/pxelinux.cfg/
cat > /home/tftproot/pxelinux.cfg/default <<EOF
@pawaanv
pawaanv / README
Created June 11, 2018 11:51 — forked from kalxas/README
Customize ubuntu live image
# first, get the iso from http://releases.ubuntu.com/
# make working dir hierarchy in /tmp (you'll need enough ram for this)
sudo mkdir -p /tmp/custom/{_squash,_work,iso,newiso,newlive,project}
sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso
sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_squash
sudo mount -t overlay overlay -onoatime,lowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive
# customize the live fs with systemd-nspawn (a better chroot)
sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive
#!/bin/bash
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
# Make sure you have all dependencies:
# yum -y install libguestfs-tools virt-install
@pawaanv
pawaanv / README.md
Created March 18, 2018 10:37 — forked from hofmannsven/README.md
Simple Command Line Cheatsheet
@pawaanv
pawaanv / ext4-performance.md
Created February 11, 2018 13:32 — forked from assafmo/ext4-performance.md
Tune ext4 for performance

Adjust ext4 for performance

Mount options

errors=remount-ro,noatime,nouser_xattr,barrier=0

Journal

Check if exists

sudo tune2fs -l /dev/sdXY | fgrep has_journal

Turn Off/On