This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Reference guides: | |
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF | |
# https://pve.proxmox.com/wiki/Pci_passthrough | |
# https://pve.proxmox.com/wiki/Nested_Virtualization | |
# Remember to turn on SVM in BIOS and disable CSM | |
# Update packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb | |
apt install -y lsb-release | |
dpkg -i mysql-apt-config_0.8.10-1_all.deb | |
rm mysql-apt-config_0.8.10-1_all.deb | |
apt update | |
apt upgrade -y | |
apt install -y mysql-server mysql-client | |
mysql_secure_installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su -c "fallocate -l 2G /swapfile; chmod 600 /swapfile; mkswap /swapfile; swapon /swapfile; echo '/swapfile none swap defaults 0 0' >> /etc/fstab; reboot" | |
su -c "pacman-key --init; pacman-key --populate archlinuxarm; pacman -Syu --noconfirm base-devel python git cpio unzip rsync wget bc"; git clone git://git.buildroot.net/buildroot; cd buildroot; make raspberrypi3_64_defconfig; make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. Prepare Environment | |
apt update; apt upgrade -y | |
apt install unzip default-jre -y | |
wget https://netcologne.dl.sourceforge.net/project/symmetricds/symmetricds/symmetricds-3.9/symmetric-server-3.9.14.zip | |
cd /opt/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ./mnt | |
mount /dev/pve/root ./mnt | |
cd mnt | |
mount -t proc proc proc/ | |
mount -t sysfs sys sys/ | |
mount -o bind /dev dev/ | |
cd .. | |
chroot ./mnt ./bin/bash | |
pmxcfs | |
/bin/nano /etc/pve/nodes/{node name}/qemu-server/100.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo systemctl enable --now sshd | |
sudo timedatectl set-ntp true | |
echo "HandleLidSwitch=ignore" | sudo tee -a /etc/systemd/logind.conf > /dev/null | |
sudo sed -i 's/DisplayCommand/#DisplayCommand/g' /etc/sddm.conf | |
sudo sed -i 's/DisplayStopCommand/#DisplayStopCommand/g' /etc/sddm.conf | |
yay -Syu optimus-manager | |
sudo systemctl disable bumblebeed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependency for yay | |
su << EOF | |
root | |
pacman-key --init | |
pacman-key --populate archlinuxarm | |
pacman -Syu base-devel git go --noconfirm --needed | |
echo "alarm ALL=(ALL) ALL" >> /etc/sudoers | |
EOF | |
# Install yay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please refer to https://github.com/archlinuxarm/PKGBUILDs/pull/1768 for details | |
# We will set up a SD card install with an EXT4 boot partition and a Btrfs root partition | |
# Upgrade system and install Btrfs user land utilities | |
sudo pacman -Syu btrfs-progs --needed --noconfirm | |
# Prepare necessary files | |
mkdir root | |
wget http://os.archlinuxarm.org/os/ArchLinuxARM-espressobin-latest.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Scenario | |
# You have control of one computer <remote_address> behind NAT and its public internet facing router <sshd_address>. | |
# You want to access them from another computer <local_address> that is behind another uncontrolled NAT, | |
# and also from <remote_address> to this <local_address>. | |
# Run following command in <local_address>. | |
# Enable sock5 proxy and allow remote access of local RDP | |
ssh -R 0.0.0.0:2222:127.0.0.1:3389 -D 8765 -N <sshd_address> | |
# Access remote SSH and another computer's RDP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following script was tested for fresh install only, without any VM | |
# Assuming Proxmox is installed in /dev/sda with LVM-ext4 partition and UEFI boot, and the target disk is /dev/sdb | |
# Prepare | |
sed -i "s/deb/#deb/" /etc/apt/sources.list.d/pve-enterprise.list | |
apt update | |
apt full-upgrade -y | |
# WARNING! Check your target disk device name! | |
lsblk |
OlderNewer