mirror of https://github.com/tteck/Proxmox.git
Compare commits
5 Commits
82743f68da
...
8047265b2b
Author | SHA1 | Date |
---|---|---|
|
8047265b2b | |
|
c295a9a6f9 | |
|
0efa38825e | |
|
44398fbfc2 | |
|
c72475b1f7 |
|
@ -2,6 +2,14 @@
|
|||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 2023-05-08
|
||||
|
||||
### Changed
|
||||
|
||||
- **Proxmox VE Intel Processor Microcode**
|
||||
- Renamed to **Proxmox VE Processor Microcode**
|
||||
- Automatically identifies the processor vendor (Intel/AMD) and installs the appropriate microcode.
|
||||
|
||||
## 2023-05-07
|
||||
|
||||
### Changed
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 128 KiB |
|
@ -6,7 +6,7 @@
|
|||
|
||||
clear
|
||||
while true; do
|
||||
read -p "Install the latest Intel Processor Microcode (y/n)?" yn
|
||||
read -p "Install the latest Processor Microcode (y/n)?" yn
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
[Nn]*) exit ;;
|
||||
|
@ -15,11 +15,11 @@ while true; do
|
|||
done
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ __ __ __ ____ __
|
||||
/ _/___ / /____ / / / |/ (_)_____________ _________ ____/ /__
|
||||
/ // __ \/ __/ _ \/ / / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \
|
||||
_/ // / / / /_/ __/ / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/
|
||||
/___/_/ /_/\__/\___/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/
|
||||
____ __ ____ __
|
||||
/ __ \_________ ________ ______________ _____ / |/ (_)_____________ _________ ____/ /__
|
||||
/ /_/ / ___/ __ \/ ___/ _ \/ ___/ ___/ __ \/ ___/ / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \
|
||||
/ ____/ / / /_/ / /__/ __(__ |__ ) /_/ / / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/
|
||||
/_/ /_/ \____/\___/\___/____/____/\____/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/
|
||||
|
||||
EOF
|
||||
|
||||
|
@ -36,13 +36,13 @@ set -euo pipefail
|
|||
shopt -s inherit_errexit nullglob
|
||||
|
||||
msg_info() {
|
||||
local msg="$1"
|
||||
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||
local msg="$1"
|
||||
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||
}
|
||||
|
||||
msg_ok() {
|
||||
local msg="$1"
|
||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||
local msg="$1"
|
||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||
}
|
||||
|
||||
msg_error() {
|
||||
|
@ -50,30 +50,62 @@ msg_error() {
|
|||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
||||
}
|
||||
|
||||
intel() {
|
||||
msg_info "Installing iucode-tool: a tool for updating Intel processor microcode"
|
||||
apt-get install -y iucode-tool &>/dev/null
|
||||
msg_ok "Installed iucode-tool"
|
||||
|
||||
msg_info "Downloading the latest Intel Processor Microcode Package for Linux"
|
||||
wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb
|
||||
msg_ok "Downloaded the latest Intel Processor Microcode Package"
|
||||
|
||||
msg_info "Installing the Intel Processor Microcode (Patience)"
|
||||
dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null
|
||||
msg_ok "Installed the Intel Processor Microcode"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm intel-microcode_3.20230214.1_amd64.deb
|
||||
msg_ok "Cleaned"
|
||||
|
||||
echo -e "\n To apply the changes, the system will need to be rebooted.\n"
|
||||
}
|
||||
|
||||
amd() {
|
||||
msg_info "Installing amd-ucode: a tool for updating AMD processor microcode"
|
||||
apt-get install -y amd64-microcode &>/dev/null
|
||||
msg_ok "Installed amd-ucode"
|
||||
|
||||
msg_info "Downloading the latest AMD Processor Microcode Package for Linux"
|
||||
wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230414.1_amd64.deb
|
||||
msg_ok "Downloaded the latest AMD Processor Microcode Package"
|
||||
|
||||
msg_info "Installing the AMD Processor Microcode (Patience)"
|
||||
dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null
|
||||
msg_ok "Installed the AMD Processor Microcode"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm amd64-microcode_3.20230414.1_amd64.deb
|
||||
msg_ok "Cleaned"
|
||||
|
||||
echo -e "\n To apply the changes, the system will need to be rebooted.\n"
|
||||
}
|
||||
|
||||
if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
|
||||
echo -e "${CROSS} Proxmox Virtual Environment Not Detected"
|
||||
echo -e "Exiting..."
|
||||
sleep 2
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Checking CPU Vendor"
|
||||
cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+')
|
||||
if [ "$cpu" == "GenuineIntel" ]; then
|
||||
msg_ok "${cpu} was detected"
|
||||
intel
|
||||
elif [ "$cpu" == "AuthenticAMD" ]; then
|
||||
msg_ok "${cpu} was detected"
|
||||
amd
|
||||
else
|
||||
msg_error "${cpu} is not supported"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Installing iucode-tool: a tool for updating Intel processor microcode"
|
||||
apt-get install -y iucode-tool &>/dev/null
|
||||
msg_ok "Installed iucode-tool"
|
||||
|
||||
msg_info "Downloading the latest Intel Processor Microcode Package for Linux"
|
||||
release=$(curl -s https://api.github.com/repos/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/latest | awk -F'"' '/tag_name/{print $4}' | tr -cd '[:digit:]')
|
||||
wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.${release}.1_amd64.deb
|
||||
msg_ok "Downloaded the latest Intel Processor Microcode Package"
|
||||
|
||||
msg_info "Installing the Intel Processor Microcode (Patience)"
|
||||
dpkg -i intel-microcode_3.${release}.1_amd64.deb &>/dev/null
|
||||
msg_ok "Installed the Intel Processor Microcode"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm intel-microcode_3.${release}.1_amd64.deb
|
||||
msg_ok "Cleaned"
|
||||
|
||||
echo -e "\n To apply the settings, the system will need to be rebooted.\n"
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2021-2023 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
|
||||
clear
|
||||
while true; do
|
||||
read -p "Install the latest Processor Microcode (y/n)?" yn
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
[Nn]*) exit ;;
|
||||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
done
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ __ ____ __
|
||||
/ __ \_________ ________ ______________ _____ / |/ (_)_____________ _________ ____/ /__
|
||||
/ /_/ / ___/ __ \/ ___/ _ \/ ___/ ___/ __ \/ ___/ / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \
|
||||
/ ____/ / / /_/ / /__/ __(__ |__ ) /_/ / / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/
|
||||
/_/ /_/ \____/\___/\___/____/____/\____/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/
|
||||
|
||||
EOF
|
||||
|
||||
RD=$(echo "\033[01;31m")
|
||||
YW=$(echo "\033[33m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
CROSS="${RD}✗${CL}"
|
||||
|
||||
set -euo pipefail
|
||||
shopt -s inherit_errexit nullglob
|
||||
|
||||
msg_info() {
|
||||
local msg="$1"
|
||||
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||
}
|
||||
|
||||
msg_ok() {
|
||||
local msg="$1"
|
||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||
}
|
||||
|
||||
msg_error() {
|
||||
local msg="$1"
|
||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
||||
}
|
||||
|
||||
intel() {
|
||||
msg_info "Installing iucode-tool: a tool for updating Intel processor microcode"
|
||||
apt-get install -y iucode-tool &>/dev/null
|
||||
msg_ok "Installed iucode-tool"
|
||||
|
||||
msg_info "Downloading the latest Intel Processor Microcode Package for Linux"
|
||||
wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb
|
||||
msg_ok "Downloaded the latest Intel Processor Microcode Package"
|
||||
|
||||
msg_info "Installing the Intel Processor Microcode (Patience)"
|
||||
dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null
|
||||
msg_ok "Installed the Intel Processor Microcode"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm intel-microcode_3.20230214.1_amd64.deb
|
||||
msg_ok "Cleaned"
|
||||
|
||||
echo -e "\n To apply the changes, the system will need to be rebooted.\n"
|
||||
}
|
||||
|
||||
amd() {
|
||||
msg_info "Installing amd-ucode: a tool for updating AMD processor microcode"
|
||||
apt-get install -y amd-ucode &>/dev/null
|
||||
msg_ok "Installed amd-ucode"
|
||||
|
||||
msg_info "Downloading the latest AMD Processor Microcode Package for Linux"
|
||||
wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230414.1_amd64.deb
|
||||
msg_ok "Downloaded the latest AMD Processor Microcode Package"
|
||||
|
||||
msg_info "Installing the AMD Processor Microcode (Patience)"
|
||||
dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null
|
||||
msg_ok "Installed the AMD Processor Microcode"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm amd64-microcode_3.20230414.1_amd64.deb
|
||||
msg_ok "Cleaned"
|
||||
|
||||
echo -e "\n To apply the changes, the system will need to be rebooted.\n"
|
||||
}
|
||||
|
||||
if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
|
||||
echo -e "${CROSS} Proxmox Virtual Environment Not Detected"
|
||||
echo -e "Exiting..."
|
||||
sleep 2
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Checking CPU Vendor"
|
||||
cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+')
|
||||
if [ "$cpu" == "GenuineIntel" ]; then
|
||||
msg_ok "${cpu} was detected"
|
||||
intel
|
||||
elif [ "$cpu" == "AuthenticAMD" ]; then
|
||||
msg_ok "${cpu} was detected"
|
||||
amd
|
||||
else
|
||||
msg_error "${cpu} is not supported"
|
||||
exit
|
||||
fi
|
Loading…
Reference in New Issue