Tiny Core Linux unter Proxmox installieren

Für einen kleinen und schlanken Linux Client nehme ich Tiny Core Linux.
Ideal für virtuelle Testumgebungen und dem Netzwerk Simulator GNS3 oder EVE-NG.

21.05.2023 Core 14.0 (Upgrade Tiny Core 13.1 auf 14.0)
29.05.2022 Core 13.1 (DHCP, Tastaturlayout DE, OpenSSH, htop, ethtool und iproute2)
28.05.2020 Anleitung aktualisiert für Proxmox 7 und Tiny Core 13
16.04.2020 Core 11.1 (DHCP, Tastaturlayout DE, OpenSSH, htop, ethtool und iproute2)
16.04.2020 Anleitung aktualisiert für Proxmox 6 und Tiny Core 11
25.02.2019 Core 10.0 (DHCP, Tastaturlayout DE, OpenSSH, htop, ethtool und iproute2)
20.05.2018 Core 9.0  (DHCP, Tastaturlayout DE, OpenSSH, htop, ethtool und iproute2)

Tiny Core installieren

Neue virtuelle Maschine erstellen:

  • OS: Linux 6.x – 2.6 Kernel
  • CD: Core-current.iso
  • Hard Disk: 100 MB SATA
  • Memory: 256 MB

Mit der Core Version 11 erhalte ich bei weniger als 256 MB RAM immer ein: Kernel panic – not syncing: System is deadlocked on memory

Tiny Core Linux lässt sich mit dem tc-install.sh script einfach und schnell auf eine Festplatte installieren.
Von der CD bootet Tiny Core im Text Modus, eine GUI wird nicht benötigt.

Das Paket tc-install installieren. (benötigte Pakete werden automatisch mit installiert)

$ tce-load -wi tc-install

Für die eigentliche Installation starten wird tc-install.sh mit root Rechten ausgeführt.

$ sudo tc-install.sh

Den Bildschirmanweisungen einfach folgen. (c, f, 1, y, enter, 3, enter, y)

… gefühlt noch keine Minute, fertig.

Das Tiny Core Grundsystem ist auf der Festplatte installiert, System ausschalten und die CD entfernen.

$ sudo poweroff

Nach einem Neustart sind jetzt noch einige Anpassungen nötig.

Tiny Core Deutsches Tastaturlayout installieren

Das default Keyboard ist US, DE ist aber schnell nachinstalliert.

# Tastaturlayouts nachinstallieren
$ tce-load -wi kmaps

# um es zu aktivieren
$ sudo loadkmap < /usr/share/kmap/qwertz/de-latin1.kmap 

# damit es auch beim booten automatisch geladen wird:
$ vi /mnt/sda1/tce/boot/extlinux/extlinux.conf
APPEND quiet kmap=qwertz/de-latin1 waitusb=5:UUID="xxxxxxx ...

Tiny Core Terminalauflösung ändern

Die Terminalauflösung auf 1024 x 768 setzen (vga=791)

$ vi /mnt/sda1/tce/boot/extlinux/extlinux.conf
APPEND quiet kmap=qwertz/de-latin1 vga=791 waitusb=5:UUID="xxxxxxx ...

Tiny Core OpenSSH Server installieren

SSH sollte natürlich auch verfügbar sein.

# Paket OpenSSH installieren.
$ tce-load -wi openssh

# ssh config dateien erstellen
$ cd /usr/local/etc/ssh/
$ sudo cp ssh_config.orig ssh_config
$ sudo cp sshd_config.orig sshd_config

# OpenSSH Server starten
$ sudo /usr/local/etc/init.d/openssh start

# OpenSSH Server beim booten automatisch starten
$ sudo vi /opt/bootlocal.sh
/usr/local/etc/init.d/openssh start

# für den user tc ein Passwort setzen (damit wir uns per ssh einloggen können)
$ passwd

Tiny Core sonstige Pakete

Pakete die ich noch installiert habe.

$ tce-load -wi htop iftop ethtool iproute2

Tiny Core statische IP Adresse

Um eine statische IP zu setzen, kommen folgende Befehle in die bootlocal.sh. (iproute2 muss dafür installiert sein)

$ vi /opt/bootlocal.sh
sudo ip addr add 192.168.200.3/24 broadcast 192.168.200.255 dev eth0
sudo ip route add default via 192.168.200.1
sudo pkill udhcpc

