the itjerk

my adventures with technology

Category Archives: How-to

hifiberry dac+ pro

Now that I’m committing to Roon as a music server, I’d thought it would be nice to take a look at my streaming hardware. I like the idea of using my preamp’s analog stage, because it has a great analog stage; I can also output directly from my computer (where my music resides) via optical or USB. So rather than spending money on a Bluesound or Auralic device, I think I’ll go DIY.

The old Squeezebox 3 is of course a cherished relic, and in the living room it will sit forever. I also have a Chromecast Audio there, both connected to a Schiit Modi 2 DAC. In the man cave, I have plenty of options. Roon is very good at dealing with heterogeneous outputs; it recognized most every device on my network. But I am looking for a dedicated device, because, well, just because. I had an old Hifiberry DAC running PiCorePlayer – a very worthy software package – from the days when Raspberry Pi’s didn’t have the “+”. Yep, that’s the one to upgrade.
RoonHifiDac
The good thing about Hifiberry is that they are Roon Ready partner, and have their own Roon Bridge image for their hardware devices. I decided on the DAC Pro +, which adds “integrated dual-domain low-jitter clocks and gold-plated RCA connectors.” Coupled with a new Raspberry Pi 3+ board, I was completely surprised at what a musical player it was: crisp, detailed and very easy on the ears, it’s an absolute delight to listen to.

Hacker note: It’s easy enough to ssh into the Hifiberry/Roon Ready image. Touch a file named “ssh” into the bootloader partition, then login with the user “pi” and password “hifiberry”. Oddly enough, if you do an apt-update/distupgrade, the thing shows up a little differently in Roon’s audio settings (see below image). Why do this? I can think of a couple reasons, including doing updates, turning off HDMI output (/opt/vc/bin/tvservice -o) and of course, changing the default password. Is the Hifiberry/Roon image any better than using a standard Raspbian image with Roon’s Bridge installer script? Maybe I’ll ask Hifiberry.
Hifiberry

I went cheap on the acrylic case, which unfortunately snapped when I went to put heatsinks on the rPi, so I’ll be upgrading to the metal case shortly. Also, I’m going to upgrade to a low noise switching power supply, because that’s really the last thing to do get the best sound from the Hifiberry/rPi combo. Or spend $$$ on a linear power supply!

All-in-all, a very impressive digital streaming device for under $100.

On the web:
HiFiBerry DAC+ Pro | HiFiBerry

roon labs

Roon is paid software. Now that that’s out of the way, let’s talk about Roon. Roon is software for managing and accessing your disk-based music library. There is a server aka “core” element, as well as “endpoint” apps for (nearly) every OS, including Windows, Mac, iOS, Android, etc. Some like to think of it as a component of your audio system, albeit one of the software variety.

roon

Why use Roon? I have to admit a directory tree isn’t the most elegant way to view ones digital music library. And that’s what Roon does: it scans your digital music, applies rich content – pictures, text, weblinks, etc – and puts it all together for a paid subscription-like experience. It even fills in the blanks on missing artwork, etc. I don’t use Spotify or iTunes, but Roon provides a very similar interface.

I installed RoonServer on my linux box with ease. When I ran the “easy install” script (remember to chmod +x first), it alerted me that I needed cifs-utils installed first. That corrected, the script downloaded and installed the server software, and set itself up as a service. But that’s it as far as linux goes. It’s a headless game, no native app, no web interface, from here on out I’m off to my phone or computer to control my music.

On the Roon app for Android, I logged into my Roon account and gave them my credit card number. Viola! it all worked. I then setup a music “zone” (an odd choice of word), which is an audio player. I was a bit shocked by how many appeared: my Pixel 2 phone, the (four) audio outputs from my linux box, Roon Bridge which I installed on a new RaspberryPi (more later), all my Chromecast devices, and lo and behold, my Squeezebox3 and Squeezelite players. In order to use the latter, one must enable Squeezebox support AND stop the LMS (Squeezebox) server. Once you select something to play, you can then choose where – including simultaneously – to play it.

