Thursday, June 28, 2018

Small Form Factor Computers: Excitement + Rage

So for Christmas this past year, I told my wife I wanted a Raspberry Pi. She said "oh, okay. I've never made one before but I could do that." I was like: *facepalm* "Um..." I won't bore you with the rest of the conversation but you know where this one was going to go. It ended with me receiving a very lovely card with a "coupon" that said: "Buy yourself a Raspberry Pi or an XBOX One or something." So I started researching... and researching... and praying... and researching some more... until finally, I decided that the computing solution I would get the most use out of was probably a Windows-based machine with enough power to play at least 90% of the games that have been sitting in my Steam library since 2013. So naturally, I bought a Steam Machine.

Now don't get me wrong: I did this knowing full well the limitations of a Linux-based system. I just thought I'd save more money buying the SteamOS version than paying Microsoft's blood price of $120 for an operating system I have been less than thrilled about in the past (I'm looking at you, Windows 10).

Save money I did. I even managed to figure out how to put Windows 10 on my machine without paying a dime (legally - more to come on that). Then one day, the little alien head on the front of my $500 Alienware Alpha (Intel i7 + 8GB RAM + Nvidia GTX card) started flashing yellow instead of blue and my machine failed to start. Only then, after a frantic internet search, did I discover that this was a known problem with an inexpensive-yet-complicated fix. There were a few temporary solutions that I tried that worked for a while but the next time I attempted to reboot the machine, the little yellow light of death was back. Cursing Dell and all the fell powers of the night, I hoped on Amazon and bought the only CMOS battery with good reviews thinking that, even if it wasn't an exact fit, my technical savvy would allow me to make it work. I was wrong.

I forgot just how microscopic CMOS battery wires are and, after a long battle with my crappy soldering iron and some tiny battery leads, I managed to break not one but both batteries' leads irreparably. I ordered a new CMOS battery that - from the tiny picture (and product description) - appeared to have the correct connector. A few days later, it arrived. It installed easily and the computer went back together just about as well as it came apart. I hooked everything up and it instantly powered on... only I hadn't pushed the power button. Seconds later, the Yellow Light of Death (YLOD) was back. 

Cursing loudly, I powered the machine off, disconnected all the peripherals, and held the power button in for 60 seconds to clear the charge. I reattached everything and it did the same thing. Cursing even louder, I powered the machine off, disconnected everything, then killed the power at the power strip. I waited until the light on the end of the power adapter went out then reattached everything and powered up the power strip. Thankfully, the machine did not automatically power on and when I pressed the power button, it actually booted.

Just to make sure the BIOS firmware had updated, I pressed F2 to go into the UEFI. The update had worked so I saved and exited. Windows booted normally and I was back in business. I ran Alienware's update utility to see if there were any other updates and there were. Some even required a restart. Taking it on faith that the machine would reboot like normal, I installed them then manually restarted the machine. It once again booted successfully. Here's what I installed:

1. BIOS update to version A07
2. Intel SATA protocol update
3. Intel chipset driver (or something like that)

Everything works great now.

Wednesday, May 30, 2018

Mac vs. PC: Six Lies, Three Opinions, and One Good Point

As I sat in the stygian gloom of my toddler's room waiting for him to go to sleep a few nights ago, I scrolled through my Google news feed to see how much of a figurative (or literal) train wreck the world was turning out to be. I was not disappointed. Well, at least, I wasn't surprised. Typically, my feed is replete with tech news, Tesla news, retro gaming news, Skyrim mods, and U.S. politics (ugh). This little gem was at the top of my feed: 10 reasons to get an Apple Mac instead of a Windows PC

The title alone nearly made me throw up in my mouth but I thought: "Why not? Let's see what this person has to say. Can't be any more ignorant than the stuff you see coming out of Twitter." I was mistaken.

I will preface my critique (rant?) by saying that I have used both Macs and PCs in various settings since their widespread adoption in the late 1980s and have greatly favored PCs for reasons I will elaborate on hereafter. That being said, I attempted to read the aforementioned article with what approximated an "open mind."

