Skip to content

Instantly share code, notes, and snippets.

@gntlmnoffice
gntlmnoffice / reflector.service
Created December 7, 2020 09:46 — forked from Manouchehri/reflector.service
/etc/systemd/system/reflector.service
[Unit]
Description=Pacman mirrorlist update
Requires=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/bin/reflector --protocol https --country 'United States' --country 'Canada' --age 2 --sort rate --save /etc/pacman.d/mirrorlist
[Install]

On live distro

setfont sun12x22
iwctl
timedatectl set-ntp true
mount /dev/nvme0n1p7 /mnt
mount /dev/nvme0n1p6 /mnt/boot
# move italy server ontop of /etc/pacman.d/mirrorlist
pacstrap /mnt base linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
@gntlmnoffice
gntlmnoffice / .bashrc
Created November 29, 2020 15:33 — forked from redguardtoo/.bashrc
My bash configuration
##
# Bash 4+ required
# FROM,
# 1. http://tldp.org/LDP/abs/html/sample-bashrc.html
# 2. git://github.com/chenkaie/DotFiles.git
##
# If not running interactively, don't do anything
case $- in
*i*) ;;
@gntlmnoffice
gntlmnoffice / sort-mirrors
Created November 29, 2020 15:06 — forked from helixw/sort-mirrors
Script sorts pacman mirrors for Arch Linux/Arch based distros as per ping received.
#!/bin/sh
# Description: Script sorts pacman mirrors for Arch Linux as per ping received.
# Author: HelixW <shreyas.2000@hotmail.com>
# Check for sudo
if ! [ $(id -u) = 0 ]; then
echo "$(tput setaf 1)Root priviledge required; use sudo."
exit 1
fi
@gntlmnoffice
gntlmnoffice / commands
Created November 29, 2020 12:18
Arch linux installation [LVM on LUKS][EFI][GRUB][USB boot loader]
### INSTALLATION ###
# sda = main drive (root, home, swap)
# sdc = usb drive (boot)
1. Create partitions:
# fdisk /dev/sda
((d -> )n -> [Enter] -> [Enter] -> +600G -> w)
# fdisk /dev/sdc
(make it gpt + EFI system type)
@gntlmnoffice
gntlmnoffice / system-bootstrap.sh
Created November 29, 2020 12:17
Arch system bootstrap script
#!/bin/bash
echo "Updating packages (official repository)..."
pacman -Suy --noconfirm
echo "Installing make packages..."
pacman -S --noconfirm \
git \
binutils \
make \
@gntlmnoffice
gntlmnoffice / Arch_Linux_Root_On_ZFS.md
Created November 29, 2020 12:16 — forked from p7cq/Arch_Linux_Root_On_ZFS.md
Install Arch Linux with Root on ZFS

Arch Linux Root on ZFS

Installation steps for running Arch Linux with root on ZFS using UEFI and systemd-boot. All steps are run as root.

In live environment

  • Set a bigger font if needed:
setfont latarcyrheb-sun32
#!/bin/sh
##############################################################################
# ARCH LINUX INSTALL SCRIPT:
# btrfs, lvm, luks, hibernate, trim
#
# PARTITION LAYOUT:
# /dev/<disk>1 = grub boot partition
# /dev/<disk>2 = luks encrypted root
#
# ROOT LAYOUT:
@gntlmnoffice
gntlmnoffice / install.sh
Created November 29, 2020 12:13 — forked from artizirk/install.sh
arch linux install scripts
#!/usr/bash
HOSTNAME="juust"
SERVER="http:/10.42.0.1"
echo "Stupid Arch cluster installer"
umount -R /mnt
echo "Partition disk"