I’ll write up another post as after a week or so of my free 14 day trial, but initial thoughts are mostly positive. It is a great interface, and it brings the whole digital music experience up a level. However, I really am disappointed there is no native linux app, and I still haven’t figured out how to add my own rich content, other than pictures to artists and albums to the library. (Hey, of course I’d like to add my Strawberry Bricks reviews to my collection!) The Android interface could sure use refinement (separate player from config mode, easier access to artists) but I suppose this is a forever work in progress.

Screenshot (Aug 22, 2018 5_10_04 AM)

Roon all sounds fine, and it all looks great; the question however is simple: is it worth $119 per year, let alone $499 per lifetime?

On the web:
Roon Labs

clean install mania

onedesktop.png
New hardware assembled in no time, and yes it’s a perfect match (well, except I need to rob a mounting bracket and four-pin fan (mATX) from the old machine). For the money, I’ve done well, and I hope it lasts as long as the previous.

Clean install of Ubuntu 18.04LTS was fine, except first time I must have miss-typed my password because I couldn’t login. Second time I got it right, but also decided to do a “minimal install” with full disk encryption. The former, because, the latter also because, but I will say there are potential pitfalls when rebooting because you must type the password to mount the drive.

I installed a whole lot of apps (Audex too), LAMP server with two websites (one requiring php5.x from here), two music streaming servers, an openvpn server, and a whole lot more. Most things were easy, most things didn’t require magic or luck, and it’s liberating in a way to leave things behind, and also to see how things work on a very clean system.

The big takeaways are this: document, document, document what you’ve done. Whether in a blog (like this), using screenshots, sending yourself email, referring to bash_history files, or whatever, if you did something once, you may have to do it again, so tuck it away where you can find it. As we all know, IT professionals are just very good at google searches; but they’re not always that efficient, and after a while the mania sets in:

In my drive for perfection, I did f&ck things up by deleting a directory (or more) in /var/. Punch drunk on the keyboard? Three hours of sleep? I certainly wasn’t thinking straight! Anyway, very luck to recover, as I was almost to the point where I needed to redo the entire clean install again!

So it’s all good, all systems go. Yet I still haven’t migrated any user data (other than my music library, and websites), not even any bookmarks. Yet.

byopc 2018

Come to find that it’s been four years since I last rebuilt my linux box. Should I, or should I not? The old wizard box has lost its door, I’ve been having some issue with freezing lately, but most of all, it feels like it’s time. Or does it? I’m such a Libra!

