2 January 2022

Apple fix low battery warning in iOS Facetime

Noticed this since at least iOS 14 that FaceTime does not warn about low battery when using it in landscape mode. None of the instructions appear (at 20% or 10%). It has not been fixed in the several updates of iOS version 14 and now iOS 15 has already reached 15.2 and the bug still exists! Fix this Apple, this isn't something that is  difficult to fix.

20 November 2021

Wemo WSP080 smart plug - how to reset

Playing around with a Wemo WSP080 smart plug (connected in a HomeAssistant+HomeKit Integration on a RaspberryPi Zero W(see note below) and iPhone/Home application for control) recently required a reset as it was not being detected. With just a single button and no documentation in package to reset it, I looked for the procedure on Belkin website. Tried the steps a few times but was unsuccessful. After multiple tries, finally discovered that the documentation has a typo. Here is the correct process:

How to factory restore your Wemo Smart Plug
Step 1: Unplug any devices from your Wemo and then unplug it from the power outlet.

Step 2:  Wait 5 seconds and then hold down the power button on the top of the unit and plug it back in.

Step 3:  Continue to hold the power button down until the status light begins flashing turns solid orange rapidly.  This will take about 5 seconds.

Step 4: Once the status light begins flashing turns solid orange rapidly, release the power button.  Your Wemo will perform a factory restore and reboot.  When the factory restore is complete, the status light will flash orange and white.

Note: It is not recommended to install HomeAssistant on a RaspberryPi Zero W. The installation process requires editing some files on the microSD card so that it can connect to the wireless network when it boots. After booting, it might take up to an hour before it gets ready for you to continue with the configuration in the browser. I suggest to use RaspberryPi 3 or later for the installation.

4 September 2021

Upgrading to Debian 11 (bullseye) - sources.list

Debian GNU/Linux 11 (bullseye) was released 14 August 2021. I have upgraded 3 servers to the latest  version and the upgrade experience has been quite smooth. The one thing which is missing from the Debian upgrade instructions is the security updates line for bullseye in sources.list. Normally, you would have the following line in your /etc/apt/sources.list

deb http://security.debian.org/debian-security stretch/updates main

Change it to the following before doing apt update:

deb http://security.debian.org/debian-security bullseye-security main

Ref: Debian 11 Errata

27 August 2021

Reduce /boot usage by decreasing initrd image size

 I had noticed that every time there was a new kernel being installed on my Asus EeeBox PC EB1033, it always failed due to lack of free disk space on /boot. The /boot partition is 232 MB in size and it couldn't fit 3 versions of the kernel (Ubuntu 18.04.5 LTS). Earlier, I had used the easy way out of manually uninstalling the older unused kernel and then installing the newer one. In normal circumstances, the newer kernel should get installed and then an apt autoremove should uninstall the oldest kernel (2 kernels are kept). When I noticed that the initrd image files on my Debian Unstable desktop were just 11 MB, I sat down and fixed the issue.

The main problem was that the kernel's initrd image file in /boot was being generated during the install process with all possible modules, even the ones which the hardware or I didn't need.

Before you make any changes, get a list of the modules which are currently loaded on your running system using:

$> sudo lsmod > modulesLoaded.before

and backup your configuration files

$> tar cf initramfs-tools.tar /etc/initramfs-tools

The main changes that are required are in /etc/initrd-tools/initramfs.conf. But as suggested in initramfs.conf manual, the changes will be done in /etc/initrd-tools/conf.d/ directory.

Size of initrd image files before changes

eeepc@eeepc:~$ ls -lh /boot/initrd.img-4.15.0-15*
-rw-r--r-- 1 root root 63M Aug 22 20:42 /boot/initrd.img-4.15.0-153-generic
-rw-r--r-- 1 root root 63M Aug 22 20:43 /boot/initrd.img-4.15.0-154-generic

After adding file loadmods in /etc/initrd-tools/conf.d/  with content MODULES=dep (default is most):

eeepc@eeepc:~$ sudo update-initramfs -u -k 4.15.0-154-generic
eeepc@eeepc:~$ ls -lh /boot/initrd.img-4.15.0-15*
-rw-r--r-- 1 root root 63M Aug 22 20:42 /boot/initrd.img-4.15.0-153-generic
-rw-r--r-- 1 root root 31M Aug 22 20:47 /boot/initrd.img-4.15.0-154-generic

