Thursday, March 19, 2015

Installing virtualbox guest additions on Centos 7 minimal image

I've just spent some time setting up a bare Centos 7 image to support development stripping out as much as possible. While CoreOS is probably a better choice, we run redhat in production at this point and centos is a better fit for the time being. The problem I've found is that many of the instructions available via google were written against prerelease versions or espouse manually installing random rpms instead of just using yum. While I get this "works", I'm not a huge fan of this approach and would rather do everything with the package manager. After a LOT of scouring and trial and error, I finally found the "magic" combination.

The winner is courtesy of http://www.pc-freak.net/. I've taken these instructions and tweaked them slightly for my purposes.

The original poster did this on a more "full fledged" version of centos with a windows host and my instructions are for a minimal install using and OSX host (though I'm certain the OP's instructions will work too. First, mount the guest additions cd from the virtualbox gui (original link has a photo, but it's under devices->Insert Guest Additions CD Image. Then log into the console as root. Once you've done this, enter the following commands:

yum -y update kernel*
reboot -r now

After this step, you'll have to log in again. Then run the following:

yum install -y gcc kernel-devel kernel-headers dkms make bzip2 perl
export KERN_DIR=/usr/src/kernels/`uname -r`
mkdir /media/cdrom
mount /dev/cdrom /media/cdrom
cd /media/cdrom
./VBoxLinuxAdditions.run

Additionally, there are some instructions that I believe will work, but installed more than I really wanted to or I didn't discover until after. Additionally (pun intended) a key point I missed originally is that the minimal iso is missing default packages (perl I think was the culprit) that you need to properly build the guest additions so instructions for the "full blown" image will fail for mysterious reasons (i.e. the "build" symlink is broken)

  • This seems like it would work too, but installs more than I really wanted to over my cell phone connection
  • I found this after I wrote my post and it is virtually (pun intended) identical to my instructions.

Examples I tried that did NOT work or were too convoluted:

  • centos.org forum had all sorts of crazy "wget" hackery suggested...While it may work, I like the epel approach better
  • this version on stackexchange CAN get you there, but you have to read all the comments to figure out what is really required for a minimal install

I realize my post is a bit of a duplicate, but as there's no good way to get rid of historical anachronisms on the internet, this is an attempt to boost the ranking of the better approaches

Monday, March 16, 2015

My (potentially bad) parenting advice

Parents of the world, I have one piece of advice that will give you a tool to help your child become happy, healthy, and productive. Give them a shovel and tell them they can do anything they want with it. Note, if you are in an urban area, this might be BAD advice, so suburban and rural people listen on, urban folks find a friend in the burbs with a yard and then follow along.

A kid with a shovel is an amazing thing to watch. Kids who are impossible to pry from the WII/PS3.. who don't like soccer/football/whateever, who might otherwise be surly or withdrawn... will become captivated by the idea that they can can explore and possibly find buried treasure, fossils, rocks, and dig/play for hours. Add water to the mix and the possibilities are endless: sand castles, mud castles, mud pies, mud pits, waterfalls, ponds, you name it!

Too often in our modern world, we think of parenting as an activity that requires structure, supervision, and direction. I think excessive amounts of structure, supervision, and direction could actually be a bad thing, they remove creativity and adventure.

Note: to my neighbors, be careful walking through my back yard, there are some holes back there and you could break a leg note #2: follow this advice at your own risk...some kids shouldn't be trusted with sharp implements...

Friday, January 16, 2015

Accuracy Versus Precision

In a recent elevator conversation with the team, we stumbled on a side conversation about the difference between accuracy and precision. I've always used them defined this way:

  • Accuracy - The nearness of a value to the "real" value
  • Precision - The resolution of a measurement

It turns out this is not entirely correct and these definitions, while technically accurate in certain fields, are not universally held to be true. In fact, the above definition of precision is almost completely wrong for most other engineering and scientific disciplines. A more accurate (see what I did there?) set of definitions would be something like:

  • Accuracy - The nearness of a value to the "real" value
  • Precision - The probability of repeated measurement yielding the same result
  • Measurement Resolution - The resolution of a measurement
Source: Wikipedia