# Notizen für 01.07.2025 ######################## root@cubietruck:~# ### Für das Berichtsheft am 30.06.2025: root@cubietruck:~# # - kein aktiver Unterricht root@cubietruck:~# # - Selbstlernphase root@cubietruck:~# # - Wiederholung / Vertiefung root@cubietruck:~# root@cubietruck:~# df -h Filesystem Size Used Avail Use% Mounted on udev 948M 0 948M 0% /dev tmpfs 201M 3.0M 198M 2% /run /dev/mmcblk0p1 15G 13G 1.3G 91% / tmpfs 1002M 0 1002M 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 1002M 0 1002M 0% /sys/fs/cgroup tmpfs 1002M 8.0K 1002M 1% /tmp /dev/zram1 49M 14M 32M 30% /var/log tmpfs 201M 0 201M 0% /run/user/1000 root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# lsusb Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@cubietruck:~# root@cubietruck:~# lsusb -t /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M root@cubietruck:~# root@cubietruck:~# lspci pcilib: Cannot open /proc/bus/pci lspci: Cannot find any working access method. root@cubietruck:~# root@cubietruck:~# # >>> klarer Fall: die Single Board Computer (SBC) besitzen meist keinen PCI-Bus root@cubietruck:~# lscpu Architecture: armv7l Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 Vendor ID: ARM Model: 4 Model name: Cortex-A7 Stepping: r0p4 CPU max MHz: 960.0000 CPU min MHz: 144.0000 BogoMIPS: 50.52 Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# ## Besser aus Dateien unterhalb von /proc ausgeben: root@cubietruck:~# cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 50.52 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 4 processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 50.52 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 4 Hardware : Allwinner sun7i (A20) Family Revision : 0000 Serial : 1651661705818404 root@cubietruck:~# root@cubietruck:~# ## 1. CPU: root@cubietruck:~# # lscpu (alternativ: cat /proc/cpuinfo) root@cubietruck:~# # root@cubietruck:~# ## 2. RAM: root@cubietruck:~# free -h total used free shared buff/cache available Mem: 2.0Gi 112Mi 1.6Gi 3.0Mi 213Mi 1.8Gi Swap: 1.0Gi 0B 1.0Gi root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# ## Schnittstellengeräte: root@cubietruck:~# lsusb Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@cubietruck:~# root@cubietruck:~# lspci pcilib: Cannot open /proc/bus/pci lspci: Cannot find any working access method. root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# ## Drei Dateien für die Hardware-Ressourcen: root@cubietruck:~# # a) Interrupts: root@cubietruck:~# cat /proc/interrupts CPU0 CPU1 26: 0 0 GICv2 29 Level arch_timer 27: 83937 73714 GICv2 30 Level arch_timer 30: 0 0 GICv2 54 Level timer@1c20c00 31: 0 0 GICv2 59 Level 1c02000.dma-controller 32: 0 0 GICv2 76 Level 1c0c000.lcd-controller 33: 0 0 GICv2 77 Level 1c0d000.lcd-controller 34: 0 0 GICv2 56 Level 1c20d00.rtc 35: 0 0 GICv2 113 Level sun5i_timer0 36: 0 0 GICv2 152 Level arm-pmu 37: 0 0 GICv2 153 Level arm-pmu 40: 0 0 sunxi_pio_edge 1 Edge 1c0f000.mmc cd 58: 1 0 sunxi_pio_edge 19 Edge usb0-id-det 71: 6 0 GICv2 33 Level ttyS0 72: 330 0 GICv2 35 Level ttyS2 73: 48 2556 GICv2 117 Level eth0 74: 9972 0 GICv2 39 Level mv64xxx_i2c 75: 0 0 sunxi-nmi 0 Level axp20x_irq_chip 81: 0 0 axp20x_irq_chip 5 Edge axp20x-usb-power-supply 82: 0 0 axp20x_irq_chip 6 Edge axp20x-usb-power-supply 84: 0 0 axp20x_irq_chip 8 Edge axp20x-battery-power-supply 85: 0 0 axp20x_irq_chip 9 Edge axp20x-battery-power-supply 86: 0 0 axp20x_irq_chip 10 Edge axp20x-battery-power-supply 87: 0 0 axp20x_irq_chip 11 Edge axp20x-battery-power-supply 88: 0 0 axp20x_irq_chip 12 Edge axp20x-battery-power-supply 89: 0 0 axp20x_irq_chip 13 Edge axp20x-battery-power-supply 102: 0 0 axp20x_irq_chip 26 Edge axp20x-usb-power-supply 103: 0 0 axp20x_irq_chip 27 Edge axp20x-usb-power-supply 109: 0 0 axp20x_irq_chip 33 Edge axp20x-pek-dbf 110: 0 0 axp20x_irq_chip 34 Edge axp20x-pek-dbr 115: 0 0 GICv2 40 Level mv64xxx_i2c 116: 0 0 GICv2 41 Level mv64xxx_i2c 117: 8095 0 GICv2 64 Level sunxi-mmc 118: 3279 0 GICv2 67 Level sunxi-mmc 119: 0 0 GICv2 88 Level ahci-sunxi[1c18000.sata] 120: 1806 0 GICv2 61 Level sun4i_gpadc_irq_chip 121: 4705 0 GICv2 37 Level sunxi-ir 122: 1806 0 sun4i_gpadc_irq_chip 2 Edge temp_data 123: 0 0 sun4i_gpadc_irq_chip 1 Edge fifo_data 124: 0 0 GICv2 85 Level 1c0e000.video-codec 126: 0 0 GICv2 102 Level gpmmu 127: 0 0 GICv2 104 Level ppmmu0 128: 0 0 GICv2 107 Level ppmmu1 129: 0 0 GICv2 101 Level gp 130: 0 0 GICv2 103 Level pp0 131: 0 0 GICv2 106 Level pp1 132: 0 0 GICv2 70 Level musb-hdrc.1.auto 133: 0 0 GICv2 71 Level ehci_hcd:usb2 134: 0 0 GICv2 72 Level ehci_hcd:usb3 135: 0 0 GICv2 97 Level ohci_hcd:usb4 136: 0 0 GICv2 96 Level ohci_hcd:usb5 IPI0: 0 0 CPU wakeup interrupts IPI1: 0 0 Timer broadcast interrupts IPI2: 1974 3372 Rescheduling interrupts IPI3: 12962 16281 Function call interrupts IPI4: 0 0 CPU stop interrupts IPI5: 3562 2726 IRQ work interrupts IPI6: 0 0 completion interrupts Err: 0 root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# # a) Interrupts: root@cubietruck:~# cat /proc/interrupts | head -7 CPU0 CPU1 26: 0 0 GICv2 29 Level arch_timer 27: 88044 76906 GICv2 30 Level arch_timer 30: 0 0 GICv2 54 Level timer@1c20c00 31: 0 0 GICv2 59 Level 1c02000.dma-controller 32: 0 0 GICv2 76 Level 1c0c000.lcd-controller 33: 0 0 GICv2 77 Level 1c0d000.lcd-controller root@cubietruck:~# root@cubietruck:~# # b) Input/Outputbereich im RAM: root@cubietruck:~# cat /proc/ioports root@cubietruck:~# root@cubietruck:~# # >>> bei PCI-Geräten verwendet, bei USB nicht root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# # c) Direct Memory Access: root@cubietruck:~# cat /proc/dma cat: /proc/dma: No such file or directory root@cubietruck:~# root@cubietruck:~# # >>> bei einem Intel Thinkpad "T410" findet sich hier root@cubietruck:~# # root@cubietruck:~# # 4: cascade root@cubietruck:~# ### Netzwerk-Schnittstellen: root@cubietruck:~# # a) Mit dem veralteten Paket "net-tools": root@cubietruck:~# dpkg -L net-tools | grep bin /bin /bin/netstat /sbin /sbin/ifconfig /sbin/ipmaddr /sbin/iptunnel /sbin/mii-tool /sbin/nameif /sbin/plipconfig /sbin/rarp /sbin/route /sbin/slattach /usr/sbin /usr/sbin/arp root@cubietruck:~# # Wichtige Tools: root@cubietruck:~# whatis ifconfig ifconfig (8) - configure a network interface root@cubietruck:~# root@cubietruck:~# whatis route route (8) - show / manipulate the IP routing table root@cubietruck:~# root@cubietruck:~# whatis arp arp (8) - manipulate the system ARP cache root@cubietruck:~# root@cubietruck:~# whatis netstat netstat (8) - Print network connections, routing tables, interface statistics, masquerade connections, a... root@cubietruck:~# root@cubietruck:~# whatis mii-tool mii-tool (8) - view, manipulate media-independent interface status root@cubietruck:~# root@cubietruck:~# mii-tool eth0 eth0: negotiated 1000baseT-HD flow-control, link ok root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# # b) mit den neuen, vorinstallierten iproute-Tools: root@cubietruck:~# dpkg -L iproute2 | grep bin /bin /bin/ip /bin/ss /sbin /sbin/bridge /sbin/devlink /sbin/rtacct /sbin/rtmon /sbin/tc /sbin/tipc /usr/bin /usr/bin/lnstat /usr/bin/nstat /usr/bin/rdma /usr/bin/routef /usr/bin/routel /usr/sbin /usr/sbin/arpd /usr/sbin/genl /sbin/ip /usr/bin/ctstat /usr/bin/rtstat root@cubietruck:~# root@cubietruck:~# # Wichtige Tools: root@cubietruck:~# whatis ip ip (8) - show / manipulate routing, network devices, interfaces and tunnels root@cubietruck:~# root@cubietruck:~# whatis ss ss (8) - another utility to investigate sockets root@cubietruck:~# # >>> "Socket State" ist der Ersatz für das alte "netstat" root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# # iproute-Tools im praktischen Einsatz: root@cubietruck:~# # a) IP-Adressierung: root@cubietruck:~# ip addr 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 02:17:05:81:84:04 brd ff:ff:ff:ff:ff:ff inet 192.168.2.250/24 brd 192.168.2.255 scope global eth0 valid_lft forever preferred_lft forever inet6 2003:f4:e740:1073:17:5ff:fe81:8404/64 scope global dynamic mngtmpaddr valid_lft 86387sec preferred_lft 86387sec inet6 fe80::17:5ff:fe81:8404/64 scope link valid_lft forever preferred_lft forever 3: wlan0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 6c:fa:a7:16:9b:40 brd ff:ff:ff:ff:ff:ff root@cubietruck:~# root@cubietruck:~# # b) Routing-Tabelle ausgeben: root@cubietruck:~# ip route default via 192.168.2.1 dev eth0 onlink 169.254.0.0/16 dev eth0 scope link metric 1000 192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.250 root@cubietruck:~# root@cubietruck:~# # >>> nicht nur die Netzwerk-ID "192.168.2.0/24" ist zu sehen, sogar auch root@cubietruck:~# # welche Adresse ("192.168.2.250") auf dem Device eth0 konfiguriert ist. root@cubietruck:~# root@cubietruck:~# ## Wenn kein DHCP-Server die Maschinen konfiguriert: root@cubietruck:~# # root@cubietruck:~# # IP-Adresse setzen: root@cubietruck:~# ip addr add dev eth0 192.168.2.254/24 root@cubietruck:~# root@cubietruck:~# # NIC aktivieren: root@cubietruck:~# ip link set dev eth0 up root@cubietruck:~# root@cubietruck:~# # Default-GW löschen und wieder hinzufügen: root@cubietruck:~# ip route del default root@cubietruck:~# root@cubietruck:~# ping -c2 8.8.8.8 connect: Network is unreachable root@cubietruck:~# root@cubietruck:~# # >>> Fehlermedlung erscheint sofort! root@cubietruck:~# root@cubietruck:~# ip route 169.254.0.0/16 dev eth0 scope link metric 1000 192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.250 root@cubietruck:~# root@cubietruck:~# ip route add default via 192.168.2.1 root@cubietruck:~# root@cubietruck:~# ping -c2 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=14.0 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=14.4 ms --- 8.8.8.8 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 2ms rtt min/avg/max/mdev = 13.999/14.181/14.363/0.182 ms root@cubietruck:~# root@cubietruck:~# # >>> damit haben wir das Internet, allerdings nur via 3 OSI-Layer root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# ## Fehlt nur die clientseitige DNS-Konfiguration: root@cubietruck:~# # ACHTUNG: Zuerst immer Infos einholen: root@cubietruck:~# # Falls als Dateityp ein Sysmlink auftaucht, ist man schon einmal gewarnt: root@cubietruck:~# ls -l /etc/resolv.conf -rw-r--r-- 1 root root 23 Feb 9 2022 /etc/resolv.conf root@cubietruck:~# root@cubietruck:~# # >>> Debian-typisch ist das eine normale Datei root@cubietruck:~# root@cubietruck:~# # Also unbedingt noch Inhalt ausgeben: root@cubietruck:~# cat /etc/resolv.conf nameserver 192.168.2.1 root@cubietruck:~# root@cubietruck:~# # >>> Wie schön, keine Hinweise auf einen Networkmanager, wir können das per Hand ändern. root@cubietruck:~# root@cubietruck:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf root@cubietruck:~# root@cubietruck:~# ping -c3 -4 pemmann.de PING pemmann.de (89.22.110.238) 56(84) bytes of data. 64 bytes from vps28332.alfahosting-vps.de (89.22.110.238): icmp_seq=1 ttl=56 time=21.8 ms 64 bytes from vps28332.alfahosting-vps.de (89.22.110.238): icmp_seq=2 ttl=56 time=21.6 ms 64 bytes from vps28332.alfahosting-vps.de (89.22.110.238): icmp_seq=3 ttl=56 time=22.1 ms --- pemmann.de ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 6ms rtt min/avg/max/mdev = 21.638/21.835/22.050/0.168 ms root@cubietruck:~# root@cubietruck:~# # >>> jetzt klappt es auch mit Namensauflösung (über alle 7 OSI-Layer) root@cubietruck:~# root@cubietruck:~# root@cubietruck:~# # Die wichtigen Zeilen waren: root@cubietruck:~# # ip addr add dev eth0 192.168.2.254/24 root@cubietruck:~# # ip link set dev eth0 up root@cubietruck:~# # ip route add default via 192.168.2.1 root@cubietruck:~# # echo "nameserver 8.8.8.8" > /etc/resolv.conf root@cubietruck:~# ## Proxmox in Hyper-V installieren Nach dem Einrichten des virtuellen Switches vom Typ "externes Netzwerk" namens "bridge0" verschwindet die IP-Adresse vom realen Ethernet- bzw. WLAN-Adapter, der virtuelle Adapter bekommt selbige zugewiesen (= Migration): Ethernet-Adapter vEthernet (bridge0): Verbindungsspezifisches DNS-Suffix: IPv6-Adresse. . . . . . . . . . . : 2003:f4:e740:1073:dbcf:be37:2675:c86c IPv6-Adresse. . . . . . . . . . . : fd00::1 Temporäre IPv6-Adresse. . . . . . : 2003:f4:e740:1073:896e:5e94:a51f:261c Verbindungslokale IPv6-Adresse . : fe80::8201:8673:b7e4:9864%39 IPv4-Adresse . . . . . . . . . . : 192.168.2.234 Subnetzmaske . . . . . . . . . . : 255.255.255.0 Standardgateway . . . . . . . . . : fe80::1%39 192.168.2.1 https://www.proxmox.com/en/downloads ## Welches Programm önnet den Port 8006? lsof -iTCP:8006 ## Die History-Kommandos in eine andere Bash-Sitzung importieren: a) MASCHINE 1: history -a # append in $HISTFILE b) MASCHINE 2: history -r # re-read from $HISTFILE root@pve:~# history -r root@pve:~# root@pve:~# history 12 26 find /etc/pve/ -name "*.pem" 27 openssl x509 -in /etc/pve/nodes/pve/pve-ssl.pem -noout -fingerprint 28 find /etc/pve/ -name "*.pem" 29 openssl x509 -in /etc/pve/nodes/pve/pve-ssl.pem -noout -fingerprint 30 openssl x509 -in /etc/pve/nodes/pve/pve-ssl.pem -noout -fingerprint sha254 31 openssl x509 -in /etc/pve/nodes/pve/pve-ssl.pem -noout -fingerprint sha256 32 openssl x509 -in /etc/pve/nodes/pve/pve-ssl.pem -noout -fingerprint -sha256 33 ps -C sshd 34 grep PermitRootLogin /etc/ssh/sshd_config 35 ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub 36 history -a 37 history 12 root@pve:~# root@pve:~# root@pve:~# whatis script script (1) - make typescript of terminal session root@pve:~# root@pve:~# # >>> anderes als dieses Programm ist aus der History nicht erzsehen, welches die erfolgreiche Zeile war. root@pve:~# root@pve:~# !32 openssl x509 -in /etc/pve/nodes/pve/pve-ssl.pem -noout -fingerprint -sha256 sha256 Fingerprint=3B:D3:05:DA:FF:D8:26:30:70:06:19:53:F8:A1:49:72:79:7E:BE:43:EA:2C:14:89:F0:9A:44:4E:5C:A0:ED:C2 root@pve:~# root@pve:~# root@pve:~# !34 grep PermitRootLogin /etc/ssh/sshd_config PermitRootLogin yes # the setting of "PermitRootLogin prohibit-password". root@pve:~# root@pve:~# !35 ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub 256 SHA256:YFxSI/EY6EKpUSrpUgyfLBPcoDybs5e4JSxH0EQlqlY root@pve (ED25519) root@pve:~# root@pve:~#