Move finalization section from notes to docs

This commit is contained in:
KemoNine 2020-07-31 23:37:43 +00:00
parent 0248c7aec7
commit a01c944489
3 changed files with 50 additions and 121 deletions

View File

@ -3,3 +3,4 @@
This folder contains a bunch of general information on how to get the base of a PiFrame deployed.
* [Base Firmware](base.md)
* [Finalize Arch Setup](finalize_setup.md)

49
docs/finalize_setup.md Normal file
View File

@ -0,0 +1,49 @@
# Arch Linux Finalization
By default Arch Linux has very little software installed and even less configuration complete.
The following commands will finalize the fundamental Arch Linux setup and perform some mild tuning.
``` sh
# login as root with password root
# Initialize pacman
pacman-key --init
pacman-key --populate archlinuxarm
# Update system to latest software
pacman -Syy
pacman -Su
systemctl reboot
# Remove arch linux on arm default user
userdel alarm
# Set root password
passwd
# Turn on colorized pacman output
sed -i 's/#Color/Color/' /etc/pacman.conf # Add color to pacman
# Install fundamental tools
pacman -S openssh tmux nano vim htop iotop nload python python-pip wget curl git bash-completion p7zip exfat-utils man-db man-pages btrfs-progs sudo
# Tweak sshd to allow root login
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
systemctl enable --now sshd
systemctl restart sshd
# Finalize localiztation settings
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
timedatectl set-local-rtc 0
timedatectl set-ntp true
echo LANG=en_US.UTF-8 > /etc/locale.conf
sed -i "s/#en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen
locale-gen
# Finalize basic network config
nano -w /etc/hostname
nano -w /etc/hosts
```

121
notes.txt
View File

@ -1,124 +1,3 @@
########################################
# IMPORTANT CONSIDERATIONS
########################################
This setup does NOT use SSL for anything. Use acme.sh + vhosts + nginx if you really wanna walk that path
########################################
# Setup environment
########################################
https://ubuntu.com/download/raspberry-pi/thank-you?version=20.04&architecture=arm64+raspi
boot ubuntu server 64bit
ubuntu / ubuntu
update to latest of everything
apt update && apt install parted wget curl nano tmux vim htop iotop nload
ip addr
ssh into rpi
########################################
# Inspiration
########################################
https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4#installation
https://github.com/phortx/Raspberry-Pi-Setup-Guide
########################################
# Prep / install arch linux on micro sd card
########################################
parted /dev/sda
mklabel msdos
mkpart
p
[enter]
1
100M
mkpart
p
[enter]
100M
-1
set 1 boot on
set 1 lba on
q
mkfs.vat /dev/sda1
mkfs.btrfs /dev/sda2
mkdir /mnt/arch
mount -o nodiratime,noatime,compress /dev/sda2 /mnt/arch
mkdir /mnt/arch/boot
mount /dev/sda1 /mnt/arch/boot
cd /mnt/arch
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz
tar -xpf ArchLinuxARM-rpi-4-latest.tar.gz
rm ArchLinuxARM-rpi-4-latest.tar.gz
cat > /mnt/arch/boot/config.txt <<EOF
# KmN: Borrowed some stuff from majaro
# See /boot/overlays/README for all available options
gpu_mem=512
dtoverlay=miniuart-bt
initramfs initramfs-linux.img followkernel
disable_overscan=1
#enable vc4
dtoverlay=vc4-fkms-v3d
max_framebuffers=1
EOF
nano -w /mnt/arch/boot/cmdline.txt
root=mmcblk0p2 rootflags=nodiratime,noatime,compress rw rootwait
remove kgdboc=ttyAMA0,115200
parted /dev/sda
set 1 boot on
set 1 lba on
set 2 lba on
systemctl poweroff
########################################
# Arch setup finalization
########################################
swap micro sd cards
boot into arch
login as root with password root
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syy
pacman -Su
systemctl reboot
userdel alarm
passwd
sed -i 's/#Color/Color/' /etc/pacman.conf # Add color to pacman
pacman -S openssh tmux nano vim htop iotop nload python python-pip wget curl git bash-completion p7zip exfat-utils man-db man-pages btrfs-progs sudo
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
systemctl enable --now sshd
systemctl restart sshd
ip addr
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
timedatectl set-local-rtc 0
timedatectl set-ntp true
echo LANG=en_US.UTF-8 > /etc/locale.conf
sed -i "s/#en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen
locale-gen
nano -w /etc/hostname
nano -w /etc/hosts
########################################
# Swap
########################################