That brings us to Mr. Villas-Boas' first point:

1. Macs are easier to buy.

His main point here as I understand it is because Macs have fewer configurations and are made only by Apple (read: proprietary), they are "easier" to buy. He summarizes by saying: "...if you just want a good computer and don't want to do a ton of research, Apple makes it easier for you to pick." Here's what I got out of all that:

  1. Macs have limited hardware configurations. If you're looking for something specific, you probably won't find it. And let's be honest, if you're looking for something specific hardware-wise, you probably wouldn't be looking at Macs in the first place.
  2. Macs are only manufactured by Apple. If you know nothing about proprietary manufacturers or supply-and-demand, this probably won't set off any warning bells. There's a reason Macs are way more expensive than PCs: only Apple makes them.
  3. Good Computer = Yes, Like Research = No? Solution = Mac. His summary statement about why you might want to pick a Mac would be more accurately stated thus: "If you know nothing about computers and have no specific application you want one for other than browsing the internet and binging on Netflix and/or are just too lazy to do even a minimal amount of Googling to learn something about computers AND are independently wealthy and/or just plain bad with money, Apple makes it easier for you to pick a computer!"
So are Macs easier to buy? No. Apple just provides a more streamlined buying experience than Amazon does. 

2. Mac computers are easier to get repaired.

His point here is that you can just take your broken Mac to an Apple Store and they'll fix it there but you have to do research (there's that word again) to do the same for a PC.

Let's talk about this: So... if your Mac bites the dust or has some problem you can't fix, only the people at Apple can fix it? I know there are third-party repair shops out there that cater to Mac users but you'd probably have to do research to find one, so let's pretend they don't exist. With Macs, you are dependent on Apple to fix your computer. What if it's a holiday weekend and you have to get something done for work and your job is on the line if you don't do it and your Mac breaks but... Apple is closed? Let's call this an argument for cloud computing. More on that later...

So are Macs easier to repair? No. Apple, again, provides a more consistent and streamlined repair experience. I'm not discounting the value of that. That's why people take their broken cars to dealerships and pay through the nose for taillight changes and other stuff they could probably easily have done themselves with a little research: it's convenient. Let's not confuse the two. "Convenience" is not always synonymous with "easy."

3. Apple macOS can be simpler to use, but that depends on personal preference.

Villas-Boas says: "Windows 10 is a fantastic operating system with tons of features and functionality, but it can be a little cluttered at times [understatement]. Apple macOS, the operating system formerly known as Apple OS X, offers a comparatively clean and simple experience."

I have no argument with this. I will say this however: Windows 10, like its predecessors, is a memory hog. My four-year-old ASUS laptop with 4GB of RAM struggles to open web pages and perform even the most basic of functions with any semblance of speed. The ASUS Chromebook on which I'm writing this blog however has pretty much the same system specifications as the laptop (i.e. Intel Celeron processor & 4GB of RAM) but opens web pages like that is it's job (which, arguably, it is). Also, the macOS may provide a "comparatively clean and simple" experience, but that should never be confused with the words "intuitive" or "common-sense." In my experience, Macs are less intuitive than PCs - this includes Chromebooks (extremely intuitive) and Linux distributions (slightly less intuitive than Windows in some cases, slightly more in others).

Like the man said though, much of this argument depends on personal preference. I would argue this includes one's knowledge of technology and one's particular technology needs. For someone like my spouse - who does not require access to non-web-based programs or applications - a Mac could be the right choice. I think she'd do well to ditch Mac altogether and just use a Chromebook but apparently, that's not "cool" where she works. For someone like myself however - who utilizes computers not only for web-based applications like Google Docs but also plays videogames, programs, and does graphic design - a beefier operating system and hardware setup is what I look for. Mac certainly has these... but I'm not made of money.

4. The Apple ecosystem.

Here, Villas-Boas refers to things like the "iPhone, AirPods, iPad, Apple Watch, HomePods, and Apple TV" and their somewhat streamlined interoperability. He even goes so far as to claim that "no other company or ecosystem has come close to the easy and smooth integration between Apple's home-built devices." Let me tell you about a little company called Google...

5. Macs come with some great software for free.

His main point here is that the bloatware that comes pre-loaded on Macs is "a lot better than anything [he's] found pre-loaded on Windows PCs." True. 

However, when compared to the open-source software available for Linux machines and how much similar kinds of software would cost you if you bought it for Mac or PC... what's that? You're smashing your Mac with a hammer right now? 

6. You might not want these free apps, but they're nowhere near as offensive as the "bloatware" that comes with most Windows PCs.

It's true. That crap is annoying. I direct you once more to Linux where YOU decide what is and isn't installed on your computer. Is it easy and streamlined? Actually, yes. Read my previous article about the most useful applications for Linux.

7. New versions of macOS are always free.

I can't argue with this. That's why I switched to Linux in the first place. Why should you have to pay for a new copy of Windows if your hard drive craps out? *shakes fist at ASUS and Microsoft*

8. Most Mac laptops have beautiful displays.

This may be true. However, Villas-Boas claims that "you have to really hunt through the great many models available to find [a PC] with a sharp screen". Not true. Samsung makes the best displays around, hands down.

9. Mac laptops have the best trackpads.

So do ASUS Chromebooks. He might have a point about Windows PCs but that's a hardware issue, not a software issue (in most cases).

10. You can run Windows on Macs if you want.

Here's the thing: you wouldn't have to if you didn't have a Mac in the first place.

In Conclusion:
Let's see how many of Villas-Boas' reasons to get a Mac hold up to even the most basic scrutiny: at best, I'd give him 2 out of 10. Valiant effort though.

Here's the thing: if someone really wants to get a Mac, they're going to get a Mac. It's just like buying a car: you might want that new Ford Mustang because it goes *vroom, vroom* and is all shiny and everyone else wants one, and if you only need to get from Point A to Point B, that might be the right choice for you. I'm just saying it might not be the right choice objectively speaking. Mustangs are loud, fuel-inefficient, ticket-magnets, rear-wheel drive (never a good choice in the PNW), only have two seats (can you say retirement car?) and, of course, are made by Ford (never a good choice if you're given a choice at all). Apply that same concept to Macs: they're shiny, "everyone" wants one, and they're something of a status symbol. That doesn't mean they're the right computing choice for most people.

Most Useful Applications in Linux: Part I

This is my completely biased list of applications for Linux that have made my life easier in some way. It is intended for people who are new to Linux and looking for ways (or better ways) to do things.

1. Synaptic Package Manager
This gem has libraries of pretty much anything you'll ever need unless you're a super-duper-power user (and even then, it's got a lot of stuff for you). The best part about it (in my opinion) is that once you select a package, the program identifies and installs all dependencies (e.g. the libraries that make it function). Along with GDebi, it is one of the best installation tools for Ubuntu-based systems.

NOTE: If you're using Ubuntu Software, stop right now. You don't need to do that to yourself anymore. The Zorin OS Software app is an entirely different story however.

2. GDebi
A tool for installing Debian (.deb) packages, GDebi (almost entirely) removes the need for you to use the Linux terminal. Granted, unless your pre-installed software installer comes with it, you'll still need to use the terminal to install it. I utilize this as a complementary program to Synaptic Package Manager.

NOTE: If you're running Zorin OS, you can right-click the .deb file and choose the built-in Software app to install it for you.

3. Chromium 
The open-source version of Google's Chrome browser, Chromium can do everything Chrome can do. You can still install Chrome if you want to but most distributions of Linux come preinstalled with this option.

4. VMWare Workstation Player
This free version of VMWare's powerful operating system emulator will allow you to try out new Linux distros without having to dual-boot or limp through the "live" disc scenarios. Depending on your needs, you can also use it to game.

5. GPointing
A utility for customizing your touchpad/mouse functions. On my ASUS Ultrabook, the Function Key that is supposed to disable the touchpad does not work (in Zorin OS 12.3 Core). It worked in Ubuntu 16.04 LTS. Even if you're not running this specific distribution of Linux, you can benefit from the added functionality if - and only if - you're running a variant of Ubuntu (which Zorin is). You'll need two separate files to satisfy dependencies:

libgpds0
gpointing-device-settings

I installed both using GDebi and it worked great.

The (Original) Star Wars Expanded Universe

A few years back, I set myself the lofty - if not somewhat unrealistic (given the demands on my time at that point in my life) - goal of reading through each and every Star Wars novel in chronological order according to their place in the officially-sanctioned timeline. From 2009 to 2016, I made minimal progress through the series, ending my spree with the last novel set before the cessation of the Clone Wars in Episode III. It was then that a friend of mine informed me of Lucas Arts' (LA) horrific betrayal of everything I had come to know and love about the Star Wars Universe: in 2014, prior to Disney's hostile takeover, LA officially scrapped 98% of the Expanded Universe, labeling it as "Legends". Then and there, I vowed stubbornly to actually read all of the books I had been carefully collecting since my teen years.

Being too lazy to actually go back and count exactly how many Legends books there are now, I'll give you an approximate idea of what I've read so far: everything from Rogue Planet to Order 66, plus a random smattering of Old Republic novels  like Revan and Deceived - both of which I thoroughly enjoyed. All those books and I've barely even scratched the surface of the original Expanded Universe.

Here is my exhortation: read the Legends books. They are rich with characters, places, and adventures that will grow your love of all things Star Wars be you new to the obsession or experienced.

Cheers,
Gabe

Monday, May 7, 2018

Getting My GRUB On: Adventures in the GRUB Command Shell

A few weeks ago, I inadvertently broke my operating system. I was running Ubuntu 16.04 LTS. Whilst trying to fix a Java problem, I somehow divested myself of all Super User privileges. After attempting to reboot into recovery mode and failing, I resigned myself to the fact that I'd probably have to do transfer all my files to an external drive and a clean OS install as well. What I didn't realize at the time was that I could have used something like SuperGRUB2 to boot into recovery mode and fix my permissions problem... but let's not dwell on that because I'm running out of four-letter words.

So, without delay, I copied all my files over and went OS shopping. I briefly considered reinstalling Ubuntu 16.04 LTS or one of the newer distributions but thought I'd see what else was out there. I landed on Zorin OS - lauded by its makers as the "perfect" replacement for Windows (shout out to Fossbytes for the great info). It installed without a hitch. When I went to restart the computer however, something interesting - and annoying - happened: the computer opened the GRUB command shell and gave me the following prompt:

grub>

I found a great resource for booting from the GRUB command shell here: www.linux.com

Even after trying this however, the computer would continually boot into the GRUB command shell. I tried booting using the SuperGRUB2 disc using a different kernel but the same thing happened over and over again. Also, after a new kernel was installed, the desktop loaded Cinnamon instead of the Zorin OS desktop (which was weird but a symptom of a larger problem). I will say this: I'm still pretty new to Linux and its intricacies and this issue was quickly going over my head. One thing that usually solves issues like this however is a clean install of the OS so I thought I'd just try that.

Once I loaded up the Zorin OS 12.3 disc, it gave me the opportunity to choose the partition on which the OS would be installed. That's when something occured to me: I had previously partitioned part of the hard drive to install Windows on it. It was formatted as NTFS. There were SIX partitions of the 500GB HD with the following information: (hd0, gpt1) = boot, (hd0, gpt2) = UEFI, (hd0, gpt3) = swap, (hd0, gpt4) = NTFS, (hd0, gpt5) = ext4, (hd0, gpt6) = free space. Zorin was installed on (hd0, gpt5).

To make things cleaner, I repartitioned the HD and merged the primary partition and the (previously) NTFS one. It was onto this new partition that I installed the new OS.

The install completed without a hitch and when I restarted the computer, it bypassed the GRUB command shell altogether. Here's what I think happened:

1) Even though GRUB was correctly installed and updated, the NTFS partition confused the boot process and caused it to revert to the shell (forcing me to tell it which partition was the primary, etc.) since there wasn't another OS installed on the partition. Removing the NTFS partition removed the confusion and allowed the computer to boot correctly because I only gave it one choice of primary partitions versus two.

2) During the GRUB shell boot operation, I selected the most recent kernel and initrd file available. Normally, this wouldn't be an issue. However, in Zorin OS, the Software & Updates must come from the "Main Server", not your regional server (according to the forums I read). Here is a screenshot of that menu:



I had selected the North American region. One of the first things I did was change this to "Main Server". I haven't run any updates yet but I'll post again if Cinnamon reappears or something else unintended happens.

TTFN,
Gabe

Wednesday, March 21, 2018

Linux + Smart Cards: A Rare Technical Breakthrough

Do you hate Windows and/or prefer Linux? Does Firefox annoy you? Are you still holding on to that crappy laptop just to be able to check your Army/Navy/Air Force/Marine e-mail? This entry is for you.

This article builds on/modifies the instructions in the following two articles:
http://www.militarycac.com/linux.htm
https://help.ubuntu.com/community/CommonAccessCard

My thanks to both for putting the data out there. Now I don't have to scream at my old laptop once a month.

First off, here are my system specs:

Computer:

Card Reader: SCM Micro SCR331 (PN: 904622)
Browser Version: Google Chrome Version 65.0.3325.162 (Official Build) (64-bit)

First, I opened a Terminal and installed the middleware as follows:

sudo apt-get install libpcsclite1 pcscd pcsc-tools

I then plugged in the CAC reader and inserted my CAC. Then I ran the PCSC diagnostic tool to check the reader status:

pcsc_scan

Next, following the instructions from MilitaryCAC.com, I downloaded the DoD certificates and installed them in Chrome:

Settings --> Advanced --> Manage Certificates --> Authorities --> Import

Note: You have to check all THREE permissions boxes for EACH certificate when you install it.

After that, I utilized Synaptic Package Manager to install Coolkey and all its relevant components.

Note: I had tried a few different things to get Cackey to work (e.g. using the App for Chrome) but AKO still didn't recognize that my card was inserted.

Following the directions from the Ubuntu help site, I installed NSS (which Linux apparently uses to manage SSL certificates) as follows:

WARNING: Close out Chrome before you do this! If you don't, it might corrupt it.

CAUTIONDO NOT use sudo to add the CAC Module! It will lock the pkcs11.txt file that allows your web browser to recognize that the CAC is inserted into the reader.

modutil -dbdir sql:.pki/nssdb/ -add "CAC Module" -libfile /usr/lib/pkcs11/libcoolkeypk11.so

Note: Your library file location might be different. Utilize a search to look for the Coolkey library file.

After that, I checked to see if the reader recognized my card:

modutil -dbdir sql:.pki/nssdb/ -list

You should see something like this:

1. NSS Internal PKCS #11 Module
     slots: 2 slots attached
     status:loaded

     slot: NSS Internal Cryptographic Services
     token: NSS Generic Crypto Services

     slot: NSS User Private Key and Certificate Services
     token: NSS Certificate DB

2. CAC Module
     library name: /usr/lib/libcackey.so
     slots: 1 slot attached
     status: loaded

     slot: CACKey Slot
     token: LASTNAME.FIRSTNAME.NMN.123456789

If not, MilitaryCAC suggests that you probably were not in your home directory during install. That is a must.

That was literally it. I was able to log onto AKO, MyPay, and my Enterprise E-mail.

NOTE: If CAC reader light does not go on once plugged in or when card is plugged in, running pcsc_scan should reinitialize communications.

UPDATE [5-7-2018]: Have successfully installed CAC reader on Zorin OS 12.3 and utilized to access AKO. Changes to previous system specs as follows:

OS: Zorin OS 12.3 (64-bit)
Browser: Chromium Version 64.0.3282.167 (Official Build) Built on Ubuntu , running on Zorin 12 (64-bit)
System: 

UPDATE [6-1-2018]: Successfully accessed the Evaluation Entry System and signed an OER.