Keeping my motto of “cheap and low power,” I’m looking at the Intel G4400 processor for a whopping $49 bucks. It’s marginally better than my current G4320, but similarly, the single thread mark is just marginally worse than the more expense i3-8100 (which I used here. It’s a great value, especially considering I can get a less expensive motherboard (Asus H110M A/M.2) that still has VGA, otherwise I’d also have to upgrade my KVM. In any circumstance, I’ll need to upgrade to DDR4 memory, which for 16GB is not cheap either, so I’ll probably stick to 8GB: at $80 it’s the most expensive component. And if I get a new case, I should get a new power supply, and might as well get a new SSD… So that’s a new computer for $315.25 from my local Microcenter.

A big plus is that I also get to do a clean install, which after two LTS upgrades, is exciting, but work:

  • Minimal Base 18.04 LTS
  • Apps (that’s another post)
  • Security: UFW, DNSCrypt, DuckDNS, fixed IP, etc.
  • Music servers: Logitech Media Server, MiniDLNA with Bubblesoft
  • Install LAMP, configure servers:
  • Setup Apache, migrate /var/www & databases
  • What am I forgetting?

Plus, I’ll need to install that new 3TB raid from my old box, and the spdif card, but what the heck to do with all those old data files…

Well of course I got a new computer, what itjerk wouldn’t?

raid, again, and backup

I bought two 3TB drives to replace my 1TB RAID. Easy enough, because with hardware RAID 1 the disks are identical: you can pull one drive out, plug it into a USB enclosure, and provided your computer is compatible with the drive’s format — ext4 in my case — you will have two functioning backup drives to copy over to the new RAID (and eventually erase/shred).
sudo shred -v -nX -z /dev/sdX

A thing about buying a hard drive. I notice that the marketing has now shifted to “intended use” of the drive – Desktop, NAS, Surveillance, etc. Guess what, I call b.s. — they’re all the same drives, probably just the more expensive ones were tested more (to justify price/warranty). Please, let me know otherwise if you think I am wrong.

Maybe I should have got 4TB discs? I don’t know. Going from 70% used to 70% available is a jump. I do want to rip more of my CD library to my computer, because digital music is here to stay (and when I say “more” of my library, I mean a “curated” more of my library). I rip to FLAC, which is all the quality I require (considering the source is 16bit/44khz), so how much will I need? Figuring FLAC at level 5 is about 300-350 MB per CD, 2TB will hold a LOT of CDs.

2000000 MB / 330 MB = 6060 CDs

I should probably also mention that RAID 1 is not a backup. It’s a safety copy in case one drive fails. You want backup? You gotta have two of everything. One here, and one over there. More later.

The bigger question then is what do we do with all the data we have. If I really think about it, I need to back up my photos, SOME of my music, my data (book, website, etc), and what else? Do I really need all the crap on my computer? All the files on those backup drives and old hard disks? Probably not, because I don’t even know what I have most of the time and … p0rn should never be downloaded! 😉

My next project will be to organize all my “digitalia,” and what a project that will be!

ubuntu 18.04 lts

Desktop upgrade time. The latest version of Ubuntu, 18.04 lts “Bionic Beaver,” was released last week, so I decided to upgrade my desktop computer in situ from 16.04LTS. There’s lots of changes between LTS versions, but the big change here was the switch from Compiz/Unity display manager and desktop to Xorg/Gnome. The reason why I upgrade is that the LTS version is supported until 2023, though I have to admit that having a new UI was enticing, especially with Gnome Shell extensions.
sudo update-manager -cd
After the above command to make the upgrade available to Software Updater, I had errors. Nonetheless, Bionic Beaver installed, and I rebooted. The first error was with ca-certificates during upgrade, which is a known Bug #1767453. The second was a broken intramfs, which I solved by updating it for the current kernel, sudo update-initramfs -c -k 4.15.0-20-generic.

Bigger issue I had was with Xorg/Gnome. When I’d go to log in, I’d get an empty screen, though intermittently between reboots it would work. Ugh. So I reinstalled Xorg/Gnome, by doing this:
sudo tasksel install ubuntu-desktop
then uninstalled Compiz/Unity by this:
sudo apt-get purge compiz compiz-plugins-main-default libcompizconfig0

It ends up the issue boiled down to one of the Display Managers, lightdm or gdm3. I decided to purge lightdm and use gdm3, which after the following thorough reinstallation, seems to be working:
apt-get update
sudo apt-get -d install --reinstall gdm3
sudo apt-get remove --purge gdm3
sudo apt-get install gdm3

I also installed gnome-tweak-tool to move the min/max buttons to the left, and the new theme, Communitheme, because after 8 years of Ambiance we all need a new Ubunutu theme! I also found some useful Gnome Shell extensions, which I installed via the “chrome” plugin in Firefox (go figure!). Oh, and this:
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true

After the perfunctory sudo apt-get update/dist-upgrade/autoremove, I went through many things, like local copies of websites, Openvpn, etc. and found they worked. MiniDLNA was also running but Logitech Media Server needed to be reinstalled (with a new version: 7.9.1 – 1522157629 @ Fri Mar 30 12:25:29 CEST 2018).

Mostly good, and a nice change of desktop scenery!

dnscrypt2

Spurred on by some recent articles, I decided to switch to dnscrypt2. It’s an improved version, supports a whole slew of things and more resovers.

This was a bit of work, because, stupidly, I disabled dns! Anyway, long story short, I followed the instructions here, and everything worked out okay. I did to issue the following on resolv.conf to get it to ‘stick’:
chattr +i /etc/resolv.conf

desktop:~$ nslookup -type=txt debug.opendns.com
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
debug.opendns.com text = "server m33.chi"
debug.opendns.com text = "flags 20 0 70 7950800000000000000"
debug.opendns.com text = "originid 0"
debug.opendns.com text = "actype 0"
debug.opendns.com text = "source 23.122.56.207:33649"
debug.opendns.com text = "dnscrypt enabled (714E7A696D657555)"

One the web:
DNScrypt

the big upgrade

Production website upgrades (do-release-upgrade from 14.04.5 to 16.04.4) are the most nerve-wracking ever. Being a “one-man show” means it’s all or nothing, no team to lean on, just my wits and google. Sure, I had a back-up if everything went south; yes, I had an idea everything would work; and yes, I ran into problems.

The local copy of my website needed an earlier version of php to work. That fix was easy enough, I just installed ondrej ppa for it. But I ran into a problem with the production site because I have iRedMail installed; so yes, the local copy isn’t completely like the production site. Here the problem was auth_mysql, as evidenced by sudo apache2ctl configtest. Two mods I have – awstats and cluebringer – were calling auth_mysql and preventing apache2 to load. The fix was fairly easy, apt-get install libaprutil1-dbd-mysql, and then clearing out the offending *.conf files. Thanks to iRedMail for information.

Seeing that website, email, etc live again was a good, good feeling.

A few weeks later, there were a few more things I had to tweak to get oh-so-right, but most of that was email related, and mostly non-OS related.

phpbb – new website

I have a web property, progressiverock.com, that’s been dormant ever since I rebranded my prog rock site after my book, strawberrybricks.com, a few years ago. One would think that the former URL is worth some money, but to date I have been unsuccessful in finding a buyer. So rather than just serving as a redirect to the latter URL, I decided to install phpbb and relaunch the site as a bulletin board to discuss all things prog rock and generate some brand recognition.

I use Digital Ocean for virtual hosting because it’s cheap (starting at $5/mo) and easy. The process to create a new virtual host “droplet” is simple enough: pick your choice of options (size, memory), hosting location, operating system (you can even get it pre-loaded with LAMP) and then setup the dns records. Within minutes, it was up and running as progressiverock.com.

Immediately after an apt-get update/dist-upgrade, I added some basics to the core system, like openssh server, ufw, postfix/logwatch and apticron. Most were straight forward installs, but for postfix, be sure to setup your A, MX and TX records before you start, and check your logs/errors for what to tweak; I had to add postconf compatibility and manually create the virtual alias map to clear errors I found in mail.log. I also setup sender_canonical because I just have a “no-reply” email system (for now). Also, don’t forget to set your timezone.

After configuring mysql and apache2, I added my rss feed, which needed the php-xml module installed to work. Let’s Encrypt was next, because why not — everyone should be using SSL. I also added awstats, which needed user www-data added to the adm group to correct the errors I generated by cron. The bulletin board software phpbb was quite simple to install; fortunately I remembered some basic mySQL commands to get the database setup beforehand. I then added American English as a language, and found feedpostbot, an extension that uses rss feeds to create topics — perfect for the “Album of the Day.” Forum hierarchy took a little thought, and I’m sure I’ll change it again before it all goes live. My next task is to get a new style for the site, but that my require some outside help. More later.

None of this was complicated, and most steps took but a few minutes to do. My big take away here is that log files and error messages are your friend: listen to them as they tell you exactly what to correct with your installation.

And if you want the domain progressiverock.com, make me an offer that I can’t refuse!

Update: I found the easiest way to prevent spammers from creating accounts is to use Q&A for the Captcha. 100% reduction in bogus accounts.

On the web:
phpBB • Free and Open Source Forum Software