Friday, July 3, 2015

Install CentOS 7 on Virtualbox

I installed CentOS 7 on virtualbox not long ago. A few bumps on the road, this post will help me jolt my memory in case I have to do it again.

1. Download CentOS-7-x86_64-DVD-1503-01.iso
2. Click “New” on Virtualbox Manager, enter your new virtual machine name “CentOS 7”
3. Select mem size, I picked 4G
4. Default “create a virtual hard drive now”
5. In the popup, default “VDI”, default “Dynamically allocated”, pick hard drive name, I picked a name without spaces, I picked 100G size.
6. Your VM “CentOS 7” is created, no OS installed yet.

7. Click on the new machine, then click Settings
8. I have an “empty” under Controller: IDE, click on it to have it selected
9. On the right hand side (under attributes), I see CD/DVD drive, there is a DVD icon, click on the icon, select “choose virtual CD/DVD disk file”
10. Navigate to your  CentOS-7-x86_64-DVD-1503-01.iso
11. Start your VM, you may have multiple available ISOs to choose, select “CentOS-7-x86_64-DVD-1503-01.iso” to start your VM 
12. Select Install CentOS 7
13. It will complain about input capture, you need to use “right control” key to navigate between host and VM
14. Importantly, select “Software selection”, then select “GNOME Desktop”. Here is why: when I didn’t select a desktop and tried to configure “Guest additions”, I wasted numerous hours trying to patch up the system to get it working, I just couldn't get it to work without the Desktop version. Then I re-installed the system and selected the “GNOME Desktop” version, I didn’t have to patch up anything, “Guest additions” worked flawlessly.

Two other important notes (I had relearn these tricks so many times after a while, hence the notes here):

1. if you get "Fast TSC calibration failed.", don't panic, don't just stare at the black error screen. For me, I just hit return key. That seems to do the trick for me. \

2. when you don't have network connection inside VM, run as (root), dhclient command!

Convert a Danby Chest Freezer to a Frig

Yes, you read the title right. Instead of XSLT transformer, I’m doing a real world transformation this time.

SOA 12C has not caught on fire; posting old stuff is getting boring. So I thought I'll pick up a new topic for a change.

I bought a Danby chest freezer last year. They are not kidding when they called it a freezer. Although it came with a temperature dial, the highest temp you can set is way below freezing. It is puzzling to me why won't they provide a wider temp range so user can operate it either as a freezer or fridge.

I thought there would be an easy way to rig the temp control somewhere to fool the system. After searching online, I found out there is no easy trick. I decided to bite the bullet and give it a try to replace the controller myself. It was quite an enlightening experience. I stumbled on so many trivial things that pros didn’t bother to mention, after I overcame those problems, I thought I would share it so it may benefit other amateurs like me.

I ordered an 110V STC 1000 digital temp controller for about $23 (including shipping) from  When I opened the box, I got more questions than answers. After much online reading, a few trips to RadioShack and Home Depot, this is what I finally sorted out:

How does the existing controller work?

The picture on the left shows the original controller. The picture below shows the STC-1000 controller (on the left) next to the original, It's not wired yet.

The original sensor came with a metal probe, that metal probe (I circled #4 on the drawing below) is directly linked to the controller with a white insulated line circled #5. The white cover is the temperature insulation, I believe that mechanical temperature sensor relies on that probe to transmit some chemical gas pressure based on the temperature change inside the freezer. That also explains why there is no power supply to the original controller itself. The mechanic controller acts a switch to connect and disconnect the power from the black hot line (circled #2) and red line (circled #3), which delivers the power to the frig.

In the picture where I circled #1 is an always on LED light.

Switching to STC 1000

There are 4 pairs of wire terminals on the back STC 1000.

Wiring the sensor:
Terminals 3 & 4 are for the sensor that came with the unit. The digital sensor is the black blob on the tip of the wires. The wires are actual signal lines. I simply routed the sensor wire from the side of the frig, then tossed the tip inside the frig. Because the wire is signal wire, it doesn’t matter it’s exposed to the room temperature.

The overall power wiring.
There are three parts which need power:
·        Circle (a) – LED indicator
·        Circle (b) – STC power supply
·        Circle (c) – switch that delivers power (red line) to the frig
I used (e) and (d) to split the incoming power from (e)
·        (e) splits power to (d) and (a),
·        (d) redistributes power to (b) and (c)

Wiring Specifics:
Circle (a) shows the indicator wiring:
 I got the original neutral white and original black wire so the indicator has constant power.
Circle (b) shows the controller power wiring (they are terminals 1&2 on STC-1000).
I got the piggybacked neutral white, then got black power line from (d)
Circle (c) shows the power switch wiring (they are terminals 7&8 on STC-1000):
I got black power line from (d), then the red line goes to the frig unit. As temperature changes, the switch will connects/disconnects the power to the red line, and therefore control the refrigerator.

When all said and done, it was a refreshing experience! I got a digital controller and I can set the temperature to anything I like, although it's in celcius only :)

To configure the digital controller, you'll just need to google STC-1000 user manual. My unit came so cheap, it didn't even include a print out.

Please note the STC-1000 comes with power deliverying circuits. One for cooling (terminal 7&8). One for heating (terminals 5&6).

Since I only need the cooling, I left the heating terminals unwired. The purpose of both cooling and heating is to control an incubator, which requires constant temperature. When inside tempearture is above the set value, the cooling unit kicks in. (Obviously, I only have cooling unit). When it's below the set temperature, the heating unit will kick in.

The photos below shows how I made a replacement control panel with a cut out plastic part. The project costed me a whole weekend.