pmeerw's blog

Mon, 05 Nov 2018

Installing OpenJDK on Windows

This will probably be my only Windows and my only Java related blog post ever :(

The JDK version 11 is available from Oracle under a non-open-source license (which you probably don't want), and a GPLv2 license version,

For Window, you get a .zip file, but no installer. The following has to be done manually:

  1. Unzip to some directory, e.g. C:\jdk-11.0.1
  2. Set PATH: Control Panel, System, Advanced, Environment Variables. Add C:\jdk-11.0.1\bin to PATH variable.
  3. Set JAVA_HOME under System Variables. Create new variable JAVA_HOME, set value to C:\jdk-11.0.1 (without \bin)
  4. Open RegEdit program. Create keys HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft, HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment. Create string value CurrentVersion and set it to the version to use, see below.
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
    [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\11.0.1]
  5. *facepalm*

posted at: 14:57 | path: /rant | permanent link

Mon, 27 Aug 2018

Lexmark, good and WTF?!

Lexmark puts out security security updates for it's printers, also for my oldish ms415dn model; the latest firmware was released in June 2018 (LW70.TL2.P022) -- that's good, it fixes 10 CVEs (KRACK), updates OpenSSL, and adds SMBv3 support.

Yet the detailed release notes fail to mention that the new firmware also disables 3rd party toner cartridges (resulting in error code 32.46, unsupported cartridge). And Lexmark makes in rather difficult to diagnose the problem and downgrade the firmware, leaving you with a non-functional printer at an inopportune time (a.k.a. weekend) -- WTF?

Here's how to get the printer back:

  1. Find old firmware (not that I recommend Softpedia). Lexmark doesn't seem to offer it anymore, arrgh.
  2. The printer won't accept flashing a firmware downgrade via the web interface, WTF?
  3. Learn that there is a USB recovery mode: press 2,7,8 on power up until 'USB recovery' appears on the small screen next to the panel.
  4. Obtain Lexmark's USB flash utility. It didn't work on Windows 10 for me, at least the DOS (WTF!) tool worked in a virtualized Windows XP running on Ubuntu. Almost zero output from the tool in the shell, but the progress bar on the printer's screen goes up if it works.

All information is there, just a pain-in-the-ass to find. Lexmark, you can do better!

Lexmark, if you disable toner cartridges for whatever reason, say so in the release notes! I might even understand... but stop this foul play; communicate openly.

posted at: 12:31 | path: /rant | permanent link

Tue, 12 Jun 2018

Henry on stage (green screen)

Playing with a green screen (chroma keying) and recording with Open Broadcaster Software (OBS Studio).

Using two USB webcams and my Alpine email window as video sources.

There is a video recording as well.

posted at: 23:57 | path: /fun | permanent link

Fri, 01 Jun 2018

How to use an Xmas tree stand in summer?

... by crafting an universal converter and turning it into an umbrella holder :-)

Perfect for installing an umbrella on the balcony!

posted at: 13:36 | path: /projects | permanent link

Thu, 24 May 2018

Adding space to a Linux LVM volume

The steps can be done when the disk is online; only creating the partition required a reboot for me.

Growing the filesystem
  1. Create a physical LVM volume: pvcreate /dev/sdaN; check using pvdisplay
    $ pvcreate /dev/sdaN
      Physical volume "/dev/sdaN" successfully created
    $ pvdisplay
       --- Physical volume ---
      PV Name               /dev/sda1
      VG Name               vg-name
      --- Physical volume ---
      PV Name               /dev/sda2
      VG Name               vg-name
      "/dev/sdaN" is a new physical volume of "100.00 GiB"
      --- NEW Physical volume ---
      PV Name               /dev/sdaN
      VG Name
      PV Size               100.00 GiB
      Allocatable           NO
      PE Size               0
      Total PE              0
      Free PE               0
      Allocated PE          0
  2. Extend the volume group: vgextend vg-name /dev/sdaN; check using lvdisplay
    $ vgextend vg-name /dev/sdaN
      Volume group "vg-name" successfully extended
    $ lvdisplay
      --- Logical volume ---
      LV Name                /dev/vg-name/root
      VG Name                vg-name
  3. Extend the logical volume to all free space available: lvextend -l+100%FREE /dev/vg-name/root
    $ lvextend -l+100%FREE /dev/vg-name/root
  4. Resize the file system: resize2fs /dev/mapper/vg--name-root
    $ resize2fs /dev/mapper/vg--name-root
Partition type code for LVM is 8e.

Some more useful commands
lvmdiskscan -l to scan for LVM physical volumes
vgdisplay -v to summarize lot of information about a volume group
lvs to find the logical volumes and there size; also try the --segments argument

posted at: 11:16 | path: /configuration | permanent link

Made with PyBlosxom