mirror of
https://codeberg.org/Computertruhe/Setup-Skripte.git
synced 2025-06-28 19:36:21 +02:00
more of the changes ml requested. cleanup of old files, restructuring of folder structure to fit master-branch of computertruhe-repo. Add screenshots to Instruction how to create custom windows-iso
This commit is contained in:
parent
a48119ad97
commit
50bc96aff1
8 changed files with 160 additions and 303 deletions
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Add *.png or any other extension you use for screenshots.
|
||||||
|
# One per line in case you need several
|
||||||
|
*.png binary
|
Binary file not shown.
36
Windows/Setup.ps1 → docs/Setup.ps1
Executable file → Normal file
36
Windows/Setup.ps1 → docs/Setup.ps1
Executable file → Normal file
|
@ -1,18 +1,18 @@
|
||||||
Write-Host Richte arabisches und persisches Tastatur-Layout ein... -ForegroundColor Yellow
|
Write-Host Richte arabisches und persisches Tastatur-Layout ein... -ForegroundColor Yellow
|
||||||
|
|
||||||
$LanguageList = Get-WinUserLanguageList
|
$LanguageList = Get-WinUserLanguageList
|
||||||
|
|
||||||
#Adds arabisch-Egypt, Persisch to layouts:
|
#Adds arabisch-Egypt, Persisch to layouts:
|
||||||
$LanguageList.Add("ar-EG")
|
$LanguageList.Add("ar-EG")
|
||||||
$LanguageList.Add("fa-IR")
|
$LanguageList.Add("fa-IR")
|
||||||
|
|
||||||
#sets the entries we added above.
|
#sets the entries we added above.
|
||||||
Set-WinUserLanguageList $LanguageList
|
Set-WinUserLanguageList $LanguageList
|
||||||
|
|
||||||
Write-Host Installiere chocolatey und weitere Software für das System -ForegroundColor Yellow
|
Write-Host Installiere chocolatey und weitere Software für das System -ForegroundColor Yellow
|
||||||
|
|
||||||
#Install Chocolatey
|
#Install Chocolatey
|
||||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||||
|
|
||||||
#Install Software with choclatey
|
#Install Software with choclatey
|
||||||
choco install vlc 7zip gimp libreoffice-fresh keepass inkscape firefox thunderbird foxitreader --yes
|
choco install vlc 7zip gimp libreoffice-fresh keepass inkscape firefox thunderbird foxitreader --yes
|
|
@ -6,10 +6,10 @@ benötigte Software:
|
||||||
+ Windows 10 ISO in neuester Version
|
+ Windows 10 ISO in neuester Version
|
||||||
+ Rufus: [https://rufus.ie/](https://rufus.ie/)
|
+ Rufus: [https://rufus.ie/](https://rufus.ie/)
|
||||||
+ ImgBurn: [http://www.imgburn.com/](http://www.imgburn.com/)
|
+ ImgBurn: [http://www.imgburn.com/](http://www.imgburn.com/)
|
||||||
+ autounatttended.xml
|
+ autounatttended.xml [hier aus dem repo runterladen](../docs/autounatttended.xml)
|
||||||
+ Powershell-Script für die Installation
|
+ Powershell-Script für die Installation [hier aus dem repo runterladen](../docs/Setup.ps1)
|
||||||
+ USB-Stick mind. 8GB
|
+ USB-Stick mind. 8GB
|
||||||
+ Einen Rechner mit Windows
|
+ Einen Rechner auf dem Windows installiert ist
|
||||||
|
|
||||||
Nachdem alle notwendige Software installiert ist können wir beginnen.
|
Nachdem alle notwendige Software installiert ist können wir beginnen.
|
||||||
|
|
||||||
|
@ -17,20 +17,32 @@ 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. 
|
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. 
|
||||||
|
|
||||||
Die Windows-ISO wird damit als neues Laufwerk gemountet und in einem Fenster geöffnet. (In meinem Fall ist der Laufwerkbuchstabe H:) (Screenshot 3)
|
Die Windows-ISO wird damit als neues Laufwerk gemountet und in einem Fenster geöffnet. (In meinem Fall ist der Laufwerkbuchstabe H:) 
|
||||||
|
|
||||||
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)
|
2. Kopiere den gesamten Inhalt der Windows-ISO. Mit Strg+A kann der gesamte Inhalt markiert werden. Dann Rechtsklick → Kopieren auswählen
|
||||||
|
|
||||||
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
|

|
||||||
|
|
||||||
|
3. Füge das kopierte an der vorher gewählten Stelle wieder ein. In meinem Fall ist der Ordner "Win 10"
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
b) Kopiere die vorher runtergeladene autounattended.xml in das Stammverzeichnis der entpackten ISO, sodass es aussieht wie hier:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
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:
|
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)
|
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:
|
||||||
|
|
||||||
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.
|

|
||||||
|
|
||||||
|
2. Prüfe nochmals dass du in einer Administrator-Powershell bist. Wenn alles korrekt ist, sollte „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:
|
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:\
|
cd C:\
|
||||||
|
@ -43,7 +55,9 @@ c) Als nächstes muss noch das Powershell-Script an die passende der ISO kopiere
|
||||||
|
|
||||||
dism /Get-WimInfo /WimFile:C:\Users\Stefan\Desktop\test\Win10\sources\install.wim
|
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)
|
Dies zeigt alle in der ISO vorhandenen Installationsmöglichkeiten, wie hier zu sehen:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
|
@ -51,7 +65,9 @@ Dies zeigt alle in der ISO vorhandenen Installationsmöglichkeiten (Siehe Screen
|
||||||
|
|
||||||
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.
|
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.)
|
7. Kopiere nun die am Anfang runtergeladene Setup.ps1 (Powershell-Script) in das Verzeichnis C:\iso sodass es aussieht wie hier (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:
|
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:
|
||||||
|
|
||||||
|
@ -61,10 +77,55 @@ wenn der Vorgang abgeschlossen ist befindet sich unter C:\iso die Systemfestplat
|
||||||
|
|
||||||
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.
|
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
|
Dazu startest du einfach das Programm ImgBurn und folgst den Screenshots:
|
||||||
|
|
||||||
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)
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
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 der Anleitung:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
BIOS:
|
||||||
|

