Category: Linux

  • Always-on PPPoE but 30 seconds disconnection

    So I have a FTTH internet connection and my ISP uses PPPoE – a rather common configuration. But the ISP resets my connection every 12 hours, possibly for accounting purposes. Now whenever the connection reset was taking place my internet used to vanish for 30 seconds – a very bad situation to be in when…

  • Linux rename network interface using udev rules

    Sometimes it is convenient to have user assigned names to network interfaces – particularly when the MAC address of the interface remains constant but the bus on which it is attached may change because it’s a virtual machine. All that is required to be done is create a file /etc/udev/rules.d/persistent-net.rules : This file used to…

  • Hibernate support on Ubuntu 20.04 with encrypted swap and encrypted root filesystem

    So I installed Ubuntu 20.04 on my laptop with encrypted root filesystem with bcache support since I have a NVME SSD along with the usual hard disk in it. While setting up encrypted root filesystem the installer will not allow you to have unencrypted swap – and the default encrypted swap setup is to use…

  • Cloning a UEFI/GPT Windows 10 installation from HDD to SSD using SystemRescueCD

    So, I had an interesting problem at hand – to transfer a completely working Windows 10 installation from a 1 TB HDD to a 1 TB NVME SSD (Samsung 970 EVO Plus). As someone who has done something of that sort many times, but with Linux based OSes my first thought was if I could…

  • Speeding up PHP CLI applications using OpCache

    I run a few PHP based applications which require background jobs, and I use the usual crond via crontab to run the jobs. PHP has an excellent feature – OpCache which can cache the compiled code in memory to speed up the web applications, where typically the PHP-FPM process is a long running process so…

  • Golang on OpenWRT MIPS

    I have been tracking Golang for quite a while since I came to know about it I guess about 3 years ago primarily because it is very easy to use and build static binaries that just work about anywhere. And no dealing with memory allocation stuff which often lead to frustrations and segmentation fault bugs…

  • Change username and hostname for Ubuntu instances on AWS

    If you have used Ubuntu images on AWS, you might have noticed that the default username of the user on the instance is ‘ubuntu’. And the hostname is dynamically generated according to the public IP. Both of these can be changed using cloud-config supported on Ubuntu images – the config has to be provided in…

  • Using privileged mode (become) in Ansible without a password

    So I was working on automating some stuff using Ansible when the necessity to have password less superuser access came up. A simple way would be adding the ansible management key to the root account itself and allow SSH to root, but allowing ssh to root is usually a bad idea. I tried many things…

  • LXD OpenVSwitch and VLANs

    LXD is a fantastic container virtualization tool that comes by default with Ubuntu. In one of my applications I needed to have many containers each within it’s own VLAN network. So I used OpenVSwitch in combination with LXD to achieve this. There is no inherent facility in LXD to provide VLAN tag numbers to the…

  • Ubuntu 18.04 add e1000e Intel driver to dkms

    Note: The compile process appears to be broken for driver version 3.8.4. So the following steps will not work for that version. This post will be updated when a suitable fix is found for the same. Here’s a quick guide on how to add the Intel e1000e driver to DKMS (Dynamic Kernel Module Support) so…