After adding file compression in /etc/initrd-tools/conf.d/ with content COMPRESS=xz (default is gzip)

eeepc@eeepc:~$ sudo update-initramfs -u -k 4.15.0-154-generic
eeepc@eeepc:~$ ls -lh /boot/initrd.img-4.15.0-15*
-rw-r--r-- 1 root root 63M Aug 22 20:42 /boot/initrd.img-4.15.0-153-generic
-rw-r--r-- 1 root root 20M Aug 22 20:50 /boot/initrd.img-4.15.0-154-generic

That gives us a total reduction of 43 MB (68.25%) by using just two options.

Run sudo update-grub to apply changes and restart using the new kernel and compare the list of modules loaded with the original list that we saved before making changes. Check hardware functionality, e.g. video, networking, sound, etc. If you want to load some modules which you need (e.g. msdos, ntfs, etc.), just add the list to /etc/initrd-tools/modules file.

To regenerate the initrd image file for all kernels, use the following command:

sudo update-initramfs -u -k all && sudo update grub

Reference and files:

  1. initramfs-tools.conf manual
  2. /etc/initramfs-tools/conf.d/ directory
  3. /etc/initramfs-tools/modules file

31 July 2021

EEEPC fan and sensor data

Recently I had done a fan tuneup for my Asus EeeBox PC EB 1033 and it had been performing quite well with almost no fan noise audible from 8-10 feet. However, while watching an old video the screen suddenly went black and after a few seconds the TV indicated no signal on the input! On checking, I noticed that the PC had shutdown and its case felt quite hot. I started it up again and checked the syslog. It showed multiple occurrences of "CPU0: Core temperature above threshold, cpu clock throttled (total events = 3354588)" and sensors command output showed that CPU temperature was rising.

I shut down the PC and opened it up. Components were still hot, so I cooled them down by blowing compressed air on them. Then I checked the fan and it was difficult to rotate it. Last time I had put some WD-40 on the spindle and it wasn't a good idea. This time I cleaned up the fan spindle and put some lithium grease on it and it was rotating normally again. After the second fan tuneup, the PC was running with normal CPU temperatures (around 50°C). Phew! Critical issue handled.

One thing that I noticed was that the "cpu_fan" indicated 0 RPM speed even though I knew it was running normally. The EeeBox PC EB1033 has an nct6776 chip which does the sensing and even though the modules nct6776 and coretemp were loaded in the kernel, sensors command showed the following:

 ~$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +48.0°C  (crit = +100.0°C)
Core 1:       +48.0°C  (crit = +100.0°C)

asus-isa-0000
Adapter: ISA adapter
cpu_fan:        0 RPM

 Perusing multiple posts regarding lm-sensors behaviour for ASUS motherboards for reporting sensors data, I finally found a post about showing all fans' sensors data. All that was required was adding the following line in /etc/default/grub and then running update-grub.

# This allows fan usage to be read by lm-sensors
GRUB_CMDLINE_LINUX="acpi_enforce_resources=lax" 

The output of sensors command after rebooting the machine:

~$ sensors
asus-isa-0000
Adapter: ISA adapter
cpu_fan:        0 RPM

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +49.0°C  (crit = +100.0°C)
Core 1:       +50.0°C  (crit = +100.0°C)

