firewing1's blog

Attaching MBR or GPT disk partitions to a VirtualBox VM

On one of my development machines I triple-boot so that I can test in a variety of operating environments. My default is OS X and the other day I wanted to write documentation using DocBook. I knew that my Linux installation already had publican installed and ready to go (publican is a wonderful documentation tool written by Red Hat to facilitate the publishing of DocBook-based documentation) and I really did not want to setup a new Fedora VM that duplicated a setup I already had.

In reality, a new VM would not be all that much effort, but I though it would be really handy to know how to boot a VM up from a physical partition and this way I could kill two birds with one stone. After some research, it seemed using VMWare's VMDK (Virtual Machine Disk Format) images was the most appropriate, as the metadata could be tricked into pointing to physical partitions instead of files. Unfortunately, the tools VirtualBox provide to create them are not compatible with GPT disk tables out of the box. This blog post does mention a trick to convert the VMDK metadata to match the GPT disk layout, but it failed consistently when I tried.

I then, by fluke, found Dave Vasilevsky's vmdk-raw-parts script on GitHub which worked flawlessly! Its usage is well documented so I will not bore you with the details, but with that said after using it to create my custom VMDK, the only change required was to run chmod 666 /dev/diskXsY to grant my user write permissions to the disk (prevents you from having to start VirtualBox as root).

Some Extra Troubleshooting

These details are completely irrelevant to the above, but I wanted to mention them here for others wanting to run the same setup:

  • If you need USB pass-through, remember to set your VCPUs to 1; set it to anything higher and USB stops functioning.
  • You'll need to redo the 'chmod' when ever you reboot your machine, as the permissions on the dev node get reset upon boot.
  • During the trial-and-error process of getting this to work, I often needed to recreate my VMDK and reload it. VirtualBox will moan about mismatched UUIDs... The simple fix is to open File > Virtual Media Manager... to delete then re-add your VMDK file.

Syncing your iOS device (either iPod, iPhone or iPad) with multiple iTunes libraries

With Apple's changes surrounding iCloud, managing media on iOS devices has become much easier and it is no longer absolutely bound to a single computer. However, I have still found it tricky to sync a single iOS device with multiple computers (different iTunes libraries) without having to entirely wipe the device first.

I synchronize my iTunes library between two computers regularly, so both machines have up-to-date copy of all media files. Furthermore, I set them up with the same username (but different hostname), so the iTunes media file paths are identical between machines.

Searching Apple forums revealed this solution by turingtest2: apparently, each iTunes library is assigned a randomly-generated "library ID". This identifier is stored on the iOS device, so if it doens't match when connecting to a new computer, it will request to wipe the device before proceeding with the sync. Simply copying my entire ~/Music folder from one machine to the other was enough copy all the iTunes metadata (including the library ID) and my device now happily synchronizes on either machine. For those wanting to save time and not copy their entire ~/Music folder, see the forum post for the exact files you'll need to copy.


Microsoft's Office 2013 licensing changes

I recently gave a few price quotes for a client and in that process, I did some background research regarding the new Office 2013.

The licensing for Microsoft Office 2013 states that copies are installable on a single PC only, non-transferable. If your disk or motherboard fails, that Office installation was tied to the PC and you must purchase another.

I just don't know what Microsoft was thinking. As of last week, was selling copies of Office 2010 Home & Student (3 user) DVD media for $144.99 and Office 2013 Home & Student (single user, non-transferable) for $139.99. If you ignore the non-transferability of Office 2013 and just consider the raw cost per user-license, then Office 2013 is 2.89 times more expensive! Then consider in the fact that should your PC ever fail, you would have to get another brand new copy for $139.99... The cost per user-license of Office 2013 could therefore rise to nearly 6 times as expensive per user-license compared to Office 2010 after your first PC failure.

Many (myself included) saw this as a money-grab and an attempt to force users to their Office 365 subscription-based service, a $99.99 per year subscription grants access to the latest Microsoft Office software for up to 5 users in a household. The pricing scheme for this is a little more reasonable per-user, but a static fee each year means that Microsoft inevitably makes more money... Say a PC lasts 5 years, then they're making 5 x $99.99 instead of selling a single copy of Office for ~$150.

Last week it look like Microsoft gave in to the massive outcry from users and announced an updated clause for the Office 2013 license agreement:

You may transfer the software to another computer that belongs to you, but not more than one time every 90 days (except due to hardware failure, in which case you may transfer sooner).

Well, at least that's a little more reasonable.


Spam comments with Mollom

I have used the free Mollom plan to protect the forms on this site with CAPTCHA or text analysis. For the past few months, it has been working very poorly to be honest. Comment posts that were very obviously spam were getting though consistently and I have been removing 20-30 spam posts en masse about once a week.

I submitted a ticket when I first noticed this happening with Mollom support and got a quick reply, but after my initial replies the request was waiting a follow-up from them for quite some time (and twice, at that).

Today I got news that it was a service-wide issue and it has been resolved. Hopefully you will notice a significant reduction in spam posts! Honestly I am not very happy with Mollom at the moment and may look to other alternatives if this doesn't pan out, but then again it's a free service and it worked wonderfully in the past so I can't complain. You get what you pay for.

The issue was more that I was looking at taking 5-10 clients to their basic paid plan, but after my experience with their customer service I am hesitant to do so. As always, I guess time will tell.


Bootstrap responsive theme

I have been reading a lot of buzz around Twitter's Bootstrap responsive theme and although I am a huge fan of the Omega theme, I think bootstrap has a lot of potential and wanted to experiment with it.

My blog is long overdue for a facelift, so I now present to you my Bootstrap-ized blog! At the moment it is simply using the base theme, but I will be implementing a customized sub-theme shortly. I am interested to hear what you think (and if it does or doesn't work on mobile devices) in the comments!

Update 2013-02-08: I have performed minimal customization to the theme and after working with it for a bit I can start to see Bootstrap's strengths and weaknesses. Although Omega is very flexible and has a bunch of responsive options, I feel like they could use a little more polish; Bootstrap's responsive design implementation feels so quick and smooth and it also scales well at all viewport sizes. I also like Bootstrap's barebone styles (font, text layout, etc) much better than Omega's defaults which I believe use serif fonts (*ugh*). That said, such a thing is very easy to change in CSS and so it's not a huge disadvantage for Omega.

Where Omega also beats Bootstrap (and by a large margin) is when it comes to theme customizability. The Bootstrap theme settings page offers few options and in several instances I found that several common Drupal-specific CSS rules (such .indent) were missing entirely. Omega has been around for quite some time and as a result has excellent integration and provides a plethora options to modify the zone, region and block grid right the theme's settings page.

If I had to do it over I would stick to Omega, but Bootstrap will be giving it a run for its money once it picks up on some of the grid customization tricks Omega has.