Skip to content

Instantly share code, notes, and snippets.

View fberndl's full-sized avatar

Florian Berndl fberndl

View GitHub Profile
@fberndl
fberndl / mnt
Created September 18, 2018 10:13 — forked from embs/mnt
Mounting Linux partition
Boot your system into a live CD. Mount your system into the live CD:
sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
Log into the mounted system:
sudo chroot /mnt
@fberndl
fberndl / _README.md
Created June 27, 2018 15:02 — forked from robinsmidsrod/_README.md
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)

Go into your git checkout folder of ipxe.

Save the below file as nic-menu.ipxe.

Build iPXE like this:

cd src && make EMBED=../nic-menu.ipxe && cd ..

Requirements: current iPXE as of 2013-08-01 (for proper behavior of autoboot with a network device specified, netX feature, PCI vendor/device ID display and inc command)

@fberndl
fberndl / roce-check.sh
Created August 22, 2017 11:52 — forked from hiroyuki-sato/roce-check.sh
roce-check
#!/bin/bash
echo "============================"
echo " pfcrx / pfctx parameters "
echo "============================"
for i in /sys/module/mlx?_en ; do
m=$( basename $i )
echo "INTERFACE: $m"
RTX=$( cat $i/parameters/pfcrx )
@fberndl
fberndl / get_releases.sh
Created July 21, 2017 05:06 — forked from nikolaik/get_releases.sh
Use puppetmaster to fetch facts (JSON) from all puppet nodes without puppetdb
#!/bin/bash
NODES=`sudo puppet cert list --all|awk '{print $2}'` # Get all node names
echo '{"facts": [' > facts_tmp.json
# for node in node: get facts
echo -n $NODES | xargs -d " " -i sh -c 'sudo puppet facts find {} --terminus rest | tr "\n" "," >> facts_tmp.json'
sed -ie 's/,$//' facts_tmp.json # Remove last comma
echo ']}' >> facts_tmp.json
# optionally format and filter json (requires jq)
@fberndl
fberndl / gist:ecfba75989994e95b45f28252efa69f3
Created July 21, 2017 05:03 — forked from npwalker/gist:8741257
How to regenerate a puppet agent certificate
  1. On the master: puppet cert clean <agent_certname>
  2. On the agent: mv /etc/puppetlabs/puppet/ssl/ /etc/puppetlabs/puppet/ssl_bak
  • Never do this if you are trying to regenerate the cert for the agent on the master. Instead you would need to delete specific certs
  1. On the agent: puppet agent -t
  2. On the master: puppet cert sign <agent_certname>