Tag Archives: Linux

Linux and the Speed of Innovation

Although I have been a Linux person since 1995, I have come to like FreeBSD a lot. Primarily because two of my major systems are based on it. As my firewall I have been using pfSense for a number of years, and for storage it is FreeNAS. And both have never let me down, neither in terms of stability nor regarding their functionality.

Now the company behind FreeNAS (iXsystems) has announced a while ago, that they will move to Linux as the underlying operating system for their future core product. I am not sure I welcome this change that much. I can understand that simply for available know-how iXsystems want to do this switch. Plus the hardware vendor support is obviously broader and the community also does their part in testing. But, with some level of exaggeration,  Linux (not the kernel but adjacent things like systemd) has become kind-of the JavaScript framework of *nix systems. What I mean by that is that I personally perceive the rate at which things are re-done as too high for my liking. Just like every year multiple JavaScript frameworks appear that do the same thing as twenty others, just differently.

While there is merit to improving things, stability is often more important. And stability not only means that things work as expected. But also the rate of change is a factor. If a new framework saves me 20% development time that sounds great. But in the enterprise evolution, and by that investment protection, is typically what gets you the much better ROI. Because the 20% development improvement are more than eaten up by effort in other areas (esp. operations).

Microsoft Defender ATP on Linux requires systemd

There seems to be documentation issue with Microsoft Defender ATP for Linux. The system requirements, as far as I can see, do not mention that systemd is needed. I found this on a Debian 9 (Stretch) system that was configured with SysV init. The post-install script of mdatp performs some tests that use the systemctl command, which is of course missing without systemd.

Update: Microsoft has meanwhile confirmed that systemd is indeed required.

Installing ecoDMS 18.09 on Debian 10.5

I had recently installed ecoDMS 18.09 on a Debian 10.5 VM and it was a pleasant experience overall. However, the following things had to be done differently compared to the installation manual

  • Install gnupg via sudo apt-get install gnupg (this seems to be installed out-of-the-box on Ubuntu)
  • Do not install any Java environment but let this be handled by the normal dependency management

The system is currently in light use (still in testing) for my newly founded company and runs quite well. The VM is hosted on ESXi 6 that runs on a Celeron 3900 (yes, two cores) and for a single user with just a few documents stored the performance is really nice.

I so far intend to stay with that system and will keep you updated.

 

Windows 10: Restore Bootloader after Linux Test

I had recently installed Linux in a dual-boot setup on a test machine (an old Lenovo Thinkpad T430). What proved more difficult than in former times was to restore the original state. Most of the recommendations I found online were less than helpful. In particular, many of them ignored the fact that there are two entirely different approaches out there to handle the boot: UEFI and legacy or GPT and MBR respectively. My machine was using MBR (Master Boot Record), given its age.

What finally solved the issue was the following command:

C:\> bootsect /nt60 c: /mbr

I used a USB stick with Windows 10 Installer, but since then learned that you can get to the “repair” console easier, if your Windows 10 still starts. All you need to do is perform the following steps:

  • Log off.
  • When the login screen appears, press a key so that the password field shows up. This will also enable the “power” button in the lower right corner of the screen.
  • Press and hold shift
  • Left-click the power and choose “Restart”
  • Let go of the shift key and the repair menu appears.
  • Go to Troubleshoot > Advanced options > Command Line

New Notebook

After more than seven years my beloved MacBook Pro 15″ (late 2011) has died the GPU death. Before that I have had at least three replacement motherboards, the first after less than 24 hours of owning the thing. All these replacements were free-of-charge and without any hassle. So no complaints from that end. But given Apple’s abysmal product strategy in recent years, and particularly the butterfly keyboard, it was no option to buy a MacBook again.

To be clear on the keyboard topic: My primary objection against the butterfly keyboard is not its reliability, or lack thereof. For me it is simply a very bad keyboard with its short-travel keys. Yes, I am lucky to own an original IBM Model M and that sets a very high bar. But there are quite a few people I know who share that verdict.

