Skip to content

Instantly share code, notes, and snippets.

@bartprokop
bartprokop / keybase.md
Created June 6, 2022 18:53
My identity on GitHub and Keybase

Keybase proof

I hereby claim:

  • I am bartprokop on github.
  • I am bartprokop (https://keybase.io/bartprokop) on keybase.
  • I have a public key ASA4nBh4hUMxsG4FPsa7mLLuiksx9RQ5KdOhzwRk6xturwo

To claim this, I am signing this object:

@bartprokop
bartprokop / storj-node.sh
Last active June 2, 2022 12:12
Storj Node on Arch Linux
# Prerequisites: docker installed and operational.
# Get latest image for node software.
docker pull storjlabs/storagenode:latest
# Create reasonable place for node storage and identity
mkdir -p /srv/storj/identity
mkdir -p /srv/storj/storage
docker run --rm -e SETUP="true" \
@bartprokop
bartprokop / oneprovider.com-arch-dedi.sh
Last active May 29, 2022 21:49
Getting Arch Linux on Low End Box from oneprovider.com
# Generate initial login password for installation
tr -dc A-Za-z0-9 </dev/urandom | head -c 15 ; echo ''
# Clear known SSH key after (re-) installing OS on bare metal:
ssh-keygen -R 195.154.112.70
# # Host 195.154.112.70 found: line 52
# /c/Users/proko/.ssh/known_hosts updated.
# Original contents retained as /c/Users/proko/.ssh/known_hosts.old
# Try to SSH to new server using username and password from server properties.
@bartprokop
bartprokop / arch-docker.sh
Last active May 28, 2024 12:55
Arch Linux Docker install with BTRFS
# Install Docker first
pacman -S docker
# Create subvolume for Docker images
cd /mnt/t20root
btrfs subvolume create svols/docker
# Create subvolume 'svols/docker'
btrfs subvolume list .
# ID 256 gen 1349 top level 5 path svols/root
@bartprokop
bartprokop / smb.conf
Last active May 17, 2022 21:45
Arch Linux NAS setup
# btrfs subvolume create svols/media
#
[media]
comment = Music, Video and so on
path = /mnt/t20raid/media
public = yes
only guest = yes
writable = yes
@bartprokop
bartprokop / install-samba.sh
Last active May 17, 2022 19:54
Arch Linux Samba
pacman -S samba
curl "https://git.samba.org/samba.git/?p=samba.git;a=blob_plain;f=examples/smb.conf.default;hb=HEAD" > /etc/samba/smb.conf
nano /etc/samba/smb.conf
# [global]
# log file = /var/log/samba/%m.log
systemctl enable smb
@bartprokop
bartprokop / fix-entropy.sh
Created May 1, 2022 22:05
Arch Linux fixing low entropy
cat /proc/sys/kernel/random/entropy_avail
# 496
pacman -S rng-tools
systemctl start rngd
cat /proc/sys/kernel/random/entropy_avail
# 4035
systemctl enable rngd
@bartprokop
bartprokop / usb-hdd-luks-btrfs.sh
Last active June 11, 2022 14:41
Arch Linux, connecting External USB drive, LUKS2 and btrfs in RAID mode
#
# https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuestions
# https://man.archlinux.org/man/crypttab.5.en
# https://www.schneier.com/wp-content/uploads/2016/02/paper-truecrypt-dfs.pdf
#
pacman -S hdparm
pacman -S smartmontools
dd if=/dev/urandom of=/dev/sdb bs=4096 status=progress
@bartprokop
bartprokop / arch-postinstall.sh
Last active May 22, 2022 12:30
Arch Linux post install necessities
# Upgrade all system
pacman -Syu
# Add local user (me)
useradd -m bart
# Fix Keyboard layout
localectl status
# System Locale: LANG=en_GB.UTF-8
# VC Keymap: n/a
@bartprokop
bartprokop / arch-install.sh
Last active July 31, 2023 18:38
Arch, BTRFS, rEFInd, subvolumes
#!/bin/bash
# *** Valid for archlinux-2022.04.05-x86_64.iso
# *** GPG verify ISO file
gpg --auto-key-locate clear,wkd -v --locate-external-key pierre@archlinux.de
gpg --verify archlinux-2022.04.05-x86_64.iso.sig
# gpg: assuming signed data in 'archlinux-2022.04.05-x86_64.iso'
# gpg: Signature made Tue Apr 5 17:05:57 2022 GMTST