Tiny Core Hostname ändern

$ sudo vi /mnt/sda1/tce/boot/extlinux/extlinux.conf
APPEND host=TinyCore ...

Tiny Core Konfiguration sichern

Nach Änderungen an der config immer mit filetool sichern.

# Verzeichnisse die von filetool.sh gesichert werden sollen (persistent)
$ sudo vi /opt/.filetool.lst
opt
home 
usr/local/etc/ssh
etc/passwd
etc/shadow 
etc/hostname

# aktuelle Konfiguration sichern und dauerhaft machen (persistent)
$ filetool.sh -b

Tiny Core installierte Pakete anzeigen

$ tce-status -i
bash
db
ethtool
glib2
htop
iftop
iproute2
kmaps
libffi
libpcap
libusb
ncursesw
openssh
openssl-1.1.1
readline
udev-lib

Tiny Core installierte Pakete updaten

$ tce-update
Checking for Easy Mode Operation... OK

Press Enter key to begin batch update of extensions in /sda1/tce
or enter any char to exit now:

Checking Tiny Core Applications in /mnt/sda1/tce/optional
Your system is up-to-date.

Press Enter key.

Tiny Core upgraden

Es müssen nur diese beiden Dateien ersetzt werden um das System auf eine neue Version zu bringen. (distribution files)

  • core.gz
  • vmlinuz

aktueller Kernel und Version

tc@box:~$ uname -a
Linux box 5.15.10-tinycore #622 SMP Tue Dec 21 16:51:09 UTC 2021 i686 GNU/Linux

tc@box:~$ version
13.1

upgrade

# Verzeichnis wechseln
tc@box:~$ cd /mnt/sda1/tce/boot/

# beide Dateien löschen (ich erstelle mir vorher KEINE Sicherung, backup vorhanden)
tc@box:/mnt/sda1/tce/boot$ rm -f core.gz vmlinuz

# aktuelle Version der beiden Dateien downloaden
tc@box:/mnt/sda1/tce/boot$ wget -O core.gz http://www.tinycorelinux.net/14.x/x86/release/distribution_files/core.gz
tc@box:/mnt/sda1/tce/boot$ wget -O vmlinuz http://www.tinycorelinux.net/14.x/x86/release/distribution_files/vmlinuz

# system rebooten
tc@box:/mnt/sda1/tce/boot$ sudo reboot

aktueller Kernel und Version

tc@box:~$ uname -a
Linux box 6.1.2-tinycore #612 SMP Mon Jan  2 16:44:20 UTC 2023 i686 GNU/Linux

tc@box:~$ version
14.0

Im letzten Schritt sind noch die installierten Pakete zu aktualisieren.

# update
tc@box:~$ tce-update
Checking for Easy Mode Operation... OK

Press Enter key to begin batch update of extensions in /sda1/tce
or enter any char to exit now:
Checking Tiny Core Applications in /mnt/sda1/tce/optional
Updating iftop.tcz OK
Updating libpcap.tcz OK
Updating ncursesw.tcz OK
Updating openssh.tcz OK
Updating openssl-1.1.1.tcz OK
Fetching required dependency: libnl.tcz OK
Fetching required dependency: dbus.tcz md5sum: can't open 'qt-5.x-dbus.tcz': No such file or directory
md5sum: can't open 'wpa_supplicant-dbus.tcz': No such file or directory
Failed
Errors occurred during upgrade. Press Enter to see /tmp/upgrade_errors.lst

# der Fehler konnte hiermit gelöst werden
tc@box:~$ tce-load -wi dbus.tcz

# erneutes update
tc@box:~$ tce-update
Checking for Easy Mode Operation... OK

Press Enter key to begin batch update of extensions in /sda1/tce
or enter any char to exit now:
Checking Tiny Core Applications in /mnt/sda1/tce/optional
Updating iftop.tcz OK
Updating libpcap.tcz OK
Updating ncursesw.tcz OK
Updating openssh.tcz OK
Updating openssl-1.1.1.tcz OK
Reboot to use new updated extensions!
Press Enter key.

# system rebooten
tc@box:~$ sudo reboot

Tiny Core Diskimage

21.05.2023 Proxmox-KVM_TinyCore-14.0.img.gz
29.05.2022 Proxmox-KVM_TinyCore-13.1.img.gz

Schreibe einen Kommentar