Posts tagged "linux"
Apache Start Hangs during Reboot of a KVM Virtual Server
Problem: Apache needs very long to start on a virtual server running on a KVM/QEMU virtual maschine. Solution: Apache needs a RNG (random number generator) for startup, probably because of TLS. A pure virtual maschine has no RNG device per default. If you add an RNG device to the virtual maschine configuration, apac...
Sparse Files Howto
Unix file systems like ext3/4 can store files which are partly empty more efficiently by not storing blocks with all zeros. These files are called sparse files. When reading these files every things works as normal but "all zero" blocks don't wast space on the drive. This can be useful for different application. For...
Block Internet per User/Service
If you like to block network access for certain users on a linux box it's as simple as that: /sbin/iptables -I OUTPUT -m owner --uid-ower <USERNAME> -j DROP Username might also be the username of a running service.
APT sources list
Problem: when debian goes from "testing" to "stable" to "oldstable" the package sources change. eg. jessie-updates are remove, same happened to jessie-backports The current file /etc/apt/sources.list for jessie (currently oldstable) could look like this deb http://ftp.debian.org/debian/ jessie main contrib non-free ...
Configure WLAN Statically in Debian/Linux
If you want to configure WLAN settings on a Linux machine statically you can use the normal /etc/network/interfaces configuration method of Debian. For WPA-PSK you can use this 3 steps: Install the "wpasupplicant" package Generate a psk line with "wpa_passphrase" and copy the hex string after "psk=" root@server:~# w...
No Text Console After NVME Storage Upgrade
Problem: After upgrading a system to NVME, Linux boots without textconsole, or sends the text console to the wrong graphics card. Discussion: The NVME upgrade needed to change from BIOS boot to UEFI boot. UEFI boot disables the pure text console, and the kernel uses whatever frame buffer is available, or without tex...
Huawei Mate Book Pro X
I bought a new notebook, and installed a minimal Linux distribution on it. While setting everything up, I put together a collection of configuration files and scripts, and compiled them in this github repository: https://github.com/alexte/mate-book-pro-x-linux-config
New Vim 8 on Debian 9 Stretch has buggy Mouse/Paste/Syntax handling
The new Vim 8 on Debian tries again to appeal to the 95% of the people (the noobs) and adds features the are annoying to professionals. When these new features are buggy it's even worse. Problem: vim 8 on debian 9 has some annoying default settings for vim paste uses a vim internal clipboard instead the system clipb...
Boot ISO from USB Stick
Many Linux distribution builders like Devuan and Debian produce hybrid ISO image that work on discs and USB sticks. You can make bootable USB sticks by simply copying the image to the USB device with this command dd if=isoimage of=/dev/sdX bs=10240 You can find the device name (X) by looking into dmesg oder lsscsi, ...
Source IP Address Based on User
If you want to use different source IP addresses based on the logged in user or running service on a Linux computer you can use these simple commands: /sbin/ifconfig eth0:1 NEW-IP-ADDRESS netmask YOUR-NORMAL-NETMASK /sbin/iptables -t nat -A POSTROUTING -m owner --uid-owner USERNAME -j SNAT --to-source NEW-IP-ADDRESS...