1
0
mirror of https://github.com/pimox/pimox7.git synced 2026-07-03 11:11:37 +00:00

update for remote install

This update fixes the installer if executed remotely, "prevent" the ssh conection to be closed, by network changes.
However it produces more output errors in the installation phase, witch are "ok", because they get fixed on reboot.
This commit is contained in:
Joachim Träuble
2021-11-13 21:35:50 +01:00
committed by GitHub
parent 229de94cd8
commit d803b41323

View File

@@ -1,6 +1,6 @@
# !/bin/bash # !/bin/bash
####################################################################### #######################################################################
# Name: RPiOS64-IA-Install.sh Version: 0.1.1 # # Name: RPiOS64-IA-Install.sh Version: 0.1.2 #
# Created: 07.09.2021 Modified: 13.11.2021 # # Created: 07.09.2021 Modified: 13.11.2021 #
# Author: TuxfeatMac J.T. # # Author: TuxfeatMac J.T. #
# Purpose: interactive, automatic, Pimox7 installation RPi4B, RPi3B+ # # Purpose: interactive, automatic, Pimox7 installation RPi4B, RPi3B+ #
@@ -86,13 +86,17 @@ THE PIMOX REPO WILL BE ADDED IN : $YELLOW /etc/apt/sources.list.d/pimox.list $NO
$GRAY# Pimox 7 Development Repo$NORMAL $GRAY# Pimox 7 Development Repo$NORMAL
deb https://raw.githubusercontent.com/pimox/pimox7/master/ dev/ deb https://raw.githubusercontent.com/pimox/pimox7/master/ dev/
========================================================================================= =========================================================================================
THE NETWORK CONFIGURATION IN : $YELLOW /etc/network/interfaces $NORMAL WILL BE $RED OVERWRITTEN $NORMAL !!! WITH : THE NETWORK CONFIGURATION IN : $YELLOW /etc/network/interfaces $NORMAL WILL BE $RED CHANGED $NORMAL !!! TO :
auto lo auto lo
iface lo inet loopback iface lo inet loopback
auto eth0 iface eth0 inet manual
iface eth0 inet static auto vmbr0
address $GREEN$RPI_IP$NORMAL iface vmbr0 inet static
gateway $GREEN$GATEWAY$NORMAL address $GREEN $RPI_IP $NORMAL
gateway $GREEN $GATEWAY $NORMAL
bridge-ports eth0
bridge-stp off
bridge-fd 0
========================================================================================= =========================================================================================
THE HOSTNAMES IN : $YELLOW /etc/hosts $NORMAL WILL BE $RED OVERWRITTEN $NORMAL !!! WITH : THE HOSTNAMES IN : $YELLOW /etc/hosts $NORMAL WILL BE $RED OVERWRITTEN $NORMAL !!! WITH :
127.0.0.1\tlocalhost 127.0.0.1\tlocalhost
@@ -125,16 +129,6 @@ printf "
#### SET NEW HOSTNAME ################################################################################################################### #### SET NEW HOSTNAME ###################################################################################################################
hostnamectl set-hostname $HOSTNAME hostnamectl set-hostname $HOSTNAME
printf "127.0.0.1\tlocalhost
$RPI_IP_ONLY\t$HOSTNAME" > /etc/hosts
#### RECONFIGURE NETWORK ################################################################################################################
printf "auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address $RPI_IP
gateway $GATEWAY\n" > /etc/network/interfaces
#### ADD SOURCE PIMOX7 + KEY & UPDATE & INSTALL RPI-KERNEL-HEADERS ####################################################################### #### ADD SOURCE PIMOX7 + KEY & UPDATE & INSTALL RPI-KERNEL-HEADERS #######################################################################
printf "# PiMox7 Development Repo printf "# PiMox7 Development Repo
@@ -146,9 +140,6 @@ apt update && apt upgrade -y && apt install -y raspberrypi-kernel-headers
apt purge -y dhcpcd5 apt purge -y dhcpcd5
apt autoremove -y apt autoremove -y
#### PREVENT DEFAULT NETCONFIGURATION ####################################################################################################
rm -r /etc/network/interfaces.new
#### FIX CONTAINER STATS NOT SHOWING UP IN WEB GUI ####################################################################################### #### FIX CONTAINER STATS NOT SHOWING UP IN WEB GUI #######################################################################################
if [ "$(cat /boot/cmdline.txt | grep cgroup)" != "" ] if [ "$(cat /boot/cmdline.txt | grep cgroup)" != "" ]
then then
@@ -159,6 +150,24 @@ fi
#### INSTALL PIMOX7 AND REBOOT ########################################################################################################### #### INSTALL PIMOX7 AND REBOOT ###########################################################################################################
DEBIAN_FRONTEND=noninteractive apt install -y -o Dpkg::Options::="--force-confdef" proxmox-ve DEBIAN_FRONTEND=noninteractive apt install -y -o Dpkg::Options::="--force-confdef" proxmox-ve
#### RECONFIGURE NETWORK #### /etc/hosts REMOVE IPv6 #### /etc/network/interfaces.new CONFIGURE NETWORK TO CHANGE ON REBOOT ##############
printf "127.0.0.1\tlocalhost
$RPI_IP_ONLY\t$HOSTNAME\n" > /etc/hosts
printf "auto lo
iface lo inet loopback
iface eth0 inet manual
auto vmbr0
iface vmbr0 inet static
address $RPI_IP
gateway $GATEWAY
bridge-ports eth0
bridge-stp off
bridge-fd 0 \n" > /etc/network/interfaces.new
### FINAL MESSAGE ########################################################################################################################
printf " printf "
========================================================================================= =========================================================================================
! ERRORS ARE NOMALAY FINE -> README.md ! ! ERRORS ARE NOMALAY FINE -> README.md !
@@ -170,7 +179,7 @@ printf "
========================================================================================= =========================================================================================
after rebbot the PVE web interface will be reachable here : after rebbot the PVE web interface will be reachable here :
---> $GREEN https://$RPI_IP:8006/ $NORMAL <--- ---> $GREEN https://$RPI_IP_ONLY:8006/ $NORMAL <---
\n" && sleep 7 && reboot \n" && sleep 7 && reboot
#### EOF #### #### EOF ####