Compare commits
13 Commits
Author | SHA1 | Date |
---|---|---|
Mac | ed5e36ee01 | |
Mac | 75a9bc1efd | |
B3rtl | 1fc3684997 | |
Valentin Bachem | c4cd6b0fd8 | |
B3rtl | c63f56a982 | |
smu | 8f6d1ec3f4 | |
Mac | 99ce4abade | |
Mac | dd5a01bca3 | |
Mac | 7749e65d55 | |
Mac | 4e02be504e | |
Robert | cfc21d4a7f | |
Robert | 05df5c9d50 | |
Robert | 9be090a044 |
|
@ -1,5 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -z "$(command -v growpart)" || -z "$(command -v btrfs)" ]]; then
|
||||
echo "growpart oder btrfs fehlt! Installiere cloud-guest-utils und btrfs-progs..."
|
||||
sudo apt update
|
||||
sudo apt install -y cloud-guest-utils btrfs-progs
|
||||
fi
|
||||
|
||||
if [ -z "$(command -v dialog)" ]; then
|
||||
echo "dialog fehlt! Installiere dialog..."
|
||||
sudo apt update
|
||||
|
@ -61,6 +67,12 @@ echo "Warte 2 Sekunden vor dem löschen, abbrechen mit strg + c..."
|
|||
sleep 2
|
||||
echo "Achtung - vorbei, ich mache jetzt alles platt auf" "${DEV}"
|
||||
|
||||
NVME_PARTITION_SUFFIX=''
|
||||
if [[ "$DEV" == *"nvme"* ]]; then
|
||||
echo "$DEV is NVME device"
|
||||
NVME_PARTITION_SUFFIX='p'
|
||||
fi
|
||||
|
||||
case "$IMG" in
|
||||
*.bz2)
|
||||
sudo dd if="$IMG" bs=1M status=progress | bzip2 -d > "$DEV"
|
||||
|
@ -71,7 +83,7 @@ case "$IMG" in
|
|||
esac
|
||||
sync
|
||||
sudo growpart $DEV 3
|
||||
sudo mount ${DEV}3 /mnt
|
||||
sudo mount ${DEV}${NVME_PARTITION_SUFFIX}3 /mnt
|
||||
sudo btrfs filesystem resize max /mnt
|
||||
sudo umount /mnt
|
||||
sync
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
if [ -z "$(command -v dialog)" ]; then
|
||||
echo "dialog fehlt! Installiere dialog..."
|
||||
sudo apt update
|
||||
sudo apt install -y dialog
|
||||
sudo apt install -y dialog btrfs-progs
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
IMG="$1"
|
||||
DEV="$2"
|
||||
|
||||
if [[ -z "$(command -v growpart)" || -z "$(command -v btrfs)" ]]; then
|
||||
echo "growpart oder btrfs fehlt! Installiere cloud-guest-utils und btrfs-progs..."
|
||||
sudo apt update
|
||||
sudo apt install -y cloud-guest-utils btrfs-progs
|
||||
fi
|
||||
|
||||
if [ -z "$IMG" ] ; then
|
||||
echo "Image-File angeben!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$DEV" ] ; then
|
||||
echo "HDD dev angeben! z. B. /dev/hdc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Warte 5 Sekunden vor dem löschen, abbrechen mit strg + c..."
|
||||
sleep 5
|
||||
echo "Achtung - vorbei, ich mache jetzt alles platt auf" "${DEV}"
|
||||
|
||||
sudo dd if="$IMG" of=$DEV bs=1M status=progress
|
||||
sync
|
||||
sudo growpart $DEV 3
|
||||
sudo mount ${DEV}3 /mnt
|
||||
sudo btrfs filesystem resize max /mnt
|
||||
sudo umount /mnt
|
||||
sync
|
|
@ -9,8 +9,8 @@
|
|||
export DEBIAN_FRONTEND=noninteractive
|
||||
DPKG_CFG_FRAGMENT=/etc/dpkg/dpkg.cfg.d/non-interactive
|
||||
|
||||
# Linux distro
|
||||
script_distro='Linux Mint 21.1'
|
||||
# Name of the distribution
|
||||
script_distro='Linux Mint 21.3'
|
||||
|
||||
# Additional packages
|
||||
packages=(
|
||||
|
@ -35,10 +35,12 @@ packages=(
|
|||
mythes-ar
|
||||
thunderbird-locale-ar
|
||||
# DE
|
||||
language-pack-gnome-de-base # Installed only with Internet connection during the OEM setup.
|
||||
firefox-locale-de
|
||||
hunspell-de-at
|
||||
hunspell-de-ch
|
||||
hunspell-de-de
|
||||
thunderbird-locale-de # Installed only with Internet connection during the OEM setup.
|
||||
# EN
|
||||
thunderbird-locale-en-gb
|
||||
# FA
|
||||
|
@ -68,11 +70,10 @@ packages=(
|
|||
|
||||
# $*: message to echo.
|
||||
e() {
|
||||
printf "\e[31m>>>\e[0m %s\n" "$*"
|
||||
printf "\e[32m>>>\e[0m %s\n" "$*"
|
||||
}
|
||||
|
||||
# It's a pain to stop execution (CTRL+C, kill) with all the Python applications
|
||||
# so we catch SIGINT and SIGTERM and exit immediately.
|
||||
# It's a pain to stop execution (CTRL+C, kill) with all the Python applications so we catch SIGINT and SIGTERM and exit immediately.
|
||||
handle_signal() {
|
||||
e "Ausführung abgebrochen! Skript wird beendet."
|
||||
exit 1
|
||||
|
@ -105,7 +106,7 @@ echo "\
|
|||
###
|
||||
# Maintainer: Computertruhe e. V.
|
||||
# Website: https://computertruhe.de/
|
||||
# Version: 2.3.0
|
||||
# Version: 2.3.2
|
||||
# Repo: https://codeberg.org/Computertruhe/Setup-Skripte
|
||||
# Distro: ${script_distro}
|
||||
###
|
||||
|
@ -113,7 +114,7 @@ echo "\
|
|||
e "Starte initiales Setup für Rechner mit frisch installiertem '${script_distro}' …"
|
||||
|
||||
# Use APT proxy if available.
|
||||
ping -c 1 apt-proxy
|
||||
ping -c 1 apt-proxy > /dev/null 2>&1
|
||||
if [ "$?" -eq "0" ]; then
|
||||
e "Nutze APT-Proxy."
|
||||
echo 'Acquire::https::Proxy "http://apt-proxy:3142";' > /etc/apt/apt.conf.d/01aptproxy
|
||||
|
@ -146,7 +147,7 @@ e "Proprietäre Treiber installieren (sofern verfügbar) …"
|
|||
ubuntu-drivers autoinstall
|
||||
|
||||
e "Multimedia-Codecs installieren …"
|
||||
pkg mint-meta-codecs
|
||||
pkg mint-meta-codecs # Installed only with Internet connection during the OEM setup.
|
||||
|
||||
e "Zusätzliche Software installieren …"
|
||||
pkg "${packages[@]}"
|
||||
|
|
Loading…
Reference in New Issue