Another factor not in favor of Apple was its pricing strategy and the fact that repair is next to impossible. Why would I want to spend enormous amounts of money (approximately EUR 3.500 for what I want) on a machine that cannot be repaired, upgraded, and is thermally constrained anyway? And quite honestly, with all the systematic product issue that existed for more than a decade, why would I believe this has changed?

I still own a Mac Mini from 2011 but it is months that I last used it. And after a number of years when I was really(!) happy with MacOS, I am finally departing from the latter. Overall, I got the impression that the management folks of Apple are going though the “harvesting” phase, where bean-counters have taken the reign after the founder(s) were gone. The same has happened to Hewlett-Packard, which I have had the privilege to work for many years ago. They, as so many others, had the same problem: People at the helm that do not really understand the business, but just apply methods they learned at business school. And for a number of years that works. Until it does not anymore …

So I ended up in the Windows camp, again. While Linux is my OS of choice on the back-end/server side, it has been failing to convince me for the desktop for the last 24 years. Yes, I started using Linux in 1995. And for special purposes I have used it on the desktop, usually via X11, where it made sense to me. In the 1990s that was technical development as well as authoring papers for university with LaTeX. And while a recent attempt, using KDE Neon, showed great improvements, there are still too many things that simply work better for me in Windows.

As to the actual notebook, I was pointed to the Razer Blade 15 (2018 base model) from various YouTube videos. It is a great machine and I had gotten a pretty good deal on Amazon for it. Everything was great – but the keyboard. The latter is something you can find mentioned in a number of reviews, but I must admit that I had underestimated it greatly. This is really sad, because otherwise it would have been the perfect machine for me. So where did I end up instead as keyboard afficionado?

Yes, a Thinkpad T model. What else! More precisely a Thinkpad T490 with a full-HD display, 16 GB of RAM and a 1 TB SSD. This blog post is actually the first one written on the T490 and the keyboard is an absolute treat. What drove IBM to sell this part of the business to Lenovo? Oh yes, the harvesting phase ;-).

Displaying Your Terminal Sessions

We are used to terminal sessions displayed like any other content, i.e. as a video of some kind. The latter comes with two caveats, though. It uses a lot of bandwidth (compared to the actual terminal session) and is often difficult to read. Because many people do not bother to magnify the terminal either during the actual presentation or as part of the post-processing.

A very interesting alternative, especially for blog posts, is asciinema. It works on Linux, macOS and various BSD flavors. What it basically does is open a special shell (Bash-like) that simply records all keystrokes (plus the responses) in a VT-100 compatible format. So you end up with a small text file that can be replayed using a JavaScript snippet.

In addition to using the hosted instance, that supports sharing in multiple ways, you can also run your own server via Docker. For all the details, please go to the website.

Linux and Me

Although it is not a focal point of my professional live any more, Linux and I share a long common history. My first encounter was with “S.u.S.E. Linux August 1995″ (kernel 1.1.12) in October or November of 1995. Until then I had only played around a bit with MINIX 1.5 on a  80286-based PC. But it had been a bit of a disappointment for me and I never really got into things.

This changed dramatically with Linux. I spent many hours trying to get a setup with X11 (only FVWM2 was available as window manager then) to work. This was not as easy as today. There was no, or very little, support from YaST, the setup tool of SuSE. And one had to be careful with the monitor (CRT of course) configuration. Because too high frequencies could physically damage your monitor. I never used the system to actually perform any work, it was solely for learning.

This changed with SuSE 4.4 and even more so with SuSE 6.1. I do not remember the exact dates, but SuSE 6.1 was installed in late 1997 when I ran my own small company as a “side-project” to my university studies. But since the company was highly successful, I soon used things like HylaFax on Linux and of course also ran my local mail server (sendmail can be a challenge, especially when Google does not exist yet). There even was a dial-in modem for terminal connections.

