Home IT Improvements

Ubuntu AirVideo Server with NAS

Some people use their weekend for home renovation projects, I however used this particular weekend to perform some home information technology (IT) upgrades. My replacement iMac 27" Late 2012 model arrived this week, so after setting up this monstrosity of a machine, I am left with an extra box. An old Windows PC running Windows 7 with a very old AMD Athlon™ II X2 245 Processor along with 3GB of memory. Unfortunately the PC’s motherboard, a Gigabyte M61PME-S2P, is a three and half years old motherboard. It doesn’t even have gigabit ethernet on the board. Instead of having it sit around, I figured that it would be a good idea to try my hands on building a Linux file and media server.

I could do FreeNAS, but I wanted flexibility to run some additional software on the box in addition to just perform as a file server. We have many iOS mobile devices in the house, so I also decided to install Air Video Server on the machine. If you are not familiar with AirVideo, you are missing out. Check them out at http://www.inmethod.com. I ended up running Ubuntu Desktop 12.10 release as an experiment.

Here is a quick to do list that I set for myself:

  • Installed Ubuntu;
  • Consolidate old hard drives into a single volume for media storage;
  • Install samba to share the volume, so I can copy media to it from other computers in the house;
  • Install AirVideo server and configure it to serve media from the above volume;
  • Ensure all of the above works when we reboot the box

Installing the operating system from a USB key was a piece of cake. This weekend project also gave me the opportunity to hunt for old hard drives that have been sitting around dormant in my home office. I wanted to place all my old hard drives into this box, reborn as my new Air Video Server (I named it AVS for short). To my disappointment the old motherboard only allowed for two SATA drives, and one was already taken. Therefore, I could only repurpose one of three old drives that I have found.

Adding drives to the AVS box, forced me to dust off the webs from my Linux knowledge base. I had to re-familiarize with myself on the topic of how to use lshw to find out the hardware that is being installed on the system, and using fdisk to partition the drives properly. I had two old drives. The first a 300GB SATA drive, and the other a 320GB drive. I created a single primary partition on each drive.

