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
# You will need a real Debian machine to perform cross debootstrap | |
# Debian on WSL does not work | |
# Enter root mode | |
sudo -i | |
# Define variables | |
TARGET=/dev/mmcblk0 | |
MOUNT_POINT=/mnt | |
IP_ADDRESS=192.168.0.2 |
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
# You will need a real Debian machine to perform cross debootstrap | |
# Debian on WSL does not work | |
# Enter root mode | |
sudo -i | |
# Define variables | |
TARGET=/dev/mmcblk0 | |
MOUNT_POINT=/mnt | |
IP_ADDRESS=192.168.0.2 |
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
# You will need a real Debian machine to perform cross debootstrap | |
# Debian on WSL does not work | |
# Enter root mode | |
sudo -i | |
# Define variables | |
TARGET=/dev/mmcblk0 | |
MOUNT_POINT=/mnt | |
IP_ADDRESS=192.168.0.2 |
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
# You will need a real Debian machine to perform cross debootstrap | |
# Debian on WSL does not work | |
# Enter root mode | |
sudo -i | |
# Install dependency | |
apt update && apt install -y btrfs-progs dosfstools qemu-user-static debootstrap | |
# Set up partition table and file systems |
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
# Reference guides: | |
# https://pve.proxmox.com/wiki/PCI(e)_Passthrough | |
# https://elijahliedtke.medium.com/home-lab-guides-proxmox-6-pci-e-passthrough-with-nvidia-43ccfb9424de | |
# https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Buster | |
# Based on fresh Debian Buster install | |
# Remember to turn on SVM in BIOS and disable CSM | |
# Disable closing lid event |
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
# TODO: Add ESP disk replacement | |
# Assuming the disk in problem is /dev/sdb, and we are running off /dev/sda in degraded mode. | |
# However, if both /dev/sda and /dev/sdb have been booted in degraded mode, | |
# then the next time when you boot with both disk present, initramfs will not be able to mount root in rw mode. | |
# In that case, you may have PERMANENT DATA LOSS if you are not careful, and MAKE BACKUPS of your current disks before any recovery. | |
# I HAVE NOT tried to recovery from such situation, as my plan is always recovery from existing backups. | |
# However, I'm more likely to recreate the system from scratch, as my data are stored in RAID and with multiple backups, | |
# so I only need to recreate my VM environment according to the script I'm writting on Gist. I love fresh system anyway. |
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 follow https://gist.github.com/MakiseKurisu/3a44918bccf3383c0b5ccf362f429c8b first to set up rootfs | |
# Assuming rootfs on /dev/sdb2, and adding /dev/sda to the RAID-1 configuration | |
# Remove existing Proxmox installation and LVM Thin storage | |
pvesm remove local-lvm | |
vgremove pve -y | |
# Set up partition table | |
(echo g; echo n; echo ''; echo ''; echo '+512M'; echo t; echo 1; echo n; echo ''; echo ''; echo ''; echo w) | fdisk /dev/sda |
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 |
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
# 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 |
NewerOlder