aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-08-21 13:04:59 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-08-21 13:04:59 +0200
commit8d2e60c85a9befe3b079cf71ffafcd7ca3f76a1e (patch)
tree4dec706cff2da0a56fa2c5f92d6a3fb84fc5e0c1
parent43b685e5d249cd9db7d33331123b5ab7237a2c2a (diff)
ditch armtix in favor of alpine
-rwxr-xr-xarmtixinstall107
-rwxr-xr-xmkarmtix121
2 files changed, 0 insertions, 228 deletions
diff --git a/armtixinstall b/armtixinstall
deleted file mode 100755
index eb61293..0000000
--- a/armtixinstall
+++ /dev/null
@@ -1,107 +0,0 @@
-#! /bin/bash
-
-set -e
-
-if [ "${UID}" != "0" ]; then
- echo "armtixinstall: requires root permissions"
- exit 1
-fi
-
-pacman -Sy
-pacman -S --needed --noconfirm parted fzf artools-base
-
-#
-# Config questions
-#
-
-DRIVE=$1
-IMG=$2
-BOOTLOADER=$3
-FIRMWARE=$4
-
-if [ -z "${DRIVE}" ]; then
- DRIVE="/dev/$(lsblk | grep disk | fzf --disabled | awk '{print $1}')"
-fi
-
-if [[ "${DRIVE}" == "/dev/mmcblk"* ]] | [[ "${DRIVE}" == "/dev/nvme"* ]]; then
- PART_PREFIX="${DRIVE}p"
-else
- PART_PREFIX="${DRIVE}"
-fi
-
-if [ -z "${IMG}" ]; then
- IMG=$(echo "Enter image path (download from armtixlinux.org, OpenRC): " | fzf --disabled --print-query | sed -n '1 p')
-fi
-
-# Needed because otherwise there is no system to operate on.
-if [ -z "${IMG}" ]; then
- echo -e "\e[1m\e[1;31mImage path must not be empty.\e[0m"
- exit 1
-fi
-
-if [ -z "${BOOTLOADER}" ]; then
- BOOTLOADER=$(echo "Enter bootloader path (download from archlinuxarm.org): " | fzf --disabled --print-query | sed -n '1 p')
-fi
-
-# Needed because otherwise the Raspberry Pi won't boot.
-if [ -z "${BOOTLOADER}" ]; then
- echo -e "\e[1m\e[1;31mBootloader path must not be empty.\e[0m"
- exit 1
-fi
-
-if [ -z "${FIRMWARE}" ]; then
- FIRMWARE=$(echo "Enter firmware path (download from archlinuxarm.org): " | fzf --disabled --print-query | sed -n '1 p')
-fi
-
-# Needed because otherwise the Raspberry Pi won't boot.
-if [ -z "${FIRMWARE}" ]; then
- echo -e "\e[1m\e[1;31mFirmware path must not be empty.\e[0m"
- exit 1
-fi
-
-parted -s ${DRIVE} mklabel msdos
-parted -s -a optimal ${DRIVE} mkpart primary fat32 0% 512MiB
-parted -s -a optimal ${DRIVE} mkpart primary btrfs 512MiB 100%
-
-mkfs.fat -F 32 ${PART_PREFIX}1
-mkfs.btrfs -f ${PART_PREFIX}2
-
-fatlabel ${PART_PREFIX}1 BOOT
-
-mkdir /btrfs
-mount -o compress=zstd ${PART_PREFIX}2 /btrfs
-btrfs subvolume create /btrfs/root
-umount /btrfs
-
-mount -o compress=zstd,subvol=/root ${PART_PREFIX}2 /mnt
-mkdir /mnt/boot
-mount ${PART_PREFIX}1 /mnt/boot
-
-(cd /mnt && tar -xJf ${IMG})
-(cd /mnt && tar -xJf ${BOOTLOADER} && rm -f .BUILDINFO .MTREE .PKGINFO)
-(cd /mnt && tar -xJf ${FIRMWARE} && rm -f .BUILDINFO .MTREE .PKGINFO)
-
-UUID=$(blkid -s UUID -o value ${PART_PREFIX}2)
-
-cat <<EOT > /mnt/boot/config.txt
-enable_uart=1
-arm_64bit=1
-kernel=/Image
-initramfs /initramfs-linux.img followkernel
-device-tree=/dtbs/broadcom/bcm2711-rpi-4-b.dtb
-EOT
-
-echo "console=ttyS1,115200 earlyprintk=serial,ttyS1,115200 kgdboc=ttyS1,115200 root=UUID=${UUID} ro rootflags=subvol=root rootwait smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0" > /mnt/boot/cmdline.txt
-
-fstabgen -U /mnt >> /mnt/etc/fstab
-
-umount -R /mnt
-sync
-
-rm -d /btrfs
-
-echo -e "\n\e[1m\e[1;32mArmtix has been successfully installed! It is now safe to remove the drive."
-echo -e "\e[1m\e[1;32mYou will have to complete the installation using mkarmtix."
-echo -e "\e[1m\e[1;32mTo do this, connect via SSH as user 'armtix' (password is 'armtix')."
-echo -e "\e[1m\e[1;32mThe machine will connect to the network on eth0."
-echo -en "\e[0m"
diff --git a/mkarmtix b/mkarmtix
deleted file mode 100755
index b719245..0000000
--- a/mkarmtix
+++ /dev/null
@@ -1,121 +0,0 @@
-#! /bin/bash
-
-set -e
-
-#
-# Config questions
-#
-
-TIMEZONE=$1
-KEYMAP=$2
-
-if [ -z "${TIMEZONE}" ]; then
- TIMEZONE=$(find /usr/share/zoneinfo | fzf)
-fi
-
-if [ -z "${KEYMAP}" ]; then
- KEYMAP=$(echo "Enter keymap (e.g. us, de): " | fzf --disabled --print-query | sed -n '1 p')
-fi
-
-pacman -Syu --noconfirm
-
-rc-service ntpd start
-
-ln -sf "/usr/share/zoneinfo/${TIMEZONE}" /etc/localtime
-
-sed -i "s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" /etc/locale.gen
-locale-gen
-
-cat <<EOT > /etc/locale.conf
-export LANG="en_US.UTF-8"
-export LC_COLLATE="C"
-EOT
-
-sed -i "s/keymap=\"us\"/keymap=\"${KEYMAP}\"/" /etc/conf.d/keymaps
-
-pacman -Sy --needed --noconfirm btrfs-progs
-
-# Network
-## Hostname
-echo armtix > /etc/hostname
-
-cat <<EOT > /etc/hosts
-# Static table lookup for hostnames.
-# See hosts(5) for details.
-
-127.0.0.1 localhost
-127.0.1.1 armtix.local armtix
-
-# IPv6
-::1 localhost ip6-localhost ip6-loopback
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
-EOT
-
-sed -i 's/hostname="localhost"/hostname="armtix"/' /etc/conf.d/hostname
-
-## Networking essentials
-pacman -Sy --needed --noconfirm dhcpcd wpa_supplicant
-
-# Repositories
-## Arch
-pacman -Sy --needed --noconfirm artix-archlinux-support
-
-cat <<EOT >> /etc/pacman.conf
-
-#
-# Custom
-#
-
-# Arch
-
-#[testing]
-#Include = /etc/pacman.d/mirrorlist-archlinuxarm
-
-[extra]
-Include = /etc/pacman.d/mirrorlist-archlinuxarm
-
-#[community-testing]
-#Include = /etc/pacman.d/mirrorlist-archlinuxarm
-
-[community]
-Include = /etc/pacman.d/mirrorlist-archlinuxarm
-
-#[multilib-testing]
-#Include = /etc/pacman.d/mirrorlist-archlinuxarm
-
-#[multilib]
-#Include = /etc/pacman.d/mirrorlist-archlinuxarm
-
-[alarm]
-Include = /etc/pacman.d/mirrorlist-archlinuxarm
-EOT
-
-pacman-key --init
-pacman-key --populate archlinuxarm
-pacman -Sy
-
-hwclock --systohc
-
-pacman -Sy --needed --noconfirm --dbonly raspberrypi-bootloader raspberrypi-firmware
-
-rc-update add ntpd default
-
-#
-# Configuration
-#
-
-echo -en 'armtix\narmtix' | passwd
-userdel -r armtix
-
-pacman -Rns --noconfirm sudo
-
-rc-update del dhcpcd default
-pacman -R --noconfirm dhcpcd-openrc
-
-echo -e "\n\e[1m\e[1;32mArmtix has been successfully configured! It MAY NOT be safe to reboot or close this shell session."
-echo -e "\e[1m\e[1;32mDon't forget to change the root password and hostname, and to add a regular user for SSH."
-echo -e "\e[1m\e[1;32mSetting up networking is left to you, dhcpcd and wpa_supplicant are installed."
-echo -e "\e[1m\e[1;32mYou may want to uninstall the SSH server depending on your use case."
-echo -e "\e[1m\e[1;32mRebooting or disconnecting now will cause SSH to become inaccessible due to disallowed root login and the lack of network configuration."
-echo -en "\e[0m"