nct6776-isa-0290
Adapter: ISA adapter
Vcore:          +1.21 V  (min =  +0.00 V, max =  +1.74 V)
in1:            +1.57 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
AVCC:           +3.39 V  (min =  +2.98 V, max =  +3.63 V)
+3.3V:          +3.38 V  (min =  +2.98 V, max =  +3.63 V)
in4:            +1.83 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:            +0.00 V  (min =  +0.00 V, max =  +0.00 V)
in6:            +0.66 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
3VSB:           +3.33 V  (min =  +2.98 V, max =  +3.63 V)
Vbat:           +3.33 V  (min =  +2.70 V, max =  +3.63 V)
CPU Fan:       3835 RPM  (min =    0 RPM)
SYSTIN:         +55.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPUTIN:         +55.0°C  (high = +98.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN:         +45.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
PCH_CHIP_TEMP:   +0.0°C  
PCH_CPU_TEMP:    +0.0°C  
PCH_MCH_TEMP:    +0.0°C  
cpu0_vid:      +0.000 V
intrusion0:    ALARM
intrusion1:    OK
beep_enable:   disabled 

Voila! Now I can better monitor the PC hardware in case of abnormal behaviour.

Package required: lm-sensors

17 June 2021

NetBackup 9.1 and new services user

Veritas NetBackup® 9.1 was released earlier this month with several new features like full support for backup and restore of Kubernetes, backup anomaly detection using AI/ML, non-privileged user for NetBackup services, etc. You can read about the new features in detail in the NetBackup 9.1 Release Notes guide.

Before an upgrade, it is recommended to perform a catalog backup. The catalog backup generates a DR package and a DR file. In case you are duplicating your catalog backups, which you should, and during the catalog backup if your duplication/SLPs are disabled, the duplication jobs will fail after the upgrade with status: (9202) The service user account does not have the write permissions on the specified path. 

This happens even if you have setup the permissions for the new non-privileged user for NetBackup services properly. Reason being that before upgrade, the catalog backup process created files with root:root privileges and after upgrade, the duplication job tries to update the DR file (.drpkg) with non-privileged credentials and it fails.

Solution: After upgrade, before enabling duplication jobs/SLPs, change ownership of DR file in recovery location to new non-privileged user's username.

30 April 2021

Noisy EEPC fan

I have an Asus Eee Box PC 1033 connected to my TV via HDMI and it runs Kodi. Even though I do clean this mini PC regularly, it was making a loud hum since the last couple of days. Thinking it might be getting too hot, I checked the temperature using sensors command it showed normal temperatures.

~$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +49.0°C  (crit = +100.0°C)
Core 1:       +49.0°C  (crit = +100.0°C)

Then I opened up the cover and booted it. Right from the start, the hum was there and as temperature doesn't go up that fast, I focused on the heat sink and cooling fan assembly. I unscrewed the 7 screws (2 each for heat source of the heat-sink, and 3 for fan housing). The fan was a DC Brushless Model KSB0505HB - found in many laptops. After removing the cover on the fan and removing the rotating blades, all that was required was cleaning the axle of the blades and adding some lubrication to it. 

Closed up the fan cover, and screwed the heat sink and fan assembly back in its place. After booting the PC, the hum of the fan was back to normal levels and temperatures were a bit down too as I took the opportunity to put some new thermal paste on CPU and GPU chip.

In case you want to do similar job to your PC fans, a quick YouTube search and review of those videos will help you.

25 April 2021

Fixing DVD/CD drive which won't open

I fixed my DVD drive in my PC today. It had not been used for a long time (3+ years) and was originally purchased in 2010, if I remember correctly.

Issue: DVD drive would not open using eject command or the eject button on the drive.
Behaviour: When using eject command or button, the drive makes a "thud" kind of sound and then tries other things to test what is loaded and the busy indicator LED stops blinking after several seconds. Physical ejection of the tray works fine.

TL;DR: Change drive tray eject pulley belt.

After searching various forums and trying out different flags with the eject command, I saw this post and I thought I might as well give it a shot as the software eject methods had failed. Also, it was an excuse to shutdown the PC and give a thorough spring cleaning.

While I forgot to take the pictures of the work done, it isn't that difficult to perform. The LG DVD drive just had 4 screws at the bottom and three locking wedges for the face place. Once the 4 screws were taken off, the bottom plate came out easily by lifting it from the back and the easily taking it off from the bottom wedge. Next was the face plate which I tried to take out by unlocking the 2 side-wedges but it was not coming out easily. Then, I thought to ejecting the try out manually first - I used a straightened paper clip to push in the "eject hole" of the drive. When I tried opening the face place with the tray out, it came out easily.

At this point I was thinking of disconnecting various connections to remove the large circuit board that I could see but I realized by chance that the whole mechanism could come out without disconnecting the mother board. Removing the drive mechanism and turning it around - top part on top, showed me the motor and pulley for the drive tray.

I touched the drive belt and it did not have the softness that one would expect from a rubber belt. When I tried to move the pulley, it did not reliable move the belt along with it. This indicated that the required tension was not there and also the friction between pulley plastic and belt had reduced due to aging.

I replaced the belt with a rubber band of slightly smaller size that the pulley itself. Tests by rotating the pulley were successful. So were the eject commands after reassembly of the DVD drive. The DVD drive is working normally now.

13 June 2018

Mechanical Keyboards: daskeyboard & DURGOD backlit

Recently, a couple of my keyboard's keys died. I tried the normal cleaning but they wouldn't work. They keyboard was a heavy HP keyboard and lasted more than a decade. I was not the original owner, so can't say how old it was. So, I was on the lookout for a new keyboard which would give me a feeling of proper keyboard and also last long enough. A few searches later, I noticed the mechanical keyboards. They have a proper mechanical switch rather than the standard rubber dome type contacts.

Switches for mechanical keyboards come in many different specifications and are usually defined by a colour. The most common and well respected brand for switches is Cherry MX. There are some other brands which maybe equivalent or just cheap knock-offs of the Cherry MX switches. Personally, I don't have any experience for non-Cherry MX switches for now.

For details on different type of Cherry MX switches, a good place to start is An Introduction to Cherry MX mechanical switches. Also, to read more about the manufacturer, see Wikipedia article.

After a few days of research, I went with the following:
  1. Home - DasKeyboard 4 Professional with Cherry MX Brown switches $150 USD
  2. Work - DURGOD Mechanical Keyboard (backlit) with Cherry MX Blue switches $129 CAD
 The DasKeyboard's Cherry MX brown switches (non-clicky, tactile) are smooth and don't require too much force to actuate, hence making it easy on the fingers. The Cherry MX Browns are rated at 50 million actuation, so will definitely last a long time. The build quality of the DasKeyboard 4 Professional is high quality too. It is relatively heavy due to the aluminum plate it supports - also helps it being more stable. Although the USB cable is not removable, it does support USB3.0 pass-through with two ports available on the keyboard for easy access. Last but not the least, the keyboard worked out of the box with a Debian/Unstable box including all multimedia buttons available on it.

Trying to keep the budget lower and also to try out the Cherry MX Blue switches (clicky, tactile), I went with a Chinese brand, DURGOD, model K320G87BL-LED. The blue switches are definitely clickety in nature and produce quite a bit of clicking sound which may annoy your coworkers. Hence the reason that people suggest not to use those in a open work environment. They keyboard is on the heavier side but a little lighter than the DasKeyboard 4 Professional. Its USB cable is removable and the connection type is USB-C! Can be used with modern Android smartphones too.

One thing common in both they keyboards is the typing experience. If you touch-type without looking at the keyboard, you will either see lesser mistakes while typing or a slight increase in speed. With practice, you can improve on both easily with a mechanical speed. The NKRO feature helps when you are typing really fast or playing a game. A traditional keyboard will not register the keys in correct order in these situations.

There is a whole world around mechanical keyboards. You can build your own by buying parts (frame, plate, circuit board, switches, etc.), or change the key caps with a coloured set or better quality plastic e.g. PBT or ABS. A good place to start, https://www.reddit.com/r/MechanicalKeyboards/ There are ton of  reviews of mechanical keyboards, sounds the switches make, etc. on Youtube.

If you have questions or comments about these two keyboards, post below.

21 May 2018

pfSense 2.4.3_1 upgrade might fail at first attempt

If you have not upgraded your pfSense to the latest version (read release announcement for details on what was fixed: 2.4.3_1 released 14 May 2018), just be aware that there might be a hiccup during the upgrade. The upgrade fails with the interface showing the following:
My pfSense instance gave the above message and also the following in the system log:
May 21 19:20:10     php-fpm     61392     /index.php: Successful login for user 'admin' from: 192.168.34.12
May 21 19:22:33     check_reload_status         Syncing firewall
May 21 19:22:35     pkg-static         pfSense-upgrade upgraded: 0.42 -> 0.45
May 21 19:22:48     check_reload_status         Reloading filter
May 21 19:22:48     check_reload_status         Starting packages
May 21 19:22:49     php-fpm     61392     /rc.start_packages: Restarting/Starting all packages.
 


I opened another tab in the browser and checked the pfSense GUI, and it still showed the old version. As per the release announcement, run the following command to refresh repository configuration:

pkg-static clean -ay; pkg-static install -fy pkg pfSense-repo pfSense-upgrade

and attempt an upgrade again. The second attempt has been reported to be successful most of the times. The issue is logged as a bug already.

Note: As always, before upgrade, take a backup of your configuration. Also, in case you are running pfSense in a virtual environment, take a snapshot before upgrade so that you can easily revert in case something happens that cannot be fixed.

19 May 2018

Install Wordpress on Debian "The Debian way"

There are quite a few websites with instructions on how to install the "LEMP" {Linux,(E)Nginx, MariaDB, PHP}. A simple search brings in a few on the first page of results, so I won't list any links here.

Installing nginx, mariadb and php on Linux is quite straight forward and nicely documented in several of those pages. However, they all end with the following to install Wordpress using something like:

$ wget https://wordpress.org/latest.tar.gz


i.e. downloading it directly from wordpress.org. I use Debian on my servers and prefer to install packages using Debian's native package manager, apt. This way, they get all security updates using a single command.

So, I thought why not try to install Wordpress "The Debian way". My attempt to do that showed that it requires apache2 and some other apache2 modules too! This was odd when nginx-full, which provides httpd, was already installed.

user1@debian$ sudo apt install wordpress
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following additional packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils javascript-common libao-common libao4
  libapache2-mod-php libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libflac8 libjs-cropper libjs-prototype libjs-scriptaculous liblua5.2-0 libogg0
  libphp-phpmailer libspeex1 libvorbis0a libvorbisenc2 libvorbisfile3 php-gd php-getid3 php7.0-gd
  ssl-cert vorbis-tools wordpress-l10n wordpress-theme-twentyseventeen
Suggested packages:
  www-browser apache2-doc apache2-suexec-pristine | apache2-suexec-custom libasound2 libaudio2
  libesd0 | libesd-alsa0 libpulse0 libsndio6.1 php-pear php-league-oauth2-client
  php-league-oauth2-google speex openssl-blacklist php-ssh2
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils javascript-common libao-common libao4
  libapache2-mod-php libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libflac8 libjs-cropper libjs-prototype libjs-scriptaculous liblua5.2-0 libogg0
  libphp-phpmailer libspeex1 libvorbis0a libvorbisenc2 libvorbisfile3 php-gd php-getid3 php7.0-gd
  ssl-cert vorbis-tools wordpress wordpress-l10n wordpress-theme-twentyseventeen
0 upgraded, 32 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.3 MB of archives.
After this operation, 71.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort!


If you look at Wordpress package details (apt show wordpress), it depends on "libapache2-mod-php or libapach2-mod-php5 or php or php5". Also, when installing php, we installed packages specifically php-fpm and php-mysql, it didn't install the packages php or php5. As the dependency list has libapache2-mod-php listed first, it asks for other dependent packages which inturn recommend apache2. To fix this, install package php and then install wordpress, and no apache2 packages will be required.

user1@debian$ sudo apt-get install php wordpress       
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following additional packages will be installed:
  javascript-common libao-common libao4 libflac8 libjs-cropper libjs-prototype libjs-scriptaculous
  libogg0 libphp-phpmailer libspeex1 libvorbis0a libvorbisenc2 libvorbisfile3 php-gd php-getid3
  php7.0 php7.0-gd vorbis-tools wordpress-l10n wordpress-theme-twentyseventeen
Suggested packages:
  libasound2 libaudio2 libesd0 | libesd-alsa0 libpulse0 libsndio6.1 php-league-oauth2-client
  php-league-oauth2-google speex php-ssh2
The following NEW packages will be installed:
  javascript-common libao-common libao4 libflac8 libjs-cropper libjs-prototype libjs-scriptaculous
  libogg0 libphp-phpmailer libspeex1 libvorbis0a libvorbisenc2 libvorbisfile3 php php-gd
  php-getid3 php7.0 php7.0-gd vorbis-tools wordpress wordpress-l10n
  wordpress-theme-twentyseventeen
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.0 MB of archives.
After this operation, 59.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]


