From 091ab01445d271aef4d0f0722f4e0abcc5a0ceaa Mon Sep 17 00:00:00 2001 From: bicubico Date: Mon, 20 Feb 2023 15:57:43 -0300 Subject: [PATCH] stretch to buster --- CHIP-updater/buster_source_list.txt | 6 ++++ CHIP-updater/jessie-to-stretch.sh | 25 ++++++--------- CHIP-updater/stretch_to_buster.sh | 47 +++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 15 deletions(-) create mode 100644 CHIP-updater/buster_source_list.txt create mode 100644 CHIP-updater/stretch_to_buster.sh diff --git a/CHIP-updater/buster_source_list.txt b/CHIP-updater/buster_source_list.txt new file mode 100644 index 0000000..0d3792d --- /dev/null +++ b/CHIP-updater/buster_source_list.txt @@ -0,0 +1,6 @@ +deb http://deb.debian.org/debian/ buster main contrib non-free +#deb-src http://deb.debian.org/debian/ buster main contrib non-free +#deb http://security.debian.org/ buster/updates main contrib non-free +#deb-src http://security.debian.org/ buster/updates main contrib non-free +#deb http://deb.debian.org/debian buster-backports main contrib non-free +#deb-src http://deb.debian.org/debian buster-backports main contrib non-free \ No newline at end of file diff --git a/CHIP-updater/jessie-to-stretch.sh b/CHIP-updater/jessie-to-stretch.sh index 7a25a20..499e01b 100644 --- a/CHIP-updater/jessie-to-stretch.sh +++ b/CHIP-updater/jessie-to-stretch.sh @@ -4,14 +4,8 @@ echo "." echo "*** Updating and upgrading Debian Jessie. ***" mv /etc/apt/sources.list /etc/apt/sources.list.bak -touch /etc/apt/sources.list -chmod 666 /etc/apt/sources.list -echo -e "deb [check-valid-until=no] http://archive.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list -echo -e "deb-src [check-valid-until=no] http://archive.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list -echo -e "deb [check-valid-until=no] http://archive.debian.org/ jessie/updates main contrib non-free" >> /etc/apt/sources.list -echo -e "deb-src [check-valid-until=no] http://archive.debian.org/ jessie/updates main contrib non-free" >> /etc/apt/sources.list -echo -e "deb http://chip.jfpossibilities.com/chip/debian/repo jessie main" >> /etc/apt/sources.list -echo -e "deb http://chip.jfpossibilities.com/chip/debian/pocketchip jessie main" >> /etc/apt/sources.list +wget https://raw.githubusercontent.com/asophila/Flash-CHIP/master/CHIP-updater/jessie_source_list.txt +mv jessie_source_list.txt /etc/apt/sources.list echo "." echo "*** Installing debian keyring. ***" @@ -28,19 +22,15 @@ sleep 5 echo "." echo "*** Upgrading Debian Jessie to Debian Stretch ***" sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak2 -sudo touch /etc/apt/sources.list -sudo chmod 666 /etc/apt/sources.list - -echo -e "deb http://ftp.us.debian.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list -echo -e "deb-src http://ftp.us.debian.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list -echo -e "deb http://security.debian.org/ stretch/updates main contrib non-free" >> /etc/apt/sources.list -echo -e "deb-src http://security.debian.org/ stretch/updates main contrib non-free" >> /etc/apt/sources.list +wget https://raw.githubusercontent.com/asophila/Flash-CHIP/master/CHIP-updater/stretch_source_list.txt +mv stretch_source_list.txt /etc/apt/sources.list echo "." echo "*** apt update & upgrade ***" apt-get update && apt-get upgrade -y sleep 5 +# Define network variables sudo chmod 666 /etc/NetworkManager/NetworkManager.conf echo -e "[connection]" >> /etc/NetworkManager/NetworkManager.conf echo -e "wifi.mac-address-randomization=1" >> /etc/NetworkManager/NetworkManager.conf @@ -48,5 +38,10 @@ echo -e "" >> /etc/NetworkManager/NetworkManager.conf echo -e "[device]" >> /etc/NetworkManager/NetworkManager.conf echo -e "wifi.scan-rand-mac-address=no" >> /etc/NetworkManager/NetworkManager.conf +# Define X11 variables for stretch +sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak +wget https://raw.githubusercontent.com/asophila/Flash-CHIP/master/CHIP-updater/stretch_x11.txt +mv stretch_x11.txt /etc/X11/xorg.conf + echo "." echo "*** Update to Stretch finished. Reboot to continue the process. ***" \ No newline at end of file diff --git a/CHIP-updater/stretch_to_buster.sh b/CHIP-updater/stretch_to_buster.sh new file mode 100644 index 0000000..499e01b --- /dev/null +++ b/CHIP-updater/stretch_to_buster.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Upgrade jessie +echo "." +echo "*** Updating and upgrading Debian Jessie. ***" +mv /etc/apt/sources.list /etc/apt/sources.list.bak +wget https://raw.githubusercontent.com/asophila/Flash-CHIP/master/CHIP-updater/jessie_source_list.txt +mv jessie_source_list.txt /etc/apt/sources.list + +echo "." +echo "*** Installing debian keyring. ***" +apt-get update +apt-get install debian-keyring debian-archive-keyring -y --force-yes +sleep 5 + +echo "." +echo "*** apt update & upgrade ***" +apt-get update && apt-get upgrade -y +sleep 5 + +# Upgrade from jessie to stretch +echo "." +echo "*** Upgrading Debian Jessie to Debian Stretch ***" +sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak2 +wget https://raw.githubusercontent.com/asophila/Flash-CHIP/master/CHIP-updater/stretch_source_list.txt +mv stretch_source_list.txt /etc/apt/sources.list + +echo "." +echo "*** apt update & upgrade ***" +apt-get update && apt-get upgrade -y +sleep 5 + +# Define network variables +sudo chmod 666 /etc/NetworkManager/NetworkManager.conf +echo -e "[connection]" >> /etc/NetworkManager/NetworkManager.conf +echo -e "wifi.mac-address-randomization=1" >> /etc/NetworkManager/NetworkManager.conf +echo -e "" >> /etc/NetworkManager/NetworkManager.conf +echo -e "[device]" >> /etc/NetworkManager/NetworkManager.conf +echo -e "wifi.scan-rand-mac-address=no" >> /etc/NetworkManager/NetworkManager.conf + +# Define X11 variables for stretch +sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak +wget https://raw.githubusercontent.com/asophila/Flash-CHIP/master/CHIP-updater/stretch_x11.txt +mv stretch_x11.txt /etc/X11/xorg.conf + +echo "." +echo "*** Update to Stretch finished. Reboot to continue the process. ***" \ No newline at end of file