Once I’m happy with the partitioning, I’m ready to create a software RAID array or volume using the mdadm utility ( http://en.wikipedia.org/wiki/Mdadm ). I used mdadm to combined the two drives into a single volume of RAID-0 of 600GB. I didn’t care about redundancy or backup, so I chose RAID-0 instead of RAID-1. I am thoroughly impressed by mdadm in its ability to handle drives of different models to accomplish this.

Now that I have an array device created, I have to create a file system using mkfs.ext4. The last time I created a Linux file system, we only had ext2. I then have to brush up on my mounting procedures and configure the mount points with /etc/fstab. The mounting configuration was an optional step, but I wanted to rename the default mount point that mdadm gave me. After some more permission related configurations, and the installation and configuration of samba on Ubuntu to share the mount point, I have a Network Attached Storage (NAS) that I can copy videos to.

The installation of AirVideo Server was super easy. Kudos to Sergio Rubio. I literally downloaded the Debian install package from https://launchpad.net/~rubiojr/+archive/airvideo and I was done. After quickly configuring the server by editing the AirVideoServerLinux.properties in /opt/airvideo-server, I manually run the AirVideo Server on the command line to see if it works with my iPad. This was a good moment, but I am not finished.

I needed to ensure that all the services related to this new AirVideo Server comes up when the machine is rebooted. This launched another journey down memory lane in terms of /etc/init.d. Again to my amazement, I simply searched init.d and airvideo on Google, which lead me to a post ( http://www.inmethod.com/forum/posts/list/3485.page ) with a ready made /etc/init.d shell script. After some minor adjustments, I was off to the races with a completed AirVideo Server using my old computer and hard drives.

Although Ubuntu has made great strides in making Linux easier to use, I had to do most of the above on the command line as I find the user interface of Ubuntu is still thwarted with many bugs. Creating something like this is still not for the faint of heart.

Ontario Teachers Strike – Fighting For Their Rights

Consider this when fighting for your rights.

When I was a little kid, I thought living in a free country is to do whatever you want. It was later that I learned that in a society with limited resources, ones rights and freedom needs to be limited such that the freedom of others are not encroached. The peaceful coexistence is only made possible when a balance of freedom and rights exists amongst all. Trouble arises when one or more individuals believe that their entitlements to certain rights are more than the generosity of the others. The level of generosity is often determined by the availability of related resources in question.The concept of basic or absolute rights and privileges are only made possible by the consensus of the populace. This consensus is more easily reached when resources are in abundance and are not contested. It is easier to give when you have everything. Human rights would be difficult to adopt by many if others have to sacrifice their own sense of freedom to do so. I’ve always used this concept to gauge and assess the morality of ones actions to pursue a goal.

I am in full support of the teachers to lobby and fight for their perception of rights as long as their actions do not encroached on the rights of others. I fear that in this particular situation the rights of others are indeed compromised.It is ironic but not surprising, that the method that the teachers choose to protect and fight for their own rights is to erode the students’ rights of education. Of course education is their main asset to give, and they must leverage it to make their point.

In this situation, it is easy to reference ones rights and lay blame on the group who encroaches them. The only way to reach peace is to have all parties to readjust their sense of rights relative to the limited resources in question. Until this new balance is realized, there will continue to be ill feelings amongst the parties. As a parent, I am willing to reassess and come to terms the new quality of education that my children is receiving based on the limited provincial funding the government can provide. Can the other parties, the government and the teachers not do the same? Reassess their distribution of resources and their sense of rights respectively?

An Elder Has Passed

For me, when I learned of someone that I know has passed away, I immediately reflect upon the shared experiences that I had with him, wanting to hold dear to those moments, and finding the sad realization that one always want to remember more than one can retrieve.

Today I learned that my brother-in-law’s father has passed away. My mind immediately recalls a gentle and wise man from a previous generation, who I had several opportunities to chat with in different occassions.

Our first meeting was at a brunch gathering during Dim Sum. This is the first time that we met my brother-in-law’s family, and they were kind enough to entertain us with a bit of our culinary culture. Since then we have had other BBQ’s and dinner gatherings when we gossip about current events, economics, politics, etc.  

I would not say that I got to know him really well, but I would say that through these conversations, I learned that he was a kind and sensitive man.  What impressed me the most is his way of calmly conveying his past experience and perspective by delivering carefully chosen statements in a calm and measured fashion, while retaining a dose of good humour. If I am in search of a teacher, he certainly possessed the sensei qualities that I wanted in a master of life.

My brother-in-law and I spend a lot of time together during the weekends, riding our bikes. We of course talk a lot, and on many occassions he has praised his dad. Judging from his values, I know that the man who raises such a son must have high values of his own.

I selfishly write this piece so as to help me to recall more of these memories, with the hope that they will be retained, and in doing so, help me rationalize the good bye that I must say to the elder that I respect. 

iPad’s Camera Kit

Posted from: ON L4S 2G6, CanadaWe purchased the iPad camera kit today with the hope of storing videos that can be viewed on the iPad, since the iPad only has limited storage. It would be nice to store some videos on an USB stick for viewing during vacation, or a long business trip.

For this to work we discovered that we had to over come a couple of barriers, both are needed to mimic the USB stick as if it was a camera when connected to the iPad via the camera kit.

The first thing to ensure is that the USB stick must be formatted in FAT32, and has a DCIM sub-directory in it’s root directory. All images and videos must be stored in this directory.

The second thing is that the filenames cannot be exceedingly long. I followed the IMG_0001.JPG or MOV_0002.m4v formats, the former for pictures and the later for movies. Of course, the movie must be iPad compatible, which usually means H.264 video with AAC audio. The iTunes software can convert your video to this format.

I hope this helps any one who is trying to do the same.

Vacation Photos

Posted from: ON L4S 2E4, CanadaAnother hopefully constructive rant.

I just spent more than 6 hours aggregating photos from our Far East cruise and vacation from this past fall. And I think I only processed about 20% of them so far. I think the photos were taken with over 5 different cameras of various form and quality. The trip had over 25 individuals, and as you can imagine there were many cameras amongst us.

Many photos were blurry and others had weird colors due to improper white balance settings.

With today’s photo processing and sharing technologies, my advice is that when going on vacation with a large group, just have two designated cameras and photographers who know what they are doing. They don’t have to be pros but at the very least should understand the notion of shutter speed and focus.

Okay my rant is over and now back to processing the pics. Arghh!

Cognitive Surplus

Posted from: ON L4S 2G6, CanadaAfter seeing the following TED talk:

http://www.ted.com/talks/lang/eng/clay_shirky_how_cognitive_surplus_will_chan…

By Clay Shirky on the topic of cognitive surplus, I was reminded of a discussion this week on Facebook. Parties to the discussion thought users of Facebook are sharing private information without knowing the full consequences of their deeds. Although this is a common argument that I’ve heard of countless times, it does have its merits. This is a popular argument against the use of social networking sites like Facebook by parents, trying to ward off their innocent teenagers against unknown threats. However, after watching this insightful video and the idea that we are transitioning from a crowd of information consumers to a population (or dare I say a generation) of content creators, I now see platforms such as Twitter and Facebook to have the potential of being the general enablers of cognitive surplus, which Clay Shirky defines in the video.

Another idea that I noted when watching the video is that the quality of the content is less important than the ability to generate and share the content. This brings me back to some of the same ideas introduced in the book, “The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations”, published in 2004, written by James Surowiecki. I bring this up because it is easy to criticize mundane and stupid tweets on Twitter, such as when people tweet what they eat and when they go to bed. However the same pointless information may be useful in a different context. For example, a study on dietary habits or sleeping patterns. I guess in the world of cognitive surplus, it is better to have more information diluted by a spectrum of quality, than to have restricted information perhaps curated by a biased party.

Just jotting down some random thoughts after watching another inspirational TED video.

Article: Viber: Make Free VoIP Calls on iPhone Over 3G/WiFi | iPhone in Canada Blog – Canada’s #1 iPhone Resource

another interesting VoIP solution for the iPhone. 
Viber: Make Free VoIP Calls on iPhone Over 3G/WiFi | iPhone in Canada Blog – Canada’s #1 iPhone Resource
http://www.iphoneincanada.ca/reviews/viber-make-free-voip-calls-on-iphone-over-3gwifi/

iPhone Exchange 2007 Email Sync Issue

Last night I had trouble getting email from my iPhone.  It kept on reporting that it couldn’t communicate to the server.  I thought it was a server issue, so I left it overnight, but this morning it was exhibiting same symptoms.  We use Exchange 2007.  I proceeded with a few sanity checks.

  • The email on my desktop function normally.
  • The email via Outlook Web function normally.

With the above two checked, I knew that I was using the correct server and my login credentials were correct.

I’m using iOS 4.2.1 on an iPhone 4, so I started to Google for some answers, and came across this post.

After backing up my iPhone, I fully reset the phone and erase all contents and data on it.  I then register the phone with iTunes as a brand new phone.  Before I sync anything to it, I checked my Exchange connectivity, and everything was back! I follow this step with a restore from the previous backup, and the Exchange account did not work again.  Therefore, I repeated the fully reset, but this time I skip the restore and setup everything manually again.

Note that just a full reset and restore will not work.  Neither does deleting the account and reset the account.  I also tried changing my account’s password, and that also had no effect.  Another symptom to be aware of is that while trying to setup the Exchange account again, the phone was unable to verify the account. From all of this, I concluded that the registration as a new phone was a critical and necessary step.  I don’t know what the root cause was, but it sure was a pain.  It literally started to happen. For a guy who travels a lot, I’m glad this didn’t happen while I was in transit.