You can continue with the rest of the configuration of Wordpress with help from https://wiki.debian.org/WordPress (configuration steps to be posted). Oh, and don't forget to setup HTTPS using certbot to use the SSL certificates from Let's Encrypt.

* the investigation several searches on the web, but the only place where I got helpful information was the good old lists.debian.org.

Note: all this was on a Debian 8.0/Stretch VM

6 May 2018

XCP-ng Center works!

After the transition to XCP-ng, the free/libre edition, of xenserver, I installed XCP-ng Center, the free version of XenCenter to manage the xenserver. However, it failed to load using either the portable version or the installer version.

It turns out that the VM (on my desktop) that I was using to run XenCenter 7.0 was too old and did not have the required .NET Framework version (installer never indicated that .NET install was missing). That Windows 7 VM was only used when I wanted to manage the xenserver and then just shut down. So it was not even getting any updates since it was installed in 2016.

By chance, I thought of trying on another Windows 7 VM which I use just for browsing and there the installer asked to install .NET Framework 4.0 and 4.5 (installed 4.7.2). After that, XCP-ng Center 7.4 is working as expected with all features enabled.


5 May 2018

Install XCP-ng 7.4.1 without lossing VMs on local disk

Recently, my xenserver (v7.0) dom0 had been experiencing ballooning of the memory used and pFsense, which handles routing, runs in the virutal environment, my local networking stopped and so did access to Internet. I have also been following the XCP-ng project and waiting for their release. The XCP-ng 7.4.0 was the first release (out 31 March 2018) but as being the very first one, I had decided to wait.

