Category Archives: TechnoFrazzle

FreeNAS reporting DEGRADED disk status

Today seems to be a day of infrastructure cleanup here at my home. My FreeNAS server was reporting the following today:

The volume [pool_name] (ZFS) state is DEGRADED: One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffected.

The fact that it blinking red was a bit worrisome and the error itself was not particularly useful. Continue reading FreeNAS reporting DEGRADED disk status

WordPress warning “Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given” with PHP 7.0.9

I recently migrated my WordPress site from Vultr to my own server and as part of that migration, I decided to give NginX a go as my web server. However on launch, my New Relic monitoring kept complaining about a high error rate even though the server itself was performing normally. When I decided to take a look at the logs I saw the following:

screen-shot-2016-09-10-at-2-35-54-pm

Or Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given

Continue reading WordPress warning “Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given” with PHP 7.0.9

Unable to re-install Windows 8

I decided to downgrade my computer from Windows 10 to Windows 8 today and was unable to re-install Windows 8 initially. Whenever I tried to install Windows 8, I kept running into the issue where I got the following error “We couldn’t create a new partition or locate an existing one.  For more information, see the Setup log files.” After banging my head for a while, I came across a number of articles including this one which I took the steps from.

  1. Remove all drives from the computer. This includes hard disks, usb disks and also any PCI-E disks you might have
  2. Reboot the PC with the Win 8 CD in and select repair
  3. Head over to the advanced tools option
  4. Once in the command prompt Type the following:
    DISKPART
    LIST DISK
    SELECT DISK <whatever disk number you have>
    CLEAN
    CREATE PARTITION PRIMARY
    ACTIVE
    FORMAT FS=NTFS QUICK
    ASSIGN LETTER=<whatever disk letter you want it to be>
  5. Repeat the steps above for all other Hard Disks present but don’t make any other disks active
  6. Reboot and start the installation again

I think I ran into this issue primarily because I also dual boot my machine between Ubuntu and Windows and Windows 8 doesn’t seem to like seeing a GRUB partition in existence.

This works with Windows 8

Organizing Ansible

While we’ve been using Ansible for almost a year at Kinetic Cafe, I’ve been spending a lot more time with it at a personal level. A big part of it is that I tend to really like being familiar with the tools that my team uses at work and the other is because I actually have a lot of home and cloud servers running because I tend to like being familiar with the tools that the team uses at work. Ansible’s strength stems from the idea that you can ssh to a server and perform a series of tasks based on modules already built for you. At it’s core are concepts like inventories, roles, handlers, dependencies and variables but then allows users to use it in many different ways within that structure. However, this flexibility lead to chaos when I started to use it so I took some time organizing Ansible in a meaningful way for my home infrastructure.

Continue reading Organizing Ansible

My first forray into Ansible

Learning Ansible has been on my to-do list for a very long time now but I finally found the time to learn it, play with it and even write scripts to

  • create a server on Vultr
  • configure a server based on my preferred configuration
  • deploy an Apache server and a MySQL server
  • Configure the Apache and MySQL server for WordPress
  • Restore my old WordPress install to the new WordPress install

Continue reading My first forray into Ansible

Installing KVM on Ubuntu

Over the years, I’ve tried a number of virtualization engines but I’ve recently settled for KVM for the home. Virtualbox is great for a desktop but KVM is extremely light and has all the features I look for when it comes to a server version for the home. Here are my install steps to install KVM on Ubuntu

Continue reading Installing KVM on Ubuntu

Upgrading the OnePlus One to Android Lollipop

I was privileged enough to purchase my OnePlus One a while ago as it was the first Android phone that launched with CyanogenMod as its official ROM. Traditionally, ROMs like CM would be the first to market with upgrades but Google has been changing their policies by releasing their code to large manufacturers earlier to encourage them to upgrade their marquee models to the latest version of Android as soon as possible. While the ROM is not an official one, I decided to upgrade my OnePlus One to the Android Lollipop. After surfing around the web, I decided to come up with a summarized version of setting up my version of how I ended up installing Lollipop.

These steps are OSX specific

Preparation

