Fixing DNS problems on Ubuntu 16.04 (zesty)

free software,linux,ubuntu — 29. Oct 2017

Last Saturday, one of our laptops running Ubuntu 16.04 zesty suddenly couldn’t get on the Internet anymore. It connected to the router and could ping IPs, but DNS lookups failed, so no browsing was possible. After researching online, I found out that Ubuntu changed to a new type of DNS resolver (systemd-resolved) in zesty, and this causes issues for some people. It seems we were affected by this, although i have absolutely no idea why the problem surfaced when it did after working just fine for weeks after upgrading to zesty.

Anyway, here are the instructions that ultimately fixed the problem:

  1. find out the current IPs of your ISP’s DNS servers (log in to your router, check tab Internet)
  2. edit resolved.conf

    sudo nano /etc/systemd/resolved.conf

    in the section [Resolve], add the DNS server IPs


    then save and exit.

  3. restart the services with:
    sudo systemctl restart systemd-resolved

    sudo service network-manager restart

‘locate’ on ubuntu with an encrypted home dir

free software,geeky,linux,ubuntu — 5. Oct 2011

recently, i noticed that the locate command on my ubuntu system didn’t work as expected. it simply didn’t list files located in my $HOME dir, while it did still list files in the system directories. it took me a while to figure out that this behaviour was due to the fact that i decided to check the “encrypt home dir” option when i last (re-)installed the OS.

on second thought, it makes sense that it works that way, since the command to update locate‘s database (updatedb.mlocate on ubuntu) is run as a root cronjob, and as such it can’t access the filesystem while it’s encrypted. on the other hand, understanding this requires quite a bit of prior knowledge about how locate works, and i think it’s a bit rough to let the users figure this out all by themselves, without as much as a warning. the situation would be much improved if locate would at least spit out a warning that it can’t access the home dir, instead of the ominous silence, from which we usually conclude that no matching files exist on the disk.

after some googling, i found a good solution for this problem. this guide explains how to set up locate to store a separate, user-specific database inside the encrypted home directory. this also requires a user-specific cronjob. after following that guide, locate once again works just as expected on my system.

matching hard- and software

geeky,linux — 20. May 2009

“If a company designs both hardware and software,
it can build much better systems than if they only design the
software. That’s why Apple’s iPhone is so much better than
Microsoft phones.”

this statement comes from larry ellison, oracle’s CEO, in a recent reuters interview.

what he says is a simple truth, almost trivial, yet it can’t be stressed enough how significant it is. while i personally couldn’t care less about phones, the statement holds of course just as well for desktop / laptop computers. frankly, both windows and linux desktop OSes work crappily on many computers today. you will get devices without proper support, driver issues, incompatibilities between components and all sorts of other problems. and this problem will never go away as long as the hardware and the software are not engineered together. there are literally quintillions of different PC devices / components out there today, and there is just no way any OS could ever support all of them – and all combinations of them – equally well.

the solution, then, is to buy hardware and software that comes from the same company and has been designed to work together. both windows and linux fail in this regard, only apple (and sun) get this right as of today. and this is IMHO the main reason while apple is so successful these days. it’s just not possible to get the same stability and reliability with an OS that is supposed to work “on any PC hardware”.

hopefully, we will get linux computers at some point in the future that are engineered in this way. the company could make money from the hardware, and the software could still be free/open source. i at least would be happy to pay the extra charge.