With the recent memory issue rearing its head multiple times in the last month, I checked the XCP-ng project for update and was pleasently surprised to see that version 7.4.1 was out. I downloaded the iso and dumped it on a usb stick using:

dd if=XCP-ng_7.4.1.iso of=/dev/sdX bs=8M status=progress oflag=direct

At this stage the installer disk was ready. I wanted to do a clean install, but did not want to loose my VMs which were on a separate SSD in the VM host server. I searched the web and found an article which matched what I wanted. Link: https://support.citrix.com/article/CTX136342

Read warning in  step 3 in the above article. My case was upgrading from 7.0 from pre-6.5 partioning scheme of xenserver. So, in my case it would have destroyed my local storage repository (SR) but the local SR was on a seprate data disk and it was safe. Next important thing to note is to not choose any disk for Virtual Machine storage (step 4). Rest was smooth sailing for the install.

Post-install, I skipped step 9 as my local SR was not on the OS disk. Followed the rest of the steps without any issue except that the xe pbd-plug (step 15) failed:

[root@xen1 ~]# xe pbd-plug uuid=73b3a9f5-998e-bd19-3d0e-b1085cd114fc      
Error code: SR_BACKEND_FAILURE_47
Error parameters: , The SR is not available [opterr=no such volume group: VG_XenStorage-627ed824-d806-7533-aa72-044f31b918a6],


