Skip to main content
Hyper 8 Spacefun Videos

Debian Headless Installation: So installierst du Linux ohne Bildschirm und Tastatur!

720p 3.5 MB 720p 3.5 MB

Einsteiger - Preview

Distro WAS? Was ist eine Linux Distribution 31 Dec 2024, 52 sec
Linux herunterladen und Brennen 31 Dec 2024, 52 sec
Meine Lieblings Firefox AddOns 31 Dec 2024, 52 sec
Linux Installieren für Anfänger: In nur 15 Minuten ist Linux drauf 31 Dec 2024, 52 sec
pimp My IceWM - Linux Desktop Design mit Themes und Icons anpassen 31 Dec 2024, 52 sec
Programme installieren unter Linux auf der CLI und mit der Paketverwaltung 31 Dec 2024, 52 sec
Linux Terminal für Einsteiger 31 Dec 2024, 52 sec
Linux updaten - So aktualisierst du sicher deine Linux Distribution 31 Dec 2024, 52 sec
Benutzer und Gruppen verwalten unter Linux 31 Dec 2024, 52 sec
LibreOffice über die Kommandozeile installieren 31 Dec 2024, 52 sec
Linux Password einfach ändern auf der CLI 31 Dec 2024, 52 sec
Logdateien unter Linux anzeigen und Fehler analysieren 31 Dec 2024, 52 sec
Linux Bootsplash anpassen mit Plymouth 31 Dec 2024, 52 sec
Festplattenauslastung unter Linux ermitteln 31 Dec 2024, 52 sec
Desktop Icons mit iDesk für deinen Linux Windowmanager 31 Dec 2024, 52 sec
Linux Firewall einrichten – Schritt für Schritt zum sicheren System 31 Dec 2024, 52 sec
Alle Programme sofort griffbereit: Application Finder einrichten (oder "Wie komme ich aus vi raus?") 31 Dec 2024, 52 sec
Gefahr gebannt! ClamAV Virenabwehr für dein Linux System 31 Dec 2024, 52 sec
Wie man den Memtest86+ RAM-Test unter Linux erfolgreich nutzt 31 Dec 2024, 52 sec
Unterschiedliche Desktop Umgebungen testen 31 Dec 2024, 52 sec
Linux Backup Tutorial - Laufwerk vorbereiten 31 Dec 2024, 52 sec
Linux Backup Tutorial: Back In Time 31 Dec 2024, 52 sec
Dynablaster Revenge - Bomberman Spiel selbst compilieren 31 Dec 2024, 52 sec
Linux Desktopumgebung LXQt vs. LXDE 31 Dec 2024, 52 sec
Desktop Effekte unter LXQt aktivieren 31 Dec 2024, 52 sec
Die besten Podcast-Clients für Linux 31 Dec 2024, 52 sec
Sicherer SSH-Zugriff unter Linux 31 Dec 2024, 52 sec
Firefox direkt von Mozilla.org installieren 31 Dec 2024, 52 sec
Software sauber entfernen unter Linux mit Apt Rollback 31 Dec 2024, 52 sec
Linux Remote Desktop mit X2Go 31 Dec 2024, 52 sec
Ubuntu LTS installieren oder aktualisieren 31 Dec 2024, 52 sec
Windows in Docker 31 Dec 2024, 52 sec
Portmaster - die perfekte Desktop-Firewall 31 Dec 2024, 52 sec
Linux Multiboot – USB-Stick & Netzwerk mit Ventoy und iVentoy 31 Dec 2024, 52 sec
Thunderbird - das sichere E-Mail Programm 31 Dec 2024, 52 sec
Datum und Uhrzeit einstellen unter Linux 31 Dec 2024, 52 sec
Schnellsten Linux Mirror ermitteln 31 Dec 2024, 52 sec
Festplatte partitionieren unter Linux 31 Dec 2024, 52 sec
Replay
Current video (39 of 42) in Einsteiger - Preview Debian Headless Installation: So installierst du Linux ohne Bildschirm und Tastatur! 31 Dec 2024, 52 sec
Befreie deine Hörbücher mit Libation 31 Dec 2024, 52 sec
HTTrack - Der Website Downloader 31 Dec 2024, 52 sec
Mit MakeMKV DVDs und Blu-rays digitalisieren 31 Dec 2024, 52 sec
00:00 / 00:52
Distro WAS? Was ist eine Linux Distribution 31 Dec 2024, 52 sec
Linux herunterladen und Brennen 31 Dec 2024, 52 sec
Meine Lieblings Firefox AddOns 31 Dec 2024, 52 sec
Linux Installieren für Anfänger: In nur 15 Minuten ist Linux drauf 31 Dec 2024, 52 sec
pimp My IceWM - Linux Desktop Design mit Themes und Icons anpassen 31 Dec 2024, 52 sec
Programme installieren unter Linux auf der CLI und mit der Paketverwaltung 31 Dec 2024, 52 sec
Linux Terminal für Einsteiger 31 Dec 2024, 52 sec
Linux updaten - So aktualisierst du sicher deine Linux Distribution 31 Dec 2024, 52 sec
Benutzer und Gruppen verwalten unter Linux 31 Dec 2024, 52 sec
LibreOffice über die Kommandozeile installieren 31 Dec 2024, 52 sec
Linux Password einfach ändern auf der CLI 31 Dec 2024, 52 sec
Logdateien unter Linux anzeigen und Fehler analysieren 31 Dec 2024, 52 sec
Linux Bootsplash anpassen mit Plymouth 31 Dec 2024, 52 sec
Festplattenauslastung unter Linux ermitteln 31 Dec 2024, 52 sec
Desktop Icons mit iDesk für deinen Linux Windowmanager 31 Dec 2024, 52 sec
Linux Firewall einrichten – Schritt für Schritt zum sicheren System 31 Dec 2024, 52 sec
Alle Programme sofort griffbereit: Application Finder einrichten (oder "Wie komme ich aus vi raus?") 31 Dec 2024, 52 sec
Gefahr gebannt! ClamAV Virenabwehr für dein Linux System 31 Dec 2024, 52 sec
Wie man den Memtest86+ RAM-Test unter Linux erfolgreich nutzt 31 Dec 2024, 52 sec
Unterschiedliche Desktop Umgebungen testen 31 Dec 2024, 52 sec
Linux Backup Tutorial - Laufwerk vorbereiten 31 Dec 2024, 52 sec
Linux Backup Tutorial: Back In Time 31 Dec 2024, 52 sec
Dynablaster Revenge - Bomberman Spiel selbst compilieren 31 Dec 2024, 52 sec
Linux Desktopumgebung LXQt vs. LXDE 31 Dec 2024, 52 sec
Desktop Effekte unter LXQt aktivieren 31 Dec 2024, 52 sec
Die besten Podcast-Clients für Linux 31 Dec 2024, 52 sec
Sicherer SSH-Zugriff unter Linux 31 Dec 2024, 52 sec
Firefox direkt von Mozilla.org installieren 31 Dec 2024, 52 sec
Software sauber entfernen unter Linux mit Apt Rollback 31 Dec 2024, 52 sec
Linux Remote Desktop mit X2Go 31 Dec 2024, 52 sec
Ubuntu LTS installieren oder aktualisieren 31 Dec 2024, 52 sec
Windows in Docker 31 Dec 2024, 52 sec
Portmaster - die perfekte Desktop-Firewall 31 Dec 2024, 52 sec
Linux Multiboot – USB-Stick & Netzwerk mit Ventoy und iVentoy 31 Dec 2024, 52 sec
Thunderbird - das sichere E-Mail Programm 31 Dec 2024, 52 sec
Datum und Uhrzeit einstellen unter Linux 31 Dec 2024, 52 sec
Schnellsten Linux Mirror ermitteln 31 Dec 2024, 52 sec
Festplatte partitionieren unter Linux 31 Dec 2024, 52 sec
Current video (39 of 42) in Einsteiger - Preview Debian Headless Installation: So installierst du Linux ohne Bildschirm und Tastatur! 31 Dec 2024, 52 sec
Befreie deine Hörbücher mit Libation 31 Dec 2024, 52 sec
HTTrack - Der Website Downloader 31 Dec 2024, 52 sec
Mit MakeMKV DVDs und Blu-rays digitalisieren 31 Dec 2024, 52 sec
Hallo liebe kopflosen Weltraumritter. Habt  ihr vielleicht schon mal den Spruch gehört,   00:00
dass Debian selbst ein blindes Huhn  installieren kann? Das kommt daher,   00:05
dass das Installationsprogramm so einfach ist,  dass das Huhn im einfachsten Fall immer auf   00:10
Enter picken muss und schon ist die Installation  beendet. Ganz so einfach ist es natürlich nicht,   00:15
denn an einer Stelle müsst ihr jeweils noch das  Partitionslayout bestätigen, aber grundsätzlich   00:21
ist die Installation wirklich für Einsteiger  auch sehr gut geeignet. Doch was passiert, wenn   00:28
ihr jetzt keinen Monitor zur Verfügung habt und  trotzdem euer Debian-System installieren möchtet,   00:33
z.B euren Server bei euch zu Hause für das  Selfhosting, was ich in vielen meiner Videos   00:39
im Detail erkläre? Dazu eignet sich dann eine  sogenannte Headless-Installation des Debian   00:45
Betriebssystems und wie das geht, möchte  ich euch heute gerne hier genauer zeigen.   00:53
Ich nutze dafür ein Script, das von einem  Kollegen entwickelt wird, und zwar ist das der   01:00
Philipp Pagel. Der hat sich die Mühe gemacht, ein  entsprechendes Installationssript, ein Makefile,   01:06
zu erstellen, mit dem das Ganze super einfach  geht. Den Link dazu packe ich euch natürlich in   01:14
die Videobeschreibung. Ihr findet ihn hier aber  auch unter github.com/philpagel/debian-headless   01:20
und dann seid ihr schon dort. Wir möchten als  Erstes den Code herunterladen. Im einfachsten   01:27
Fall lade ich einfach dieses Zip-Archiv  herunter und kann das dann öffnen und hier   01:31
entsprechend entpacken. Dann kann ich  mein Terminal auftun und natürlich in den   01:37
Download-Ordner rein wechseln. Ich gehe jetzt  mit 'cd Downloads/debian-headless-main' in das   01:44
Verzeichnis rein und dort gibt es dann einige  Dateien und wie die genau zu bearbeiten gehen,   01:51
das wird hier in dem README auch genau erklärt.  Wir fangen als allererstes mal mit dem zweiten   01:57
Befehl an, nämlich 'make download', denn das  hilft uns nachher, die Config zu erstellen.   02:06
'make download' lädt das Standard Debian  netinstall Image herunter, das wir entsprechend   02:10
bearbeiten und für eine Headless-Installation  vorbereiten. Ich gebe jetzt hier einfach mal ein   02:17
'make download'. Jetzt wird im Hintergrund die  aktuelle stabile Version des Debian netinstall   02:23
Images bereits heruntergeladen. Nachher benötigen  wir auch noch einige Dependencies. Die können wir   02:32
hier einfach mit 'make install-depends'  nachinstallieren, denn die brauchen wir   02:40
nachher zur Erstellung unserer eigenen ISO. Denn  wir möchten natürlich ein eigenes ISO-Image haben,   02:46
das wir dann nutzen können auf einem USB-Stick,  um unseren Server ohne Monitor installieren zu   02:52
können. z.B. auf dem Raspberry Pi ist das relativ  einfach. Dort habt ihr mit dem Raspberry Pi Imager   02:58
sogar schon die Möglichkeit, eine bedienerlose  Installation vorzubereiten. Im Hintergrund lädt   03:05
er uns also hier diese Version Debian 12.8, das  ist die aktuelle Version für die AMD64-Architektur   03:13
herunter. Falls ihr eine andere Architektur  verwenden möchtet, wie z.B. ARM oder i368   03:23
ist das auch möglich, dann müsstet ihr im Vorfeld  natürlich die Konfigurationsdatei bearbeiten. Ich   03:30
mache jetzt hier mal ein neues Tab auf, über den  Punkt 'Datei / Neue Registrierkarte', wechsle   03:35
dort auch wieder in den Ordner rein und schaue  dann parallel schon mal den nächsten Schritt an,   03:41
den wir hier machen müssen. Also hier könnte ich  jetzt 'make config' machen. Ich mache aber im   03:47
Vorfeld noch das 'make install-depends'. Ich  muss natürlich hier mein Passwort eingeben,   03:52
denn das Ganze erfolgt natürlich mit Root-Rechten  und er installiert mir jetzt im Hintergrund schon   03:59
die Abhängigkeit. Zum Testen nutzt das System  hier QEMU. Falls ihr das Ganze in der VirtualBox   04:04
ausprobieren möchtet, müsst ihr natürlich eben  diese Nested Virtualisierung freischalten. Das   04:11
könnt ihr im Register, in der Registrierkarte  System machen, und dort kann man eben, wenn euer   04:18
System das unterstützt, die Nested Virtualization  aktivieren. Und dann könnt ihr das sogar alles   04:24
wie ich hier in einer VirtualBox testen. Hier  installiert er also jetzt die Abhängigkeiten.   04:28
Hier lädt er das netinstall herunter. Ich mache  jetzt noch eine dritte Registrierkarte auf,   04:34
denn wir möchten natürlich keine Zeit verlieren,  und kann hier schon direkt diesen ersten Befehl   04:38
make config ausführen. 'make config'. Er öffnet  jetzt meinen Standard-Editor. Ich muss natürlich   04:43
in das Verzeichnis wieder rein. 'cd Downloads' und  kann jetzt hier 'make config' eingeben. Er öffnet   04:51
jetzt meinen Lieblingseditor, in meinem Fall  ist das jetzt der vim. Wenn du jetzt aber einen   04:56
anderen Editor nutzt, z.B Nano, dann könntest  du den im Vorfeld mit dem Befehl 'select-editor'   05:01
festlegen und dann öffnet er das Ganze hier in  Nano. Jetzt haben wir ja gesehen, er hat jetzt   05:08
diese Datei heruntergeladen, das ISO-Image. 'ls  -al', und da sehe ich jetzt hier dieses ISO-Image,   05:13
das heißt jetzt debian-12.8. Hier in dieser Config  wird jetzt noch eine ältere Version verlinkt als   05:20
Quelle, die muss ich jetzt anpassen. Deswegen habe  ich gesagt, ich mache erst den 'make download',   05:28
dann weiß ich schon genau, was ich hier eintragen  muss, nämlich in diesem Fall jetzt 12.8.0. Wenn   05:33
du das Video später anschaust, dann kann  es sein, dass sich diese Version natürlich   05:38
entsprechend geändert hat, und dann kannst du  das hier genauso gut anpassen. Hier kann ich   05:42
jetzt noch ein Target-ISO angeben. Das ist also  auch wieder das ISO, was er mir dann erstellt,   05:48
und das heißt hier mit, also wieder netinstall,  also 12.8.0 und mit hl für headless am Ende. Image   05:54
Label, das ist einfach nur der Name, den das Image  trägt. Das kann ich auch entsprechend anpassen.   06:04
Und hier könntet ihr auch noch die Architektur  angeben. Aktuell wird hier wohl nur AMD64 und   06:09
i386 unterstützt, ich gehe aber davon aus, dass  auch ARM relativ einfach nutzbar wäre. Das müsste   06:15
man entsprechend anpassen. An dieser Stelle  könntet ihr auch noch einen USB-Stick angeben,   06:22
also einen Pfad zu einem USB-Stick. Ich würde das  aber nicht machen, weil den USB-Stick könnt ihr   06:29
einfach nachher z.B. mit etcher oder dd selber  schreiben, das muss das Programm nicht für euch   06:33
machen. Hier gibt es jetzt noch ein paar weitere  Parameter, z.B. ob ihr jetzt eine serielle Konsole   06:39
nutzen möchtet. Das habe ich jetzt standardmässig  mal aktiv. Hier gibt es noch einen TMP-Folder,   06:46
einige Templates, da müsst ihr eigentlich  gar nichts dran machen. Ich gehe jetzt hier   06:52
raus und habe die Datei entsprechend  bearbeitet. Das Download-Image ist da,   06:57
die Datei ist bearbeitet und die Dependencies  wurden bereits auch schon installiert. Das heißt   07:02
ich kann jetzt mit der Konfiguration fortfahren.  Und zwar nutzt Debian zur automatisierten   07:08
Installation sogenannte Preseed-Files  und dieses Preseed-File kann ich einfach   07:14
editieren mit dem Befehl 'edit preseed.cfg' in dem  Verzeichnis, wo ich gerade bin. 'edit preseed.cfg' 07:19
Das hat er jetzt an der Stelle noch nicht gemacht.  Ich kann aber auch einfach mit vi dort reingehen,   07:32
denn er ruft auch einfach nur den standardmäßigen  Editor auf. Hier kann ich jetzt noch die locale   07:36
einstellen. Da könnte ich jetzt z.B. für  Schweiz de_ch eingeben. Für Deutschland   07:41
wäre das de_de. Die language vom Installer das  ist die Sprache des Installationsprogramms,   07:50
die lasst bitte auf Englisch, denn sonst  wird das Ganze nicht funktionieren. Hier   07:57
könntet ihr noch das Land angeben. Das  wäre jetzt hier de für Deutschland,   08:01
das ist jetzt wenn ihr in Deutschland seid  schon richtig, at für Österreich oder ch   08:05
für die Schweiz. Das Keyboard Layout könntet  hier ja auch noch ändern z.B. auf de-latin1 08:10
und hier einfach de. Und hier wird jetzt das  Netzwerkinterface angegeben. Euer Server, wenn   08:20
der bedienerlos installiert werden muss, dann muss  er natürlich auch eine Netzwerkverbindung haben.   08:27
Und am einfachsten funktioniert das, wenn ihr  den Server mit einem LAN-Kabel mit eurem Router   08:32
verbindet, denn ansonsten müsstet ihr hier in der  Preseed-Datei auch noch die Wireless-Konfiguration   08:38
angeben und das ist relativ komplex. Jetzt könnten  wir hier noch einen Hostnamen angeben. Ich sage   08:44
jetzt hier einfach mal netbox.local. Da könnte  man das, es ist jetzt auskommentiert. Das kann   08:49
ich auch noch hier hinterlegen und aktivieren,  und hier könnte ich sogar auch eine statische   08:56
Netzwerkkonfiguration angeben. Denn  standardmäßig würde das System versuchen,   09:02
per DHCP eine IP-Adresse zu beziehen und  die dann auch verwenden. Für die folgende   09:06
Installation hier werden jetzt noch einige  Kommandos ausgeführt, und zwar early_commands.   09:12
Und zwar wird hier das SSH erst installiert,  denn standardmäßig hat das netinstall Image   09:18
von Debian SSH nicht aktiviert, und hier kann  ich noch ein Passwort angeben. Dieses Passwort   09:23
wird allerdings nur für den Zugriff während der  Installation verwendet, nachher nicht mehr. Denn   09:29
nachher musst du dein eigenes Passwort angeben.  Die eigentliche Installation musst du natürlich   09:35
ganz wie üblich selber durchführen. Ich sage jetzt  hier mal speichern und kann dann schon schauen,   09:39
was der nächste Schritt ist. Der nächste  Schritt wäre jetzt hier 'make image',   09:44
also ich erstelle mein Image. Jetzt entpackt der  dieses Standard netinstall Image und bereitet   09:49
dort drin die Konfiguration entsprechend vor.  Danach wird dieses Image jetzt hier neu gepackt   09:57
und ihr habt dann nachher eure eigene ISO-Datei  die seht ihr jetzt hier, und zwar ist das die   10:04
mit dem 'hl' am Ende, weil wir das so angegeben  haben. Das Ganze könnten wir dann auch testen,   10:10
wenn ihr die Dependencies entsprechend installiert  habt. Dann sollte QEMU bereits drauf sein und dann   10:16
könntet ihr das hier wie z.B. in der Dokumentation  beschrieben mit dry run auch prüfen und da gibt es   10:22
dann die Variante mit BIOS oder UEFI. Das können  wir mal ausprobieren, ob das hier bei mir in der   10:31
VirtualBox sogar auch funktionieren wird. Jetzt  würde er ein Image hier mit QEMU launchen und dort   10:36
das ISO entsprechend hinterlegen. Ihr müsst  bedenken, das Installations-Script, das hat dann   10:43
nachher hier gar keine Ausgabe. Das heißt, selbst  wenn ihr da einen Monitor anschließen würdet,   10:49
dann würdet ihr da nur einen blinkenden Cursor  sehen wie jetzt, weil die Installation tatsächlich   10:53
dann über SSH oder Telnet, also über eine serielle  Konsole ausgeführt und sichtbar gemacht wird.   10:58
Und das kann ich jetzt hier mal testen, indem  ich jetzt hier mit SSH auf mein QEMU zugreife.   11:05
Nachher kannst du dann von deinem Computer mit  SSH und der IP-Adresse die dein Gerät bekommen   11:10
hat darauf zugreifen. Da musst du dann diesen Port  mit '-p22222' nicht mehr angeben, denn das ist   11:19
sehr spezifisch für QEMU. Er ist jetzt an dieser  Stelle noch nicht so weit. Das dauert eine Weile,   11:27
bis das SSH tatsächlich aufgeht, weil er natürlich  dort jetzt erst einmal alles vorbereiten muss,   11:33
und in der Zwischenzeit kann ich aber über die  serielle Konsole hier schon bereits zugreifen.   11:38
Und er sollte nachher hier dann die Ausgabe dann  auch entsprechend bringen, sobald er hier das   11:43
Image startet, und dann siehst du den Installer  tatsächlich in deiner QEMU und kannst dann die   11:49
Installation ganz normal wie bekannt einfach  durchführen. Dort musst du dann, wenn du per SSH   11:55
zugreifst, musst du dann das Passwort verwenden,  das du in der preseed- oder in der Config-Datei   12:03
angegeben hast. Und damit kannst du dann per SSH  auf deine Installation zugreifen, und das Ganze   12:07
sieht dann so aus. Also, er fragt dich nachher  ganz normal die üblichen Dinge, die du so kennst.   12:13
Das heißt du musst erst einmal ein Passwort für  dein Zielsystem angeben, die Partitionierung   12:18
durchführen und, und, und. Und wenn das fertig  ist, dann ist dein System quasi schon remote   12:22
vollständig installiert. Und hier sehen wir jetzt  auch schon im Hintergrund, das ist jetzt immer   12:28
noch über die serielle Konsole die Installation,  und da siehst du auch schon bis das Netzwerk   12:32
oben ist, kann wirklich ein paar Minuten dauern.  Das heißt, gib dir Zeit, lass das Ding wirklich   12:37
von dem USB-Stick booten. Das musst du natürlich  sicherstellen, dass dein Computer von USB booten   12:43
kann. Wenn das nicht geht, dann wird es schwierig,  oder von einer CD. Du kannst das Ganze natürlich   12:49
auch auf eine CD brennen und dann sollte das  vollautomatisch funktionieren. Und dann warte eine   12:54
Weile, bis wirklich diese Netzwerkkonfiguration  erfolgt ist. Denn er muss natürlich noch SSH, also   13:00
diese SSH-Unterstützung für den Debian-Installer,  hier im Hintergrund herunterladen und aktivieren,   13:06
und erst dann kannst du per SSH mit SSH Installer  IP-Adresse von deinem Server drauf zugreifen.   13:12
Wenn du jetzt nicht weißt welche IP-Adresse dein  Server bekommen hat, weil du ja DHCP verwendest,   13:21
dann empfehle ich dir, einen Blick in deinen  Router zu werfen. Denn der Router hat meistens   13:27
eine Übersicht aller Geräte und dort solltest du  dann schon sehen, dass dein Server eine IP-Adresse   13:32
erhalten hat, und damit kannst du dann auf dein  System zugreifen. Ich wünsche dir viel Spaß beim   13:38
Ausprobieren. So kannst du auch ohne Monitor  deinen Server bei dir zu Hause installieren und   13:43
viele meiner tollen Videos ausprobieren. Ich  würde mich auch freuen, wenn du Teil unserer   13:49
Community wirst. Das kannst du ganz einfach. Dazu  gehst du auf meine Webseite spacefun.ch und kannst   13:55
dann hier bereits auf den Punkt Community klicken  und dort entweder den QR-Code scannen oder hier   14:01
über Telegram darauf zugreifen. Wir haben auch  eine kleine Community über XMPP eine kleine,   14:08
feine Community. Dort würde ich mich natürlich  auch freuen, wenn du einmal vorbeischaust. Ich   14:14
freue mich auf dein Feedback in den Kommentaren  und in unserer Community und bis bald. Tschüss. 14:20
Hello headless space knights. Have you ever heard the saying 00:00
that Debian can install even a blind chicken? That's because 00:05
the installation program is so simple that, in the simplest case, the chicken always 00:10
has to press Enter and the installation is complete. Of course, it's not quite that simple, 00:15
because at one point you still have to confirm the partition layout, but in general, 00:21
the installation is really very suitable for beginners. But what happens if 00:28
you don't have a monitor available and still want to install your Debian system, 00:33
e.g. your server at home for self-hosting, which I 00:39
explain in detail in many of my videos? A so-called headless installation of the Debian 00:45
operating system is suitable for this, and I would like to show you in more detail how this works today. 00:53
I use a script for this, which is being developed by a colleague, 01:00
Philipp Pagel. He has taken the trouble 01:06
to create a corresponding installation script, a Makefile, which makes the whole thing super easy. I'll put the link in 01:14
the video description, of course. You can also find it here at github.com/philpagel/debian-headless, 01:20
and then you're there. First, we want to download the code. The easiest 01:27
way is to simply download this zip archive, which I can then open and 01:31
unpack accordingly. Then I can open my terminal and, of course, 01:37
change to the download folder. I'll now go to the 01:44
directory with 'cd Downloads/debian-headless-main'. There you'll find a few files. How to edit them 01:51
is explained in detail in the README. We'll start with the very first 01:57
command, 'make download,' because this will help us create the config later. 02:06
'make download' downloads the standard Debian netinstall image, which we 02:10
'll edit accordingly and prepare for a headless installation. I'll just type 02:17
'make download' here. The current stable version of the Debian netinstall 02:23
image is now being downloaded in the background. We'll also need a few dependencies later. We can 02:32
simply install them here with 'make install-depends', as we'll need them 02:40
later to create our own ISO. We'd like to have our own ISO image, 02:46
which we can then use on a USB stick to install our server without a monitor 02:52
. For example, this is relatively easy on a Raspberry Pi. There, you can 02:58
even prepare an unattended installation using the Raspberry Pi Imager. In the background, 03:05
it downloads this version of Debian 12.8, the current version for the AMD64 architecture 03:13
. If you want to use a different architecture, such as ARM or i368 03:23
, that's also possible, but you'll need to edit the configuration file beforehand. I 03:30
'll now open a new tab here via 'File / New Tab', switch 03:35
back to the folder, and then, at the same time, take a look at the next step 03:41
we need to take here. So, I could do 'make config' here. But I'll 03:47
also do 'make install-depends' first. I have to enter my password here, of course, 03:52
because the whole thing is done with root privileges, and it's already installing 03:59
the dependency in the background. For testing, the system is using QEMU. If you want to try it out in VirtualBox 04:04
, you'll need to enable nested virtualization. 04:11
You can do this in the System tab, and there, if your 04:18
system supports it, you can enable nested virtualization. And then you can even 04:24
test everything in VirtualBox like I did here. It's installing the dependencies here. 04:28
It's downloading the netinstall file here. I'll now open a third tab, 04:34
because we don't want to waste any time, and I can run this first command, make config, right here 04:38
. 'make config'. It will now open my standard editor. Of course, I have to 04:43
Back into the directory. 'cd Downloads' and can now enter 'make config' here. It will 04:51
now open my favorite editor, in my case, Vim. If you 04:56
use a different editor, such as Nano, you could specify it beforehand with the 'select-editor' command 05:01
, and then it will open the whole thing in Nano. Now we've seen that it has 05:08
downloaded this file, the ISO image. 'ls -al', and there I can see this ISO image, 05:13
which is now called Debian-12.8. Here in this config, an older version is linked as 05:20
the source, which I now need to adjust. That's why I said I'll do 'make download' first, 05:28
then I know exactly what I need to enter here, in this case, 12.8.0. If 05:33
you watch the video later, it's possible that this version 05:38
has changed accordingly, and then you can adjust it just as well. I can 05:42
now specify a target ISO here . So this is the ISO it then creates for me, 05:48
and here it's called netinstall, so 12.8.0, and with hl for headless at the end. Image 05:54
label, that's simply the name the image has. I can also adjust that accordingly. 06:04
And you could also specify the architecture here. Currently, only AMD64 and 06:09
i386 are supported, but I assume that ARM would also be relatively easy to use. That would have to 06:15
be adjusted accordingly. At this point, you could also specify a USB stick, 06:22
i.e. a path to a USB stick. I wouldn't do that, though, because you can 06:29
simply create the USB stick yourself later, for example, with etcher or dd; the program doesn't have to 06:33
do that for you. There are a few more parameters here, for example, whether you 06:39
want to use a serial console. I have that active by default. There's also a TMP folder here, 06:46
some templates; you don't really have to do anything with them. I'll go 06:52
out here now and have edited the file accordingly. The download image is there, 06:57
the file has been edited, and the dependencies have already been installed. This means 07:02
I can now continue with the configuration. Debian uses 07:08
so-called preseed files for automated installation, and I can easily 07:14
edit this preseed file with the command 'edit preseed.cfg' in the directory I am currently in. 'edit preseed.cfg' 07:19
It hasn't done that yet. But I can also just go in there with vi, 07:32
because it just calls up the standard editor. Here I can now 07:36
set the locale. For example, I could enter de_ch for Switzerland. For Germany 07:41
that would be de_de. The language of the installer is the language of the installation program; 07:50
please leave it in English, otherwise the whole thing won't work. 07:57
You could also enter the country here. That would be de for Germany, 08:01
which is correct if you are in Germany, at for Austria, or ch 08:05
for Switzerland. You could also change the keyboard layout here, for example, to de-latin1 08:10
and simply de here. And here, the network interface is specified. Your server, if 08:20
it needs to be installed unattended, must of course also have a network connection. 08:27
The easiest way to do this is to connect the server to your router with a LAN cable 08:32
, because otherwise you would also have to specify the wireless configuration in the preseed file 08:38
, and that's relatively complex. Now we could also specify a hostname here. I'll 08:44
just say netbox.local. You could do that there; it's commented out now. 08:49
I can also store and activate that here, and I could even 08:56
specify a static network configuration here. By default, the system would try 09:02
to obtain an IP address via DHCP and then use it. For the following 09:06
installation, a few more commands will be executed, namely early_commands. 09:12
SSH is installed here first, because the 09:18
Debian netinstall image doesn't have SSH enabled by default, and I can also specify a password here. This password 09:23
However, it is only used for access during installation, not afterwards. Because 09:29
afterwards you have to enter your own password. You have 09:35
to carry out the actual installation yourself, as usual. I'll say save here and then I can see 09:39
what the next step is. The next step would be 'make image', 09:44
so I create my image. Now it unpacks this standard netinstall image and prepares 09:49
the configuration accordingly. After that, this image is repackaged here 09:57
and you then have your own ISO file, which you can see here now. It's the one 10:04
with the 'hl' at the end because that's how we specified it. We could then test the whole thing 10:10
once you've installed the dependencies accordingly. Then QEMU should already be on it and then 10:16
you could test it with dry run, as described in the documentation, for example. There is 10:22
a variant with BIOS or UEFI. We can try that out and see if it will even work here in 10:31
VirtualBox. Now it would launch an image here with QEMU and 10:36
store the ISO there accordingly. You have to keep in mind that the installation script 10:43
won't have any output afterward. This means that even if you were to connect a monitor, 10:49
you'd only see a blinking cursor like now, because the installation is actually 10:53
carried out and displayed via SSH or Telnet, i.e., via a serial console. 10:58
I can test this now by accessing my QEMU with SSH. 11:05
Afterward, you'll be able to access it from your computer using SSH and the IP address your device was assigned 11:10
. You won't need to specify the port '-p22222' anymore, as that's 11:19
very specific to QEMU. It's not quite ready at this point. It'll take a while 11:27
for SSH to actually open, because it obviously has to prepare everything there first, 11:33
but in the meantime, I can already access it via the serial console. 11:38
It should then display the appropriate output here as soon as it 11:43
starts the image. You'll then see the installer in your QEMU and can then 11:49
simply run the installation as usual. If you 11:55
access via SSH, you'll need to use the password you specified in the preseed or config file 12:03
. This will allow you to access your installation via SSH, and the whole thing 12:07
will look like this. It will then ask you the usual questions. 12:13
This means you first need to specify a password for your target system, 12:18
perform the partitioning, and so on. Once that's finished, your system is essentially 12:22
completely installed remotely. And here we can see in the background that 12:28
the installation is still taking place via the serial console, and you can see that it can take a few minutes until the network 12:32
is up and running. So, give yourself time; let the thing 12:37
boot from the USB stick. Of course, you have to make sure your computer can boot from USB 12:43
. If that doesn't work, it will be difficult, or from a CD. You can, of course, 12:49
burn the whole thing to a CD, and then it should work fully automatically. And then wait a 12:54
while until the network configuration is complete. It still needs 13:00
to download and activate SSH, meaning SSH support for the Debian installer, in the background. 13:06
Only then can you access your server's IP address via SSH using the SSH installer. 13:12
If you don't know which IP address your server has received because you're using DHCP, 13:21
then I recommend taking a look at your router. Routers usually have 13:27
an overview of all devices, and there you should see that your server has received an IP address 13:32
, and you can then access your system with it. I hope you have fun 13:38
trying it out. This way, you can install your server at home even without a monitor and 13:43
try out many of my great videos. I would also be happy if you were part of our 13:49
Become a community. It's easy. To do so, go to my website spacefun.ch and 13:55
click on the "Community" section. You can either scan the QR code there or 14:01
access it via Telegram. We also have a small community via XMPP—a small, 14:08
fine community. I would, of course, be delighted if you would stop by there. I 14:14
look forward to your feedback in the comments and in our community, and see you soon. Bye. 14:20

In diesem Video zeige ich euch, wie man Debian ganz einfach auf einem Server ohne Tastatur oder Bildschirm installiert.

Mein Ziel war es, eine Lösung zu finden, die eine 100% remote Installation über SSH oder eine serielle Konsole ermöglicht. Ich habe viele Informationen durchforstet und bin schließlich auf die Lösung von Philipp Pagel gestossen, der eine funktionierende Methode entwickelt hat, um ein Debian-Image für die Headless Installation zu remastern.

https://github.com/philpagel/debian-headless

In meinem Video erkläre ich dir, wie du solch ein Image erstellen kannst und wie du dich dann mit dem SSH-Server des Debian-Installers verbindest.

Wenn ihr also ebenfalls Debian ohne direkten Zugriff installieren möchtet, schaut euch mein Video an und lasst euch inspirieren.

Navigation

Video Player