|
||||||
|
UEFI:
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
Sobald Rufus die ISO auf den Stick geschrieben hat kann der USB-Stick für die Installation von Windows 10 verwendet werden.
|
Sobald Rufus die ISO auf den Stick geschrieben hat kann der USB-Stick für die Installation von Windows 10 verwendet werden.
|
128
Windows/autounattend.xml → docs/autounattend.xml
Executable file → Normal file
128
Windows/autounattend.xml → docs/autounattend.xml
Executable file → Normal file
|
@ -1,64 +1,64 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||||
<settings pass="windowsPE">
|
<settings pass="windowsPE">
|
||||||
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<SetupUILanguage>
|
<SetupUILanguage>
|
||||||
<UILanguage>de-DE</UILanguage>
|
<UILanguage>de-DE</UILanguage>
|
||||||
</SetupUILanguage>
|
</SetupUILanguage>
|
||||||
<InputLocale>de-DE</InputLocale>
|
<InputLocale>de-DE</InputLocale>
|
||||||
<SystemLocale>de-DE</SystemLocale>
|
<SystemLocale>de-DE</SystemLocale>
|
||||||
<UILanguage>de-DE</UILanguage>
|
<UILanguage>de-DE</UILanguage>
|
||||||
<UserLocale>de-DE</UserLocale>
|
<UserLocale>de-DE</UserLocale>
|
||||||
<UILanguageFallback></UILanguageFallback>
|
<UILanguageFallback></UILanguageFallback>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<UserData>
|
<UserData>
|
||||||
<AcceptEula>true</AcceptEula>
|
<AcceptEula>true</AcceptEula>
|
||||||
<Organization>computertruhe</Organization>
|
<Organization>computertruhe</Organization>
|
||||||
<ProductKey>
|
<ProductKey>
|
||||||
<Key></Key>
|
<Key></Key>
|
||||||
<WillShowUI>Always</WillShowUI>
|
<WillShowUI>Always</WillShowUI>
|
||||||
</ProductKey>
|
</ProductKey>
|
||||||
</UserData>
|
</UserData>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
<settings pass="oobeSystem">
|
<settings pass="oobeSystem">
|
||||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<InputLocale>de-DE</InputLocale>
|
<InputLocale>de-DE</InputLocale>
|
||||||
<SystemLocale>de-DE</SystemLocale>
|
<SystemLocale>de-DE</SystemLocale>
|
||||||
<UILanguage>de-DE</UILanguage>
|
<UILanguage>de-DE</UILanguage>
|
||||||
<UILanguageFallback></UILanguageFallback>
|
<UILanguageFallback></UILanguageFallback>
|
||||||
<UserLocale>de-DE</UserLocale>
|
<UserLocale>de-DE</UserLocale>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<OOBE>
|
<OOBE>
|
||||||
<HideEULAPage>true</HideEULAPage>
|
<HideEULAPage>true</HideEULAPage>
|
||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<ProtectYourPC>3</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
</OOBE>
|
</OOBE>
|
||||||
<UserAccounts>
|
<UserAccounts>
|
||||||
<LocalAccounts>
|
<LocalAccounts>
|
||||||
<LocalAccount wcm:action="add">
|
<LocalAccount wcm:action="add">
|
||||||
<Description>ein Test</Description>
|
<Description>ein Test</Description>
|
||||||
<DisplayName>User</DisplayName>
|
<DisplayName>User</DisplayName>
|
||||||
<Group>Administrators</Group>
|
<Group>Administrators</Group>
|
||||||
<Name>User</Name>
|
<Name>User</Name>
|
||||||
</LocalAccount>
|
</LocalAccount>
|
||||||
</LocalAccounts>
|
</LocalAccounts>
|
||||||
</UserAccounts>
|
</UserAccounts>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<CommandLine>powershell -ExecutionPolicy Unrestricted -F C:\Setup.ps1</CommandLine>
|
<CommandLine>powershell -ExecutionPolicy Unrestricted -F C:\Setup.ps1</CommandLine>
|
||||||
<Description>adds keyboard layouts</Description>
|
<Description>adds keyboard layouts</Description>
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<RequiresUserInput>false</RequiresUserInput>
|
<RequiresUserInput>false</RequiresUserInput>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
<cpi:offlineImage cpi:source="wim:c:/users/stefan/desktop/test/win10/sources/install.wim#Windows 10 Home" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
<cpi:offlineImage cpi:source="wim:c:/users/stefan/desktop/test/win10/sources/install.wim#Windows 10 Home" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
||||||
</unattend>
|
</unattend>
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
207
linux_mint.sh
207
linux_mint.sh
|
@ -1,207 +0,0 @@
|
||||||
#!/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."
|
|
Loading…
Add table
Add a link
Reference in a new issue