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 / build.sh
Created March 18, 2021 15:32 — forked from Forst/build.sh
Ubuntu ISO with preseed.cfg generation script
#!/bin/bash
## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT
# Quit on first error
set -e
# Temporary directory for the build
TMP="/var/tmp/ubuntu-build"
@noslin005
noslin005 / mcx-connect6.diff
Created November 5, 2020 15:55
Patch to fix the issue with Mellanox ConnectX-6 on OpenBSD 6.8
--- if_mcx.c Thu Nov 5 09:48:26 2020
+++ /usr/src/sys/dev/pci/if_mcx.c Thu Nov 5 09:39:32 2020
@@ -839,6 +839,7 @@
#define MCX_CAP_DEVICE_PORT_MODULE_EVENT \
0x80
#define MCX_CAP_DEVICE_PORT_TYPE 0x03
+#define MCX_CAP_DEVICE_PORT_TYPE_ETH 0x01
uint8_t num_ports;
uint8_t snapshot_log_max_msg;
@noslin005
noslin005 / INACCESSIBLE_BOOT_DEVICE.md
Last active April 11, 2023 17:35
Windows Server 2019 VROC NVMe RAID 1 INACCESSIBLE_BOOT_DEVICE blue screen BSOD Supermicro

If the INACCESSIBLE_BOOT_DEVICE blue screen error is displayed due to other operations, perform the following procedure:

A - Prepare USB with Drivers

  1. You'll need a USB drive formatted as FAT32

  2. Create a folder in the USB, named drivers or any other name easy to remember.

  3. Download Intel VROC driver from Supermicro https://www.supermicro.com/wftp/driver/VROC/

@noslin005
noslin005 / HP V1910-16G.md
Created September 4, 2020 19:53
Initial configure HP V1910-16G

Password: 512900 or Jinhua1920unauthorized

<HP 1920G Switch>_cmdline-mode on

[HP 1920G Switch] ipsetup ip-address 192.168.1.2 24 default-gateway 192.168.1.1

[HP 1920G Switch] save

[HP 1920G Switch] reboot
@noslin005
noslin005 / ipmitool.py
Created August 24, 2020 15:20
subprocess ipmitool.py
def ____run(self, command):
procs = {}
for node in self.nodes:
ip = node['ip']
user = node['user']
password = node['password']
cmd = f'ipmitool -H {ip} -U {user} -P {password} {command}'
procs[ip] = subprocess.Popen(cmd,
shell=True,
stdout=subprocess.PIPE,
@noslin005
noslin005 / Redfish cheat sheet.md
Created August 21, 2020 03:29
Redfish cheat sheet

Redfish cheat sheet

This document is intended to provide a set of [Redfish][1] client commands for OpenBMC usage. (Using CURL commands)

Query Root

$ export bmc=xx.xx.xx.xx
$ curl -b cjar -k https://${bmc}/redfish/v1
@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)