Debian Matrix server

It’s a chat network. As far as I’ve understood it, it’s like IRC, but Slack. Selfhosted, but also more like modern. It’s supposed to be safer, and in a way, kind of XMPP. It’s called Matrix. I will not explain why I decided to deploy it. Deploy it, learn it, use it or discart it. It’s a lifecycle of technology. So let’s just skip to it. It’s supposed to be self-hosted communications infrastructure that you can scale and so on. So let’s see, how do I set it up. ...

2019-08-29 · 5 min · EK

Buster upgrade procedure

apt-get update apt-get install -y aptitude aptitude search '~i(!~ODebian)' # should return as little as possibile apt-get upgrade apt-get dist-upgrade dpkg -C # should return nothing or as little as possibile apt-mark showhold # should return nothing or as little as possibile dpkg --audit # should return nothing cp /etc/apt/sources.list /etc/apt/sources.list_backup sed -i 's/stretch/buster/g' /etc/apt/sources.list apt-get update apt list --upgradable apt-get upgrade -y apt-get dist-upgrade -y aptitude search '~i(!~ODebian)' # should return same as before apt-get autoremove or ...

2019-08-29 · 1 min · EK

PXE-only linux server

No DHCP server here! apt-get install dnsmasq pxelinux syslinux-common wget http://www.memtest.org/download/5.01/memtest86+-5.01.bin.gz gzip -dk memtest86+-5.01.bin.gz service dnsmasq stop mkdir -p /var/lib/tftpboot mkdir -p /var/lib/tftpboot/memtest cp ~/memtest86+-5.01.bin /var/lib/tftpboot/memtest/memtest86+-5.01 mkdir -p /var/lib/tftpboot/pxelinux.cfg vim /var/lib/tftpboot/pxelinux.cfg/default ------------BOF default memtest86 prompt 1 timeout 150 label memtest86 menu label Memtest86+ 5.01 kernel /memtest/memtest86+-5.01 ------------EOF ln -s /usr/lib/PXELINUX/pxelinux.0 /var/lib/tftpboot/ ln -s /usr/lib/syslinux/modules/bios/ldlinux.c32 /var/lib/tftpboot/ cp /etc/dnsmasq.conf /etc/dnsmasq.conf.bck echo "" > /etc/dnsmasq.conf vim /etc/dnsmasq.conf ------------BOF port=0 #no DHCP server log-dhcp # Enable DHCP logging dhcp-range=192.168.178.0,proxy #run as PXE only, no DHCP server dhcp-boot=pxelinux.0 #pxe boot file pxe-service=x86PC,"Network Boot",pxelinux # Provide network boot option called "Network Boot". enable-tftp tftp-root=/var/lib/tftpboot ------------EOF echo "DNSMASQ_EXCEPT=lo" >> /etc/default/dnsmasq service dnsmasq start Source ...

2019-07-31 · 1 min · EK

KVM static IP lease / DHCP config

Power VM down virsh dumpxml $VM_NAME | grep 'mac address' virsh net-list virsh net-edit $NETWORK_NAME #(default?) <dhcp> <range start='192.168.122.100' end='192.168.122.254'/> <host mac='[MAC]' name='vm1' ip='192.168.122.xy'/> ... .. . </dhcp> virsh net-destroy $NETWORK_NAME virsh net-start $NETWORK_NAME Host reboot should be unnecessary… Source

2019-07-31 · 1 min · EK

AlpineLinux autoX, autoRDP, mini img for PXE

apk update vi /etc/apk/repositories ~ add community apk add util-linux vi /etc/inittab ~ from /.../getty /.../ goes to /.../agetty --autologin root --noclear /.../ setup-xorg-base apk add setxkbmap freerdp xterm vi .xinitrc ~ setxkbmap si ~ xterm -hold -e sh /root/status.sh vi /etc/profile.d/startMyX.sh ~ if [ $(tty) == "/dev/tty1" ]; ~ then ~ #add video drivers on the fly, once you have formatted the bootable USB, this is the only way. Cry or laugh? ~ /sbin/apk add xf86-video-openchrome ~ /usr/bin/xinit ~ else ~ echo "Hello!" ~ fi chmod +x /etc/profile.d/startMyX.sh vi status.sh ~ while true; do ~ if pgrep -x "xfreerdp" > /dev/null ~ then ~ echo "works" ~ else ~ bash xterm -e sh /root/freerdp.sh ~ fi ~ sleep 1 ~ done vi freerdp.sh ~ xfreerdp /v:192.168.122.253 /u:administrator /p:mojegeslo123 /f /cert-ignore status check: ...

2019-07-30 · 1 min · EK