It took some time to search on the web but the problem came out to be something quite simple: step 11 command for xe sr-introduce should have contained the option "type=ext" instead of "type=lvm":

# xe sr-introduce uuid=39baf126-a535-549f-58d6-feeda55f7801 type=ext name-label=”Local storage” content-type=user
I performed the remaining steps to plug the PBD and then used the instructions to restore the metadata. The VMs were there as earlier (check with xe vm-list)

Now the system is running the free version of xenserver, XCP-ng with all features. Next on the list is to get XCP-ng Center working. For now it crashes upon start when run on a Windows 7 machine.

29 April 2018

Mozilla Firefox sends user data

Mozilla  Firefox is one of the top 3 most popular browsers used by users all over the world. Mozilla is among the organizations that have influenced the WWW in the past two decades in the direction of open and accessible web. Their most popular product is the web browser Firefox, the browser which broke the dominance of Internet Explorer about 10 years ago. Firefox's user base might have declined in the last few years with Google Chrome taking the top spot, however, it still is a safe option to browsing the WWW while being of the the fastest and least resource hungry web browsers.

During the recent Facebook and CA revelations of leaking data of users, I went over my own browser settings to verify that the options were set as to keep me safe and let our minimum amount of user data. For those who want to keep their own data safe while browsing using Firefox, the best is to disable data collection done by Firefox by going to Preferences > Privacy & Security > Firefox Data Collection & Use - and uncheck the two options as shown below:


Mozilla should work for the "Opt-in" option to be implemented for data sharing rather that the ubiquitous default of data sharing enabled and users having to "opt-out" to stop the data sharing.

PS: default settings from Firefox 59.0.2 on LMDE 2, with default options similar in Windows and MacOS builds.

24 October 2016

CloudAtCost - performance update

The sage continues regarding CloudAtCost VM. In the earlier post, I detailed the the DNS response sluggishness, VM console performance and dial-up-speed like feeling when downloading updates from a Debian mirror.

Fast forward a few months, and my VM has been unresponsive almost every day with the sole option of rebooting it from the console. I opened a ticket on 12th of Oct and no response whatsoever from them till now!

6 June 2016

Buying a real Japanese knife

Recently, I was looking for a Japanese knife made of VG-10 carbon steel, santoku or gyuto, 7"-9", and preferably damascus steel. I had bought one a few years ago as a present from Paul's Finest website and it was a good purchase. This time I was looking around at different websites and as I'm not a chef, I didn't want to spend too much on a knife.

I found an interesting series of knives labeled Japanese knives. The prices were very attractive along with VG10 steel, multiple layers, and pakkawood handles. However, these knives are not "Made in Japan" by a master knife craftsman. The details indicate that they are made with Japanese top grade steel (imported from Japan)!

So, when choosing to buy a real Japanese knife, it is very important to do your research as a good knife made by a Japanese master craftsman will stay with you for life (provided you sharpen the edge regularly). A good knife is an investment, so budget accordingly. Good places to go and learn about Japanese knife for beginners: Reddit Cooking, Reddit knifes, GlobeandMail article, blade types, about steels, knife sharpening basics.

PS: I'm waiting for the Hattori san's Santoku or Gyuto to become available.

5 June 2016

CloudAtCost - VM performance pathetic

I had bought a VM (with one-time billing) last year in October. The price was the main attraction, $28. Also, it was not really for any kind of serious work.

However, over time the conclusion has been that the performance in general is pathetic. SSH login prompt takes about a minute or so to ask for password. This could be due to other issues, e.g. DNS response, so I thought it might be a one-time think i.e. at login only. However, the minute you are logged in to the console, simple commands like ls, uname, hostname, etc. take a few 10s of seconds to provide any kind of output.

Today has been the worst though. An apt update command took several minutes to get the updates from a us.debian.org repository, and apt upgrade command downloaded files at almost "dial-up era" speeds.
Get:24 http://http.us.debian.org/debian/ stable/main libxapian22 amd64 1.2.19-1+deb8u1 [983 kB]
Get:25 http://http.us.debian.org/debian/ stable/main openssl amd64 1.0.1t-1+deb8u2 [664 kB]
Fetched 49.7 MB in 12min 9s (68.2 kB/s)
Reading changelogs... Done
Preconfiguring packages ...


To top it all, was the error message below:
Message from syslogd@cacVM at Jun 5 17:07:31 ...
kernel:[2320366.614749] BUG: soft lockup - CPU#1 stuck for 22s! [mandb:1286]


SSH connection started at: 16:08:36
APT update and upgrade staus now 17:37:00
Progress: [ 52%] [###########################.........................]

Update:
Here are three commands run on the clouldatcost(CAC) VM compared to the same commands run on a VM on a homebrew Xenserver host.



CommandCAC VM outputxen VM output
~$ time dateSun Jun 5 23:06:11 EDT 2016

real 0m3.468s
user 0m1.296s
sys 0m2.136s
Sun Jun 5 23:12:15 EDT 2016

real 0m0.002s
user 0m0.000s
sys 0m0.000s
~$ time uname -aLinux cacGuest 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06) x86_64 GNU/Linux

real 0m6.387s
user 0m1.372s
sys 0m4.360s
Linux xenGuest 4.5.0-2-amd64 #1 SMP Debian 4.5.5-1 (2016-05-29) x86_64 GNU/Linux

real 0m0.002s
user 0m0.004s
sys 0m0.000s
~$ time host google.comgoogle.com has address 172.217.2.142
google.com has IPv6 address 2607:f8b0:400b:80b::200e
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.

real 2m9.744s
user 0m8.400s
sys 0m51.124s
google.com has address 172.217.3.142
google.com has IPv6 address 2607:f8b0:400b:806::200e
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.

real 0m0.550s
user 0m0.024s
sys 0m0.008s

2 June 2016

Waiting for pfSense appliance

Can't wait for the in-development μFW appliance for pfSense. It is expected to be out in 2016 Q3 i.e. as early as July! Here is a image of the product that pfSense devs have been teasing with.

Highlights

  • Runs pfSense on ARM
  • Size 74mm x 43mm, smaller than a credit card
  • 2 GbE ports (not on USB 2.0!)
  • 4GB eMMC and microSD card support
For full details head on to the product page at ADI Engineering. Also, initial version of manual for the μFW.

29 May 2016

Extending LVM volume

An LVM setup on a physical disk helps to increase the logical volume size in case it is almost full. Steps to be able to extend a logical volume, when there is free space on the physical volume:

  1. Unmount the volume
  2. Check if there is free space on physical volume (if no, need to add physical volume and extend group first)
  3. Extend logical volume using $> sudo lvextend -L+10G /dev/gp02/virtual
  4. Run fsck on logical volume: $> sudo e2fsck -f /dev/gp02/virtual
  5. Extend the file system on the logical volume: $> sudo resize2fs /dev/gp02/virtual
  6. Mount the logical volume: $> sudo mount -t auto /dev/gp02/virtual /virtual
Where:
/dev/gp02/virtual - is the logical volume
-L+10G - adds 10 GiB to the logical volume

In case there is no free space left on the physical volume, one needs to add a new physical volume to the group and then extend the logical volume.

References:
LVM HowTo [tldp.org]
Debian LVM [debian.org]
Working with LVM [debian-administration.org]

18 May 2016

pfSense 2.3.1 available.....almost

Warning: Upgrade your firewall after having a proper plan and back out option. As a minimum a snapshot before starting work and backup of the firewall configuration is recommended.


Did a Xenserver setup in the last few days with a pfSense 2.3 instance running on it. After finishing another VM and configuring the setup, what appears on pfSense administration page?


All issues marked for the 2.3.1 release had been closed recently, but didn't know that the update will appear out of the blue without any announcement on the pfSense blog!

Update 1


Tried to upgrade pfSense to 2.3.1.....
>>> Updating repositories metadata...
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
>>> Upgrading pkg... failed.
Failed

Need to wait a bit I think...

Update 2

Seems things are not ready yet
>>> Updating repositories metadata...
Updating pfSense-core repository catalogue...
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-core/meta.txz: Connection reset by peer
repository pfSense-core has no meta file, using default settings
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-core/packagesite.txz: Connection reset by peer
Unable to update repository pfSense-core
Updating pfSense repository catalogue...
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-pfSense_v2_3_0/meta.txz: Connection reset by peer
repository pfSense has no meta file, using default settings
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-pfSense_v2_3_0/packagesite.txz: Connection reset by peer
Unable to update repository pfSense
Failed


Update 3

Still got the first error above when trying to upgrade via console. Blog has a detailed post about the release now.

Update 4

Went to pfSense forums and noticed others are having similar issues. Need to wait for mirrors to synchronize as one of the packages is not there yet!

root: pfSense-upgrade -d
>>> Updating repositories metadata...
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
>>> Upgrading pkg...
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        pkg: 1.6.2 -> 1.7.2_2 [pfSense]

The process will require 91 KiB more space.
2 MiB to be downloaded.
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-pfSense_v2_3_0/All/pkg-1.7.2_2.txz: Not Found

Final update

Apparently, pfSense was not looking in the right place and was looking in the 2.3.0 folders. Waited for another half an hour and tried again and it downloaded the correct information and was able to find all packages needed for upgrade. 2.3.1 is up and running. Verifying functionality before deleting snapshot.