What I always disliked about SuSE, was that the updates from one version to another never really worked for me. So in about 2002 I finally decided to switch to Debian Woody (3.0). That was again a learning curve, but the apt packaging system was vastly superior to what I had seen on SuSE before and I never had problems with upgrades. The experience gained then is also quite helpful these days for the Raspberry Pi.

Things continued with CentOS, Fedora, and Ubuntu – with the last two powering my company notebook for a short while back in 2008. But the experience was mixed and I never liked Linux as a general-purpose desktop operating system. I had used it extensively for writing LaTeX documents (using Xfig a lot for diagrams) during my university time. But other than that, for too many Windows (or later Mac) applications I never found a proper replacement.

But for servers Linux is definitely my preferred OS. And especially so because most of the innovations of the last years, like configuration management systems (e.g. Chef, Puppet, Ansible) and containers (e.g. Docker), came to live on Linux.

Ubiquity Networks Unify Controller on Raspberry Pi: Startup exits with RC=1

As mentioned in My WiFi Setup with Ubiquiti Networks UAP-AC-PRO I run the Unify Controller software on a Raspberry Pi 3. There is a ready-made package available for Debian and Ubuntu Linux, that can easily be used for this and I have been doing so for more than a year.

Just a yesterday, though, I broke things by overdoing it a bit with the removal of unneeded software from the Raspberry Pi. Through some “chain” the Unifi Controller had been removed and after re-installation it did not work anymore. Instead I saw a constant CPU utilization of an entire core by Java and also errors in /var/log/unifi/server.log :

[2017-12-26 13:07:04,783] <launcher> INFO system - *** Running for the first time, creating identity ***
[2017-12-26 13:07:04,791] <launcher> INFO system - UUID: yyyyyyy-yyyy-yyyy-yyyyyy-yyyyyyy
[2017-12-26 13:07:04,817] <launcher> INFO system - ======================================================================
[2017-12-26 13:07:04,819] <launcher> INFO system - UniFi 5.6.26 (build atag_5.6.26_10236 - release) is started
[2017-12-26 13:07:04,819] <launcher> INFO system - ======================================================================
[2017-12-26 13:07:04,867] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2017-12-26 13:07:05,057] <launcher> INFO system - Current System IP: xxx.xxx.xxx.xxx
[2017-12-26 13:07:05,059] <launcher> INFO system - Hostname: zzzz
[2017-12-26 13:07:05,071] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2017-12-26 13:07:05,072] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
[2017-12-26 13:08:33,574] <launcher> INFO system - Certificate[UniFi] generated!
[2017-12-26 13:08:53,004] <UniFi> ERROR system - [exec] error, rc=1

The last couple of lines were showing up repeatedly, so obviously the system tried to restart over and over again. When you search the Internet for this problem, you will find out that you are not alone. Most solutions address available memory and not all people succeed with the various approaches to increase it (typically by removing memory from graphics and increasing swap space).

What I realized was that most discussions were for older versions and a recurring theme was that things changed between minor versions. So something that had worked for v5.6.19 did not necessarily work for v5.6.22 and vice versa. Also, changes to how Java was dealt with were mentioned quite often. Running Java-based applications on Linux can be somewhat delicate, so I do not blame the folks at Ubiquity Networks for that.

This was when I realized that the JVM on my system had changed. Before the accidental cleanup I had used the Oracle 8 JVM that gets installed via the Debian package oracle-java8-jdk. So I re-installed the latter and configured it as the default JVM via

sudo apt-get install oracle-java8-jdk
sudo update-alternatives --config java

This solved my problems instantly and things are up and running again.

Watching Log Files on Linux/Unix

Most people I come across use tail -f fileName to watch files. The drawback, however, is that for a closer inspection of something I had just seen, I have to abort this and change to some file viewer (where I first need to find again what I want to check). So why not use a single program that can do both things? less fileName does this for you. What many seem to be unaware of, is that less has a built-in tail mode that can be activated with Shift-F and left with Control-C. Once back in normal view mode again, it is very easy to scroll up a few lines and inspect the interesting part of the file. And once finished, you can just press Shift-F again and are back to tail mode.