aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-08-20 17:20:31 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-08-20 17:20:31 +0200
commit43cbbe91c8ecf2c1baa7f96f74c6660736a953e9 (patch)
treeb8163330939002e3b1533ebaea15c699dc572fba
parent60904edd0eabe2646264dea158dacfd3b3f188da (diff)
configure the system
-rwxr-xr-xarmtixinstall5
-rwxr-xr-xmkarmtix34
2 files changed, 23 insertions, 16 deletions
diff --git a/armtixinstall b/armtixinstall
index 46d23c8..779597f 100755
--- a/armtixinstall
+++ b/armtixinstall
@@ -100,7 +100,6 @@ 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;32mDon't forget to change the root password and hostname."
-echo -e "\e[1m\e[1;32mYou should synchronize the system clock to hardware yourself."
-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;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
index 34fd2ac..41d39ea 100755
--- a/mkarmtix
+++ b/mkarmtix
@@ -10,13 +10,7 @@ function get_cmdline {
TIMEZONE=$(get_cmdline tz)
KEYMAP=$(get_cmdline keytable)
-DRIVE=$1
-PART_PREFIX=$2
-
-if [[ -z "${DRIVE}" ]] | [[ -z "${PART_PREFIX}" ]]; then
- echo -e "\e[1m\e[1;31mUsage: mkarmtix <drive> <partition prefix>\e[0m"
- exit 1
-fi
+rc-service ntpd start
ln -sf "/usr/share/zoneinfo/${TIMEZONE}" /etc/localtime
@@ -34,10 +28,6 @@ pacman -S -needed --noconfirm btrfs-progs
mkinitcpio -p linux-aarch64
-echo -en 'armtix\narmtix' | passwd
-userdel -r armtix
-pacman -Rns --noconfirm sudo
-
# Network
## Hostname
echo armtix > /etc/hostname
@@ -108,10 +98,28 @@ EOT
pacman-key --populate archlinux
pacman -Sy
-pacman -S --needed --noconfirm raspberrypi-bootloader
+hwclock --systohc
+
+pacman -S --needed --noconfirm raspberrypi-bootloader raspberrypi-firmware
rc-update add ntpd default
fstabgen -U / >> /etc/fstab
-exit 0
+#
+# 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 is NOT safe to reboot."
+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;32mRebooting now will cause the device to become inaccessible due to disallowed SSH root login and the lack of network configuration."
+echo -en "\e[0m"