You typically would need to unlock the bootloader, install a custom recovery and then root your phone in order to replace it with a new ROM. This steps that I’m outlining here would be the basic prep to do that and you can always replace your ROM with other OnePlus One ROMs that you choose to in the future. OnePlus actually has a pretty good write up on the site as well as this is a summarized version of those steps

  1. Installadb/fastboot,
    • Download Android SDK
    • Unzip it into a folder. I typically create temp in my user folder. To access it:
      mkdir ~/temp
      cd ~/temp
  2. Install Android SDKto access ADB andfastboot
    • Go to the folder you’ve unzipped (i.e. /Temp/Android-SDK)
    • Run the Android UI
       ./android sdk
    • Select and install Android Platform Tools
    • Once this is installed, you should see the platform-tools directory in the folder as well as the adb and fastboot files
  3. Unlocking theBootloader
    • Reboot the machine into Fastboot mode
      Shutdown the phone
      Press the Volume Up button followed by the power button. Ensure that the USB cable is not plugged in.
      If the phone is booted into Fastboot mode, you’ll see the “Fastboot Mode” text
    • Type “fastboot device” and you should see your device there
    • Type “fastboot oem unlock”
      This will also wipe your phone. You should see the Android robot being fixed and then it will automatically reboot your phone when you’re done
    • Once the phone is re-booted, turn on developer options
      • Go to settings → About Phone → Tap on Build Number 7 times
      • Tap back and you should see Developer Options
    • Turn on USB debugging and disable CM Recovery Protection
      • Go to Developer Options and select “ADB debugging”
      • Go back out to settings and re-enter Developer Options. You should see the “Update CM recovery” option
      • Uncheck the “Update CM recovery” option
  4. Download the latest version of TWRP for OnePlus One
    • Download the latest TWRP recovery
    • Copy the file to the platform-tools directory
    • Reboot the machine intoFastboot Mode by typing the following in theOSX terminal
      adb reboot bootloader

      or shutting down the device and rebooting it to the bootloader by pressing the volume up button and power

    • Install the custom recovery by typing
      fastboot flash recovery .img
    Once the recovery and bootloader is installed, you’re now ready to install any ROM of your choice. In this particular case, we’ll be installing CyanogenMod.
  1. Download the latest version of CyanogenMod 12 (Lollipop)
  2. Download the latest version of Google Apps
  3. Copy the files to the Download folder on your OnePlus One
  4. Shutdown the device
  5. Reboot the device in recovery mode by  pressing volume down and the power button
  6. Wipe your current data
    • Click on the Wipe Button
    • Click on Advance Wipe
    • Select Davlik Cache, System, Data and Cache
    • Swipe to Wipe the existing data
  7. Install the new ROM
    • Click on the Install button
    • Select the ROM installation file you had downloaded earlier
    • Swipe to Confirm Flash
  8. Install Google Apps
    • Click on the Install button
    • Select the Google Apps file you had downloaded earlier
    • Swipe to Confirm Flash

You’ll note that I didn’t go through the root process. Overall, I have to say that I’ve been pretty happy with the CM Lollipop ROM.

Updated: One thing to note is that CM12 is currently not an official build so I modified the link to point to the CM12 build. Also, special thanks to Jesse Anger for creating the original install instructions and doing the original testing

Re-installing ruby after upgrading to OS X Yosemite

I recently upgraded to OS X Yosemite and ran brew install. As a result, my rails setup failed. In the past, re-install ruby worked. However, in this case, when I re-installed it I ran into this issue

BUILD FAILED (OS X 10.10 using ruby-build 20141016)

Inspect or clean up the working tree at /var/folders/93/p8zdbgn14j99_l5x7js97zkm0000gn/T/ruby-build.20141020234934.40511
Results logged to /var/folders/93/p8zdbgn14j99_l5x7js97zkm0000gn/T/ruby-build.20141020234934.40511.log

Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS=" -O3 -Wno-error=shorten-64-to-32 "
make: *** No targets specified and no makefile found. Stop.

To fix the issue, I had to reinstall ruby with the following flags:

RUBY_CONFIGURE_OPTS="--without-gcc --disable-install-rdoc" rbenv install 2.1.3

 

Setting up WordPress on Ubuntu

Lately I’ve been finding myself installing WordPress sites for numerous reasons. WordPress is a shocking versatile web site framework built on PHP if you just want to publish content extremely quickly. There’s typically a plug-in for any function that you’re looking for. In order to run WordPress on Ubuntu, you’ll need to do the following things:

Setup PHP

  1. Install PHP

Setup the database server

For instructions of how to manage MySQL, check out my MySQL cheatsheet

  1. Install MySQL
  2. Install the MySQL module for PHP on the web server
    sudo apt-get install libapache2-mod-php5
  3. Create a new user
  4. Create a new database
  5. Give the user access to the database

Set up the Web Server component

  1. Install Apache
  2. Download the latest version of WordPress anduncompress it
    sudo wget http://wordpress.org/latest.tar.gz
    tar -xvf latest.tar.gz
    
  3. Move your site to a new directory and give your Apache user access to that directory
    sudo mkdir /
    sudo cp -r wordpress //
    sudo chown -R www-data:www-data //
    
  4. Create an Apache configuration file for your site
    sudo nano /etc/apache2/sites-available/.conf
  5. Paste the following into yourconfig file and save it
    <VirtualHost *>
        DocumentRoot "//wordpress"
        ServerName 
        <directory "="" <directory="" name="" wordpress"="">
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
        
    
  6. Enable the configuration
    sudo a2ensite .conf
  7. Enable the appropriate Apache mods
    Enable rewrite for pretty permalinks

    sudo a2enmod rewrite
  8. Reload Apache
    sudo service apache2 reload

Assuming you’ve already set up your DNS settings to point to the right server, you should be able to get started with setting up the site. When you go to http://, you should be able to start setting up the site.

These instructions work on the following configurations:

  • Ubuntu 14.04 and Apache 2.4

 

Browser OS – the future of personal computing

I was quite impressed with the idea and implementation of Chrome OS last year although I ended up giving up the Chromebook for a new Macbook Air. For me, the reason why I gave up the Chromebook was less about the failure of the OS but rather the shortcoming of the physical hardware. I still believe that Chrome OS is the future of computing. So when Google announced new Chromebooks this year, I was eager to try out the new hardware to see how they would fair with new hardware.