5
0
Fork 0
mirror of https://codeberg.org/Computertruhe/Setup-Skripte.git synced 2025-06-28 11:26:18 +02:00

Changes as requested by ml. First Commit to see if markdown works as intended for the added images.

This commit is contained in:
Stefan 2020-02-10 17:08:41 +01:00
parent c26a964cbc
commit a48119ad97
35 changed files with 277 additions and 0 deletions

View file

@ -0,0 +1,70 @@
Anleitung zur Vorbereitung einer Windows10-ISO für eine (fast) automatische Installation
benötigte Software:
+ Windows 10 ISO in neuester Version
+ Rufus: [https://rufus.ie/](https://rufus.ie/)
+ ImgBurn: [http://www.imgburn.com/](http://www.imgburn.com/)
+ autounatttended.xml
+ Powershell-Script für die Installation
+ USB-Stick mind. 8GB
+ Einen Rechner mit Windows
Nachdem alle notwendige Software installiert ist können wir beginnen.
a) Entpacke die Windows 10-ISO an einen Ort wo du sie wiederfindest
1. die Windows 10 kann unter Windows sehr einfach als Laufwerk gemountet werden. Entweder indem man einen Doppelklick auf die ISO macht oder einen Rechtsklick auf die ISO macht und dann „Bereitstellen“ auswählt. ![ISO bereitstellen durch rechtsklick](images/02.png "Windows-ISO bereitstellen")
Die Windows-ISO wird damit als neues Laufwerk gemountet und in einem Fenster geöffnet. (In meinem Fall ist der Laufwerkbuchstabe H:) (Screenshot 3)
2. Kopiere den gesamten Inhalt der Windows-ISO. Mit Strg+A kann der gesamte Inhalt markiert werden. Dann Rechtsklick → Kopieren auswählen (Screenshot 4 und 5)
3. Füge das kopierte an der vorher gewählten Stelle wieder ein. In meinem Fall ist der Ordner Win 10 (Screenshot 6)
b) Kopiere die vorher runtergeladene autounattended.xml in das Stammverzeichnis der entpackten ISO, sodass es aussieht wie in Screenshot 7
c) Als nächstes muss noch das Powershell-Script an die passende der ISO kopieren, dies ist allerdings etwas aufwändiger und braucht eine Powershell. Bitte der Anleitung an dieser Stelle Schritt für Schritt folgen und die Pfade mit den korrekten Pfaden ersetzen:
1. Öffne eine Administrator-Powershell. Dazu kann einfach mit derWindows-Suche im Startmenü nach Powershell gesucht werden. Mit einem Rechtsklick kann eine Administrator-Powershell geöffnet werden (Screenshot 8)
2. Prüfe nochmals dass du in einer Administrator-Powershell bist. Wenn alles korrekt ist, sollte wie Screenshot 9 zu sehen „system32“ im Pfad zu sehen sein.
3. Wechsle nun in das Hauptverzeichnis der Systemplatte (in meinem Fall ist dies C:). Dazu kannst du den „cd“-Befehl nutzen. Für meinen Fall lautet das Command also:
cd C:\
4. Erstelle dort ein Verzeichnis. Das wirst du später brauchen. Ich hab meines „iso“ genannt. Um das Verzeichnis zu erstellen lautet der Befehl:
mkdir iso
5. Nutze jetzt das Tool DISM in der Powershell um die install.wim der ausgepackten ISO zu inspizieren. Dazu kommt folgender Befehl zum Einsatz (der Pfad ist entsprechend anzuspassen):
dism /Get-WimInfo /WimFile:C:\Users\Stefan\Desktop\test\Win10\sources\install.wim
Dies zeigt alle in der ISO vorhandenen Installationsmöglichkeiten (Siehe Screenshot 10)
6. Mounte den entsprechenden Index (Nummer der Installationsmöglichkeit aus der Liste zuvor) in in Nr. 4 erstellten Ordner. In meinem Beispiel habe ich Windows 10 Home gewählt, deshalb ist meine Index-Nummer 1. Für Windows 10 Pro müsste Index-Nummer 5 gewählt werden. Gemountet wird die install.wim mit folgendem Befehl:
dism /Mount-Wim /WimFile:C:\Users\Stefan\Desktop\test\Win10\sources\install.wim /index:1 /MountDir:C:\iso
wenn der Vorgang abgeschlossen ist befindet sich unter C:\iso die Systemfestplatte die bei einer neuen Windows-Installation kopiert wird. Dies bedeutet wenn wir dort eine Datei hineintun und die install.wim wieder schließen. Bei einer neuen Installation mit dem modifizierten ISO ist die Datei dann in der neuen Installation auch an der gleichen Stelle zu finden.
7. Kopiere nun die am Anfang runtergeladene Setup.ps1 (Powershell-Script) in das Verzeichnis C:\iso sodass es aussieht wie in Screenshot 11. (Für das Kopieren ist eine Bestätigung als Administrator erforderlich.)
8. Sobald dies erledigt ist musst du nur noch die Änderungen „commiten“ und die install.wim unmounten. Stelle vorher sicher dass kein Fenster des Windows-Explorer mehr geöffnet ist! Dies erledigt dieser Befehl:
dism /Unmount-Image /MountDir:C:\iso /Commit
9. (optinal) Die Schritte 5 8 müssen nun noch für alle anderen Indexe wiederholt werden, die das Script ebenfalls enthalten sollen. Statt Index 1 für Windows 10 Home kann dann bsw. Index-Nummer 5 für Windows 10 Pro verwendet werden. Wenn alle gewünschten Indexe modifiziert sind kann mit der Anleitung fortgefahren werden.
d) Im nächsten Schritt erstellen wir aus unserem Ordner mit der entpackten ISO wieder eine Windows 10-ISO die auf einen USB-Stick kopiert werden kann und für eine Installation verwendet werden kann.
Dazu startest du einfach das Programm ImgBurn und folgst den Screenshots 12- 28
e) im letzten Schritt kann die ISO dann mithilfe des Programms Rufus auf einen USB-Stick kopiert werden. Starte dazu das Programm Rufus und folge den Screenshots 29 32
Bei der Erstellung des Sticks darauf achten ob das Zielsystem BIOS oder UEFI nutzt und die Einstellungen entsprechend anpassen (siehe Screenshot 31-UEFI oder 31-BIOS)
Sobald Rufus die ISO auf den Stick geschrieben hat kann der USB-Stick für die Installation von Windows 10 verwendet werden.

BIN
docs/images/01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
docs/images/02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
docs/images/03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
docs/images/04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
docs/images/05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
docs/images/06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
docs/images/07.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
docs/images/08.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
docs/images/09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/images/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
docs/images/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
docs/images/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
docs/images/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
docs/images/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/images/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
docs/images/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
docs/images/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
docs/images/18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
docs/images/19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
docs/images/20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
docs/images/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/images/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
docs/images/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
docs/images/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
docs/images/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
docs/images/26.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
docs/images/27.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
docs/images/28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
docs/images/29.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
docs/images/30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
docs/images/31-BIOS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
docs/images/31-UEFI.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
docs/images/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

207
mint/linux_mint.sh Normal file
View file

@ -0,0 +1,207 @@
#!/usr/bin/env bash
###
# Set variables
###
export DEBIAN_FRONTEND=noninteractive
DPKG_CFG_FRAGMENT=/etc/dpkg/dpkg.cfg.d/non-interactive
# Color of prefix (>>>) to distinguish user and root echos
color_prefix=32 # green
# Linux distro
script_distro='Linux Mint 19.x'
# Additional packages
packages=(
# Graphics
cheese
inkscape
# Office
libreoffice
# Security
keepassxc
# Games
0ad
beneath-a-steel-sky
billard-gl
blobby
blockout2
flight-of-the-amazon-queen
freeciv
frozen-bubble
gbrainy
gnome-games
gweled
hedgewars
lincity-ng
lure-of-the-temptress
openttd
pingus
pipewalker
pokerth
supertux
supertuxkart
teeworlds
wesnoth
widelands
# Gaming platforms
playonlinux
steam
wine-stable
winetricks
# System management
gparted
# Tools
hardinfo
shutter
vim
# Management
calibre
# Media
vlc
# Knowledge
goldendict
ubuntu-edu-preschool
ubuntu-edu-primary
ubuntu-edu-secondary
ubuntu-edu-tertiary
# Language support
language-selector-common
openoffice.org-hyphenation
language-pack-ar
language-pack-gnome-ar
language-pack-fa
language-pack-gnome-fa
)
###
# Functions
###
is_root() {
[[ $UID -eq 0 ]]
}
# $*: message to echo
e() {
printf "\e[%sm>>>\e[0m %s\n" "$color_prefix" "$*"
}
# It's a pain to stop (ctrl+c, kill) execution with all the Python applications
# so we catch SIGINT and SIGTERM and exit immediately
handle_signal() {
e "Ausführung abgebrochen! Script wird beendet..."
exit 1
}
# always executed on shell exit regardless of reason. for cleanup tasks
handle_exit() {
# Remove temporary dpkg cfg if root
is_root && rm -f "$DPKG_CFG_FRAGMENT"
}
trap handle_signal SIGINT SIGTERM
trap handle_exit EXIT
pkg() {
apt install "$@" --yes --quiet
}
###
# Root setup
###
if is_root; then
color_prefix=31 # red
if [[ $1 != "root-setup" ]]; then
e "Dieses Script sollte nicht direkt als Root ausgeführt werden!" >&2
e "Privilegien werden automatisch eskaliert sobald es notwendig ist." >&2
exit 1
fi
# place temporary dpkg configurations to ensure non-interactive upgrade
cat <<'DPKG' >"$DPKG_CFG_FRAGMENT"
force-confold
force-confdef
DPKG
e "Automatische Installation empfohlener Pakete aktivieren ..."
sed -i 's/false/true/g' /etc/apt/apt.conf.d/00recommends
e "Besten Spiegelserver für '${script_distro}' auswählen ..."
mint-switch-to-local-mirror
e "Paketquellen aktualisieren ..."
apt update --yes --quiet
e "System aktualisieren (apt) ..."
apt full-upgrade --yes --quiet
e "System aktualisieren (mintupdate-cli) ..."
mintupdate-cli --yes upgrade
e "Proprietäre Treiber installieren (sofern verfügbar) ..."
ubuntu-drivers autoinstall
e "Zusätzliche Software installieren ..."
pkg "${packages[@]}"
e "Sprachunterstützung vervollständigen ..."
pkg "$(check-language-support)"
# these packages have to be installed after "$(check-language-support)"
pkg hunspell-de-at hunspell-de-ch hunspell-de-de
e "Unnötige Pakete entfernen und Cache bereinigen ..."
apt clean --yes --quiet
apt autoremove --yes --quiet
e "Root Setup abgeschlossen."
# It's very important to exit here. We don't want root past this point!
exit
fi
###
# Greeting
###
echo "\
#####################################
# Computertruhe-Installationsskript #
#####################################
###
# Maintainer: Computertruhe e. V.
# Website: https://computertruhe.de/
# Version: 0.2.0
# Repo: https://codeberg.org/Computertruhe/computertruhe-setup
# Distro: ${script_distro}
###
"
e "Starte initiales Setup für Rechner mit frisch installiertem '${script_distro}' ..."
###
# Automatic installation
###
e "Script wird als Root ausgeführt für privilegierte Aufgaben"
sudo ./"$0" root-setup
e "Richte arabisches und persisches Tastatur-Layout ein..."
gsettings set org.gnome.libgnomekbd.keyboard layouts "['de', 'ara', 'ir']"
e "Ändere Anzeigeoptionen für die Tastatur auf die richtigen Werte..."
gsettings set org.cinnamon.desktop.interface keyboard-layout-show-flags false
gsettings set org.cinnamon.desktop.interface keyboard-layout-use-upper true
gsettings set org.cinnamon.desktop.interface keyboard-layout-prefer-variant-names true
###
# Finalisation
###
e "Initiales Setup beendet."