From 737edff7884819ce79cd1fd375aac214e6a3d2cc Mon Sep 17 00:00:00 2001 From: fithwum Date: Thu, 3 Jul 2025 12:29:40 -0700 Subject: [PATCH] updates --- base-image-script/debian-bookworm_pt1.sh | 59 ++++++++++++++++++++ base-image-script/debian-bookworm_pt2.sh | 20 +++++++ base-image-script/debian-bookworm_pt3.sh | 33 +++++++++++ base-image-script/debian-bullseye_pt1.sh | 59 ++++++++++++++++++++ base-image-script/debian-bullseye_pt2.sh | 19 +++++++ base-image-script/debian-bullseye_pt3.sh | 33 +++++++++++ base-image-script/debian-buster_pt1.sh | 59 ++++++++++++++++++++ base-image-script/debian-buster_pt2.sh | 19 +++++++ base-image-script/debian-buster_pt3.sh | 33 +++++++++++ base-image-script/debian-docker-build_pt1.sh | 59 ++++++++++++++++++++ base-image-script/debian-docker-build_pt2.sh | 20 +++++++ base-image-script/debian-docker-build_pt3.sh | 33 +++++++++++ 12 files changed, 446 insertions(+) create mode 100644 base-image-script/debian-bookworm_pt1.sh create mode 100644 base-image-script/debian-bookworm_pt2.sh create mode 100644 base-image-script/debian-bookworm_pt3.sh create mode 100644 base-image-script/debian-bullseye_pt1.sh create mode 100644 base-image-script/debian-bullseye_pt2.sh create mode 100644 base-image-script/debian-bullseye_pt3.sh create mode 100644 base-image-script/debian-buster_pt1.sh create mode 100644 base-image-script/debian-buster_pt2.sh create mode 100644 base-image-script/debian-buster_pt3.sh create mode 100644 base-image-script/debian-docker-build_pt1.sh create mode 100644 base-image-script/debian-docker-build_pt2.sh create mode 100644 base-image-script/debian-docker-build_pt3.sh diff --git a/base-image-script/debian-bookworm_pt1.sh b/base-image-script/debian-bookworm_pt1.sh new file mode 100644 index 0000000..92bcd8d --- /dev/null +++ b/base-image-script/debian-bookworm_pt1.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +RELEASE=stable + +echo " " +echo "INFO ! Downloading other parts of the script if needed." +if [ -e /debian-bookworm_pt2.sh ] + then + echo "INFO ! debian-bookworm_pt2.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-bookworm_pt2.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-bookworm_pt2.sh -O /debian-bookworm_pt2.sh + chmod +x debian-bookworm_pt2.sh +fi +if [ -e /debian-bookworm_pt3.sh ] + then + echo "INFO ! debian-bookworm_pt3.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-bookworm_pt3.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-bookworm_pt3.sh -O /debian-bookworm_pt3.sh + chmod +x debian-bookworm_pt3.sh +fi +sleep 1 +echo " " +echo "INFO ! Getting system updates." +apt-get -y update +apt-get -y upgrade +apt-get -y dist-upgrade +apt autoremove -y +echo " " +echo "INFO ! Installing debootstrap,ftp-upload,bash,dirmngr,curl." +sleep 1 +apt-get install -y debootstrap ftp-upload bash dirmngr curl +sleep 1 +echo " " +echo "INFO ! Downloading debian & selected packages." +debootstrap --force-check-gpg --variant=minbase --components=main,contrib,non-free --include=dirmngr,apt-transport-https,bash,software-properties-common,ca-certificates,wget,curl,nano --arch=amd64 bookworm /debian-bookworm http://deb.debian.org/debian/ +echo " " +echo "INFO ! Filesystem size uncompressed." +sleep 1 +du --human-readable --summarize debian-bookworm +sleep 5 +echo " " +echo "INFO ! Mounting folders for root." +mount --bind /dev debian-bookworm/dev +mount --bind /dev/pts debian-bookworm/dev/pts +mount --bind /proc debian-bookworm/proc +mount --bind /sys debian-bookworm/sys +sleep 1 +cp -v debian-bookworm_pt2.sh /debian-bookworm +echo " " +echo "INFO ! Changeing to new root." +sleep 1 +chroot debian-bookworm +exit diff --git a/base-image-script/debian-bookworm_pt2.sh b/base-image-script/debian-bookworm_pt2.sh new file mode 100644 index 0000000..a608c3c --- /dev/null +++ b/base-image-script/debian-bookworm_pt2.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "APT::Get::Assume-Yes \"true\";" | tee /etc/apt/apt.conf.d/10-assume_yes +sleep 1 +echo " " +echo "INFO ! Removeing unnecessary packages." +apt-get remove --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode +sleep 1 +echo " " +echo "INFO ! Cleanup." +apt-get clean +spt --fix-broken install +find /var/lib/apt/lists/ -maxdepth 2 -type f -delete +sleep 1 +echo " " +echo "INFO ! Type "exit" and reboot for final steps." +exit diff --git a/base-image-script/debian-bookworm_pt3.sh b/base-image-script/debian-bookworm_pt3.sh new file mode 100644 index 0000000..bcdbf16 --- /dev/null +++ b/base-image-script/debian-bookworm_pt3.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "INFO ! Cleaning up pt2 of script from base image." +rm -frv /debian-bookworm/debian-bookworm_pt2.sh +sleep 1 +echo " " +echo "INFO ! Base image size after cleanup." +du --human-readable --summarize debian-bookworm +sleep 5 +echo " " +echo "INFO ! Creating base image archive." +echo "INFO ! This may take some time." +tar -cjf debian-bookworm.tar.bz2 --directory debian-bookworm . +sleep 1 +echo " " +echo "INFO ! Base image archive." +du --human-readable --summarize debian-bookworm.tar.bz2 +sleep 5 +echo " " +echo "INFO ! Uploading image to ftp server." +ftp-upload -v -h {IP}:{PORT} -u {USER} --password {PASSWORD} -d /mnt/user/FTP debian-bookworm.tar.bz2 +sleep 1 +echo " " +echo "INFO ! Removing temp files." +rm -fr debian-bookworm +rm -frv debian-bookworm.tar.bz2 +echo " " +echo "INFO ! Done." +echo " " +exit diff --git a/base-image-script/debian-bullseye_pt1.sh b/base-image-script/debian-bullseye_pt1.sh new file mode 100644 index 0000000..5d1159b --- /dev/null +++ b/base-image-script/debian-bullseye_pt1.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +RELEASE=stable + +echo " " +echo "INFO ! Downloading other parts of the script if needed." +if [ -e /debian-bullseye_pt2.sh ] + then + echo "INFO ! debian-bullseye_pt2.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-bullseye_pt2.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-bullseye_pt2.sh -O /debian-bullseye_pt2.sh + chmod +x debian-bullseye_pt2.sh +fi +if [ -e /debian-bullseye_pt3.sh ] + then + echo "INFO ! debian-bullseye_pt3.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-bullseye_pt3.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-bullseye_pt3.sh -O /debian-bullseye_pt3.sh + chmod +x debian-bullseye_pt3.sh +fi +sleep 1 +echo " " +echo "INFO ! Getting system updates." +apt-get -y update +apt-get -y upgrade +apt-get -y dist-upgrade +apt autoremove -y +echo " " +echo "INFO ! Installing debootstrap,ftp-upload,bash,dirmngr,curl." +sleep 1 +apt-get install -y debootstrap ftp-upload bash dirmngr curl +sleep 1 +echo " " +echo "INFO ! Downloading debian & selected packages." +debootstrap --keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-stable.gpg --force-check-gpg --variant=minbase --components=main,contrib,non-free --include=dirmngr,apt-transport-https,bash,software-properties-common,ca-certificates,wget,curl,nano --arch=amd64 bullseye /debian-bullseye http://deb.debian.org/debian/ +echo " " +echo "INFO ! Filesystem size uncompressed." +sleep 1 +du --human-readable --summarize debian-bullseye +sleep 5 +echo " " +echo "INFO ! Mounting folders for root." +mount --bind /dev debian-bullseye/dev +mount --bind /dev/pts debian-bullseye/dev/pts +mount --bind /proc debian-bullseye/proc +mount --bind /sys debian-bullseye/sys +sleep 1 +cp -v debian-bullseye_pt2.sh /debian-bullseye +echo " " +echo "INFO ! Changeing to new root." +sleep 1 +chroot debian-bullseye +exit diff --git a/base-image-script/debian-bullseye_pt2.sh b/base-image-script/debian-bullseye_pt2.sh new file mode 100644 index 0000000..70f72c2 --- /dev/null +++ b/base-image-script/debian-bullseye_pt2.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "APT::Get::Assume-Yes \"true\";" | tee /etc/apt/apt.conf.d/10-assume_yes +sleep 1 +echo " " +echo "INFO ! Removeing unnecessary packages." +apt-get remove --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode +sleep 1 +echo " " +echo "INFO ! Cleanup." +apt-get clean +find /var/lib/apt/lists/ -maxdepth 2 -type f -delete +sleep 1 +echo " " +echo "INFO ! Type "exit" and reboot for final steps." +exit diff --git a/base-image-script/debian-bullseye_pt3.sh b/base-image-script/debian-bullseye_pt3.sh new file mode 100644 index 0000000..1176315 --- /dev/null +++ b/base-image-script/debian-bullseye_pt3.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "INFO ! Cleaning up pt2 of script from base image." +rm -frv /debian-bullseye/debian-bullseye_pt2.sh +sleep 1 +echo " " +echo "INFO ! Base image size after cleanup." +du --human-readable --summarize debian-bullseye +sleep 5 +echo " " +echo "INFO ! Creating base image archive." +echo "INFO ! This may take some time." +tar -cjf debian-bullseye.tar.bz2 --directory debian-bullseye . +sleep 1 +echo " " +echo "INFO ! Base image archive." +du --human-readable --summarize debian-bullseye.tar.bz2 +sleep 5 +echo " " +echo "INFO ! Uploading image to ftp server." +ftp-upload -v -h {IP}:{PORT} -u {USER} --password {PASSWORD} -d /mnt/user/FTP debian-bullseye.tar.bz2 +sleep 1 +echo " " +echo "INFO ! Removing temp files." +rm -fr debian-bullseye +rm -frv debian-bullseye.tar.bz2 +echo " " +echo "INFO ! Done." +echo " " +exit diff --git a/base-image-script/debian-buster_pt1.sh b/base-image-script/debian-buster_pt1.sh new file mode 100644 index 0000000..248ae40 --- /dev/null +++ b/base-image-script/debian-buster_pt1.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +RELEASE=stable + +echo " " +echo "INFO ! Downloading other parts of the script if needed." +if [ -e /debian-buster_pt2.sh ] + then + echo "INFO ! debian-buster_pt2.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-buster_pt2.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-buster_pt2.sh -O /debian-buster_pt2.sh + chmod +x debian-buster_pt2.sh +fi +if [ -e /debian-buster_pt3.sh ] + then + echo "INFO ! debian-buster_pt3.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-buster_pt3.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-buster_pt3.sh -O /debian-buster_pt3.sh + chmod +x debian-buster_pt3.sh +fi +sleep 1 +echo " " +echo "INFO ! Getting system updates." +apt-get -y update +apt-get -y upgrade +apt-get -y dist-upgrade +apt autoremove -y +echo " " +echo "INFO ! Installing debootstrap,ftp-upload,bash,dirmngr,curl." +sleep 1 +apt-get install -y debootstrap ftp-upload bash dirmngr curl +sleep 1 +echo " " +echo "INFO ! Downloading debian & selected packages." +debootstrap --keyring /etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg --force-check-gpg --variant=minbase --components=main,contrib,non-free --include=dirmngr,apt-transport-https,bash,software-properties-common,ca-certificates,wget,curl,nano --arch=amd64 buster /debian-buster http://deb.debian.org/debian/ +echo " " +echo "INFO ! Filesystem size uncompressed." +sleep 1 +du --human-readable --summarize debian-buster +sleep 5 +echo " " +echo "INFO ! Mounting folders for root." +mount --bind /dev debian-buster/dev +mount --bind /dev/pts debian-buster/dev/pts +mount --bind /proc debian-buster/proc +mount --bind /sys debian-buster/sys +sleep 1 +cp -v debian-buster_pt2.sh /debian-buster +echo " " +echo "INFO ! Changeing to new root." +sleep 1 +chroot debian-buster +exit diff --git a/base-image-script/debian-buster_pt2.sh b/base-image-script/debian-buster_pt2.sh new file mode 100644 index 0000000..70f72c2 --- /dev/null +++ b/base-image-script/debian-buster_pt2.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "APT::Get::Assume-Yes \"true\";" | tee /etc/apt/apt.conf.d/10-assume_yes +sleep 1 +echo " " +echo "INFO ! Removeing unnecessary packages." +apt-get remove --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode +sleep 1 +echo " " +echo "INFO ! Cleanup." +apt-get clean +find /var/lib/apt/lists/ -maxdepth 2 -type f -delete +sleep 1 +echo " " +echo "INFO ! Type "exit" and reboot for final steps." +exit diff --git a/base-image-script/debian-buster_pt3.sh b/base-image-script/debian-buster_pt3.sh new file mode 100644 index 0000000..ec006c2 --- /dev/null +++ b/base-image-script/debian-buster_pt3.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "INFO ! Cleaning up pt2 of script from base image." +rm -frv /debian-buster/debian-buster_pt2.sh +sleep 1 +echo " " +echo "INFO ! Base image size after cleanup." +du --human-readable --summarize debian-buster +sleep 5 +echo " " +echo "INFO ! Creating base image archive." +echo "INFO ! This may take some time." +tar -cjf debian-buster.tar.bz2 --directory debian-buster . +sleep 1 +echo " " +echo "INFO ! Base image archive." +du --human-readable --summarize debian-buster.tar.bz2 +sleep 5 +echo " " +echo "INFO ! Uploading image to ftp server." +ftp-upload -v -h {IP}:{PORT} -u {USER} --password {PASSWORD} -d /mnt/user/FTP debian-buster.tar.bz2 +sleep 1 +echo " " +echo "INFO ! Removing temp files." +rm -fr debian-buster +rm -frv debian-buster.tar.bz2 +echo " " +echo "INFO ! Done." +echo " " +exit diff --git a/base-image-script/debian-docker-build_pt1.sh b/base-image-script/debian-docker-build_pt1.sh new file mode 100644 index 0000000..964e801 --- /dev/null +++ b/base-image-script/debian-docker-build_pt1.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +RELEASE=stable + +echo " " +echo "INFO ! Downloading other parts of the script if needed." +if [ -e /debian-docker-build_pt2.sh ] + then + echo "INFO ! debian-docker-build_pt2.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-docker-build_pt2.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-docker-build_pt2.sh -O /debian-docker-build_pt2.sh + chmod +x debian-docker-build_pt2.sh +fi +if [ -e /debian-docker-build_pt3.sh ] + then + echo "INFO ! debian-docker-build_pt3.sh found ... will not download." + else + echo " " + echo "WARNING ! debian-docker-build_pt3.sh not found ... will download new copy." + wget --no-cache https://raw.githubusercontent.com/fithwum/base-image/refs/heads/main/build-script/debian-docker-build_pt3.sh -O /debian-docker-build_pt3.sh + chmod +x debian-docker-build_pt3.sh +fi +sleep 1 +echo " " +echo "INFO ! Getting system updates." +apt-get -y update +apt-get -y upgrade +apt-get -y dist-upgrade +apt autoremove -y +echo " " +echo "INFO ! Installing debootstrap,ftp-upload,bash,dirmngr,curl." +sleep 1 +apt-get install -y debootstrap ftp-upload bash dirmngr curl +sleep 1 +echo " " +echo "INFO ! Downloading debian & selected packages." +debootstrap --force-check-gpg --variant=minbase --components=main,contrib,non-free --include=dirmngr,apt-transport-https,bash,software-properties-common,ca-certificates,wget,curl,nano,docker --arch=amd64 bookworm /debian-bookworm http://deb.debian.org/debian/ +echo " " +echo "INFO ! Filesystem size uncompressed." +sleep 1 +du --human-readable --summarize debian-bookworm +sleep 5 +echo " " +echo "INFO ! Mounting folders for root." +mount --bind /dev debian-bookworm/dev +mount --bind /dev/pts debian-bookworm/dev/pts +mount --bind /proc debian-bookworm/proc +mount --bind /sys debian-bookworm/sys +sleep 1 +cp -v debian-bookworm_pt2.sh /debian-bookworm +echo " " +echo "INFO ! Changeing to new root." +sleep 1 +chroot debian-bookworm +exit diff --git a/base-image-script/debian-docker-build_pt2.sh b/base-image-script/debian-docker-build_pt2.sh new file mode 100644 index 0000000..a608c3c --- /dev/null +++ b/base-image-script/debian-docker-build_pt2.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "APT::Get::Assume-Yes \"true\";" | tee /etc/apt/apt.conf.d/10-assume_yes +sleep 1 +echo " " +echo "INFO ! Removeing unnecessary packages." +apt-get remove --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode +sleep 1 +echo " " +echo "INFO ! Cleanup." +apt-get clean +spt --fix-broken install +find /var/lib/apt/lists/ -maxdepth 2 -type f -delete +sleep 1 +echo " " +echo "INFO ! Type "exit" and reboot for final steps." +exit diff --git a/base-image-script/debian-docker-build_pt3.sh b/base-image-script/debian-docker-build_pt3.sh new file mode 100644 index 0000000..bcdbf16 --- /dev/null +++ b/base-image-script/debian-docker-build_pt3.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +echo " " +echo "INFO ! Cleaning up pt2 of script from base image." +rm -frv /debian-bookworm/debian-bookworm_pt2.sh +sleep 1 +echo " " +echo "INFO ! Base image size after cleanup." +du --human-readable --summarize debian-bookworm +sleep 5 +echo " " +echo "INFO ! Creating base image archive." +echo "INFO ! This may take some time." +tar -cjf debian-bookworm.tar.bz2 --directory debian-bookworm . +sleep 1 +echo " " +echo "INFO ! Base image archive." +du --human-readable --summarize debian-bookworm.tar.bz2 +sleep 5 +echo " " +echo "INFO ! Uploading image to ftp server." +ftp-upload -v -h {IP}:{PORT} -u {USER} --password {PASSWORD} -d /mnt/user/FTP debian-bookworm.tar.bz2 +sleep 1 +echo " " +echo "INFO ! Removing temp files." +rm -fr debian-bookworm +rm -frv debian-bookworm.tar.bz2 +echo " " +echo "INFO ! Done." +echo " " +exit