Skip to content

Instantly share code, notes, and snippets.

View cy-lee's full-sized avatar

Chang-Yi Lee cy-lee

View GitHub Profile
@cy-lee
cy-lee / compile-nfs-ganesha-ubuntu-16.04
Created February 1, 2019 01:56
Compile nfs-ganesha under Ubuntu-16.04
# Refer: https://www.techsutram.com/2017/07/practical-way-to-build-nfs-ganesh-from.html
git clone https://github.com/nfs-ganesha/nfs-ganesha.git
cd nfs-ganesha
git submodule update --init --recursive
mkdir build
cd build
sudo apt-get install –y g++ libboost-dev cmake make git doxygen
sudo apt-get install –y build-essential libglu1-mesa-dev libc6-dev
sudo apt-get install –y libkrb5-dev libgss-dev liburcu-dev bison flex
@cy-lee
cy-lee / gist:6d855e42fae3ddc542ca3ad47d950d27
Created October 30, 2021 08:03
Simple string encode/decode using OpenSSL 1.1.1f in command line
# encode "asdf", use aes-256-cbc cipher, password is login, output format is base64 encoded
echo asdf | openssl enc -aes-256-cbc -base64 -pass pass:login -pbkdf2
# decrypt base64 string back to string
echo U2FsdGVkX1//XT7B0wrXH0+3hqMz7jJ+6ss5QStdI/k= | openssl enc -d -aes-256-cbc -base64 -pass pass:login -pbkdf2
@cy-lee
cy-lee / fix_ubuntu_distro.py
Last active December 21, 2021 07:34
Cobbler 3.2.2 import Ubuntu image cannot PXE boot correctly because initrd.gz point to wrong path.
#!/usr/bin/python3
# cylee: This module try to modify all Ubuntu distro. initrd file to netboot based
import logging
import os
import sys
from xmlrpc.client import Server
# Place this file under /var/lib/cobbler/triggers/task/import/post
# it will auto trigger once imported an image
def register():
@cy-lee
cy-lee / gist:8f808bd9ccd216dc149e5d6b68c1b545
Created January 13, 2022 09:24
Cobbler cannot install VMware ESXi 6.7/7.x
Currently the Fedora 35 ship with SYSLINUX version 6.04
When you use Cobbler to pxe boot system will see below message continue print on screen
Failed to load COM32 file ..../mboot.c32
It is because VMWare build their own mboot.c32 and don't release source code.
Solution:
Copy pxelinux.0 from old syslinux package and put it to /var/lib/tftpboot/ , I tried 4.05 from CentOS 7 default repo. and it work!