Booting an Asus x200ca from USB

Here is the procedure to boot an Asus x200 (x200ca in my case) from USB (ie. to install Linux on it).

While booting, press F2 to enter the bios

Go to the “Security” tab and disable “secure boot”

In the boot tab, enable CMS and Enable PXE boot

In the boot tab, disable fast boot

In USB options, set all to enabled.

Save your change the press Esc while rebooting. A boot menu should appear.

This worked for me on bios version 300-something. A Youtube video implied that you needed version 500 or above on some x200 version. This was not the case for me.

I was able to boot into a Manjaro Linux live distro on USB and everything worked great. In particular the touch screen seemed to work better than under Windows (I seemed to get a lot of false touches under windows).

Juno 106 All notes off

The Roland Juno 106 does not have a built-in midi “All notes off” button or function. If you get a stuck or hung note you need to either turn off the synth or use some outside midi tool to send the all notes off command.

I did find a work-around though – if you change the midi channel on the Juno 106 (press midi plus a bank number button), all voices will stop sounding.

As a side note, I’ve never experienced stuck or hung notes from the Juno itself. I only get them when using various sequencers and experimental code sending midi to the Juno.

Programming the MFB Tanzbar Lite

Note: If you have not used the Tanzbar Lite for time, be sure to press the buttons firmly. They seem to not work well when left unused. After a session of use (and firm presses) they seem to start working normally again.

Like most MFB products, the Tanbar light is a mix of great sound and maddeningly convoluted user interface. In this post I hope to make things somewhat easier for the new user.

Starting the sequencer: shift + play (top button)

Selecting a pattern:

The Tanzbar Lite has 4 bank of 16 patterns. Selecting a pattern can only be performed in “Play Mode”. To enter play mode, press Rec/Real once so that both lights above the rec/real are out.

Hold Down Pat/Bank and press a step key to select pattern 1 to 16

To change banks, hold down shift + Patt/Bank. The Two LED’s above Patt/Bank will change to signify which bank you are now in.

Muting Tracks: while in Play Mode, press a step key to mute that instrument

Recording a pattern:

Hold down Rec/Real and press the instrument step key to select that instrument. Let up on Rec/Real

Press step keys to program the pattern for that instrument.

To program flams, accents, etc. you must first select the steps that will be affected. To do this, press select + one or more steps. The selected steps will start flashing which indicates that they will be affected by the next edit operation (ie. adding flam, accents, etc.)

Saving a pattern:

Select the bank you which to save to. Press shift + 5 (“store pattern”), press the pattern number you want to save to.

Modifying and rebuilding an RPM from source

This is a topic covered over and over on the internet and yet I can never find the quick guide I need. Here for my notes are how to modify and rebuild an RPM from source.

First, download the SRPM and install it:

wget http://repo.joomhosting.eu/centos/7/SRPMS/httpd-2.4.41-1.el7.src.rpm
rpm -Uvh httpd-2.4.41-1.el7.src.rpm 

You may see some errors about groups, you can ignore these.

You should now have a /root/rpmbuild/ dir – if not, find where the .spec file was put (you’ll find the other needed files near it):

find / -name "*.spec" -print

Before you change anything, try to just rebuild the rpm unmodified. You’ll likely find things you need that are missing. Fix all this first.

rpmbuild -ba SPECS/httpd.spec

When you have the default rebuild working, you can start changing things. If you only need to change a configure option you can edit the .spec file in /SPECS. If you need to patch code, you’ll need to (ideally and properly) use patch files added to the sources directory. If this is not possible, you will have to copy the .tgz for the source package, unarchive it, modify it, then tar it back up and put your modified copy in /SOURCES

Finding an expired certificate

I had a strange issue today regarding a particular expired certificate on a webserver. The problem was that the server in question was an nginx reverse proxy that proxied many domains and contained many hundreds of certificates. For various, um, “technical reasons”, I could not locate the exact cert that was bad. I only knew that one of them was. Normally the default .crt (which was causing the issue in this case) should be the first loaded nginx host. For one reason or another I still could not find it. I did know that date (it expired in September). Here is how I found it:

find / -type f -name "*.crt" -print -exec openssl x509 -enddate -in {} -noout \; | grep 'Sep' 

I shouldn’t have had to search / – the entire server and all attached volumes – but in this case I was a bit desperate. Note that the command line above actually hides (due to the grep for the date) the filename in question. Once I knew I had found a match I removed the pipe into grep, viewed all the results with less and found the problem.

Related tip that may have brought you here: nagios will not check sni for ssl domains unless you add “–sni domain.com” to the check_http line

Creating a simple, quick Borg backup

Here is how to create a simple borg backup. Something more along the lines of a zip file than a careful backup system. I’m using this method for long term storage. The primary benefits are de-duplication and compression.

Again, to clarify – these are not backups meant to be updated each day/week/month. These are simply long term storage that I normally would have made by rsyncing or making a tgz.

To create, run the following:

borg init -e none test1
borg create test1::first /path/to/files
borg info test1

My test case gave 50% savings:

                       Original size      Compressed size    Deduplicated size
All archives:               50.42 GB             35.15 GB             25.58 GB

                       Unique chunks         Total chunks
Chunk index:                  215930               520240

Don’t forget that you can mount borg archives to browse files.

borg mount test1::first /mnt/borg
borg unmount /mnt/borg

Using a private key file with sftp over lftp

I ran into a few issues trying to use a non-default private key file with lftp. Here is how I got it to work:

inside ~/.lftprc put

set sftp:connect-program "ssh -p 23 -a -x -i /home/my_user/.ssh/key_name_here"

The important items are what is passed to the -i option – this should be the private key you want to use. In my example I’m also using a non-standard port (-p 23 for port 23)

To connect, run:

lftp -u your_user_name,blank sftp://your-server.org

For this to work you need to:

  • specify sftp:// as the server type
  • set the password to a junk value, I use “blank”

Slow login and su on Centos 7 (not an ssh or dns problem)

I had a particular Centos 8 box that had very slow logins but over ssh but also using su. The issue was not with dns and ssh. I finally found the problem – or at least the fix (related to systemd, sigh):

systemctl restart systemd-logind

The server was running inside of openvz so perhaps there were resource issues at some point. I did not have time to determine why it broke but the above did fix it.

Reset Centos 8 root password

reboot the server

at grub menu, press up/down to pause auto booting

select top menu item, press e (to edit)

in editing menu, go to end of line starting with “linux” and add “rd.break”

press control-x to boot using this edited grub command line

when the server starts you should not have to login

at the prompt, type :

mount -o remount,rw /sysroot/
chroot /sysroot
passwd root
shutdown -r now