Skip to content

Instantly share code, notes, and snippets.

View noslin005's full-sized avatar

Nilson Lopes noslin005

  • Source Code Corp.
  • United States of America
View GitHub Profile
@noslin005
noslin005 / Custom GRML ISO.md
Created August 19, 2020 03:15
Custom GRML ISO
DISISO="$HOME/Downloads/grml64-small_2017.05.iso"
squashfs="/live/grml64-full/grml64-full.squashfs"
mkdir ~/livecdtmp
cd ~/livecdtmp
mkdir extract-cd mnt
sudo mount -o loop "$DISISO" mnt
sudo rsync --exclude=$squashfs -a mnt/ extract-cd
sudo unsquashfs mnt$squashfs
sudo mv squashfs-root edit
@noslin005
noslin005 / user-data.yaml
Created August 14, 2020 15:17
Ubuntu 20.04 LTS Server (Standard Install)
#cloud-config
autoinstall:
refresh-installer:
update: true
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64, i386]
uri: http://us.archive.ubuntu.com/ubuntu
@noslin005
noslin005 / user-data.yaml
Created August 14, 2020 15:16
Ubuntu 20.04 LTS Server RAID 1 (Standard Partition)
#cloud-config
autoinstall:
refresh-installer:
update: true
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64, i386]
uri: http://us.archive.ubuntu.com/ubuntu
#!/usr/bin/env bash
echo "Counting HBA SAS3 controllers ..."
sas_ctrl=$(sas3flash -listall | grep -e "^[0-9]"| awk '{print $1}')
output="/tmp/sas.txt"
for ctrl in ${sas_ctrl[@]}; do
ctrl_index=$(echo $ctrl | awk '{print $1}')
echo "Controller ${ctrl_index}: Identifying Model and Firmware ID"
sas3flash -c ${ctrl_index} -list > $output
model=$(awk '/Board Name/ {print $4}' $output)
@noslin005
noslin005 / pproc.py
Created July 23, 2020 23:38 — forked from bbengfort/pproc.py
Runs multiple subprocesses in parallel, serializing stdout.
#!/usr/bin/env python3
# pproc
# Runs multiple subprocesses in parallel, serializing stdout.
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Wed Jun 14 15:20:05 2017 -0400
#
# Copyright (C) 2017 Bengfort.com
# For license information, see LICENSE.txt
#

Hi,

I packaged a few of Intel's out of tree NIC drivers from http://sourceforge.net/projects/e1000/ as dkms based .debs and included them in a custom grml image.

I'll explain how; if there is interest, I can also share my packages (although, as you'll see, they're likely sub-par, because I did not take the time to really understand what I was doing; in particular, I fear the e1000e module may not always build correctly at grml-live time, while it builds

@noslin005
noslin005 / scanner.py
Created May 25, 2020 05:11
scan network using nmap
#!/usr/bin/python
import nmap
target_mac = '<Enter MAC Adress>'
nm = nmap.PortScanner()
nm.scan(hosts='10.0.0.0/24', arguments='-n -sP')
@noslin005
noslin005 / BMC and ipmitool.md
Last active February 17, 2025 15:23
Use ipmitool with supermicro boards
  1. Read the fan speed mode:
ipmitool -H <IP> -U <USER> -P <PASSWD> raw 0x30 0x45 0x00

The values are:

  • Standard: 0
  • Full: 1
  • Optimal: 2
  • Heavy IO: 4
@noslin005
noslin005 / grml remaster tips.md
Last active December 2, 2023 06:41
Remastering grml

Re-mastering GRML 2018.12 Small

Nilson Lopes | Thursday, March 12, 2020

It is recommended that you use grml-live to build your own disc.

  • Loop mount the ISO image:
├── iso      	<-- mount the original iso here