Taming Windows 7 in a VirtualBox VM Using Raw Disk Access

VirtualBox
Image via Wikipedia

(This is even more technical than my other technical posts. Consider yourself warned.)

I wanted a dual-boot system between Windows 7 and Ubuntu 9.10 64-bit.  I wanted both systems to be fully functional as 64-bit operating systems and have full access to the computer’s hardware.  Accomplishing this has been well documented and I won’t bother discussing it.  I simply repartitioned the hard drive into two partitions, and then let Windows 7 install on one of them and then installed Ubuntu 9.10 on the other.  Grub gives me a choice when the machine boots and defaults to Linux, which is what I wanted.  Then I decided I want to run Windows 7 in a VM on the Linux machine, and that I really wanted the VM to run from the Windows 7 partition already created.  I had heard this was possible with earlier versions of Windows, so I figured Windows 7 should be no exception (at least if Vista can support such a scenario then Windows 7 should be the same).

I started by reading this, which gave me good guidance, but was the other configuration – Windows as the host and Ubuntu as the guest – I wanted the opposite – Ubuntu as the host and Windows as the guest.  That led me to the VirtualBox User’s Guide, which does a great job of describing the process of using Raw Disk access.  And finally, I did some perusing of the VirtualBox forums to find a couple specific answers to getting the setup working.

In an effort to help document this scenario, here are the things I did to get it working:

  1. Read the VirtualBox User’s Guide on Raw Disk Access (here)
  2. user@computer:$ VBoxManage internalcommands listpartitions -rawdisk /dev/sda
    VirtualBox Command Line Management Interface Version 3.0.8
    (C) 2005-2009 Sun Microsystems, Inc.
    All rights reserved.

    Number Type StartCHS EndCHS Size (MiB) Start (Sect)
    1 0x07 0 /32 /33 12 /223/19 100 2048
    2 0x07 12 /223/20 1023/254/63 99900 206848
    3 0x07 1023/254/63 1023/254/63 70000 204802048
    5 0x83 1023/254/63 1023/254/63 65624 348176808
    6 0x82 1023/254/63 1023/254/63 2839 482576598
  3. Notice how there is a 100MB partition (partition 1) – that is the boot partition for Windows 7. This, along with partition 2 are the Windows 7 partitions. Partition 3 is my ‘data’ partition, which is shared between both OSes. All of these partitions need to be enabled for read/write access by me in order for VirtualBox to load them up. I did this by:
    user@computer:$ chmod 666 /dev/sda1
    user@computer:$ chmod 666 /dev/sda2
    user@computer:$ chmod 666 /dev/sda3

    I know this is not the most secure way of doing things, but it works for me.

  4. Now it is also important that there is a place for Master-Boot Record (MBR) to get loaded from VirtualBox. This is necessary so that when the VM starts up it has an MBR to use – otherwise it will try to use Grub and will fail miserably. To get a ‘dummy’ MBR created I read a couple forum posts (here), and then did the following:
    user@computer:$ sudo apt-get install mbr
    user@computer:$ install-mbr -e12 --force ~/vm.mbr

    The -e12 argument means I want the first and second partition enabled in the MBR. This is critical to getting it all to work – otherwise the VM won’t know which partition to enable.

  5. Now we are ready to actually create the raw disk for VirtualBox to handle, I typed in the following:
    user@computer:$ VBoxManage internalcommands createrawvmdk -filename /home/rajat/win7.vmdk -rawdisk /dev/sda -partitions 1,2 -mbr /home/rajat/vm.mbr -relative -register
  6. Go through VirtualBox, create a new VM, mark it Windows 7 (in my case 64-bit) and save. The VM is ready to be started, but it won’t work entirely yet.
  7. Set the VM to mount the DVD drive and put in your Vista DVD. Start the VM. Press F12 and select the DVD drive to start (c). Let Win7 setup start, pick a language, and then click the ‘Repair installation’ option. Go through automatic repair, and then let the VM restart. This time it should go into Win7 running off the raw disk.

Let me know if you have any trouble with these instructions, or would like to add to them. Drop me a line to know if these worked for you as well. I can’t wait to use these steps on my other boxes and put Windows in a box while I’m using it.

Update: There is a regression in VirtualBox 3.10 regarding raw disk access. Any machine that boots with raw disk access stops booting using VirtualBox 3.10. Read more about it in the documented bug report. As a workaround simply downgrade to VirtuablBox 3.08 or install the OSE edition. I got hit with this the day after this post went live, downgrading solved the problem for me.

Reblog this post [with Zemanta]

Engineering Team Communication: Using Mailing Lists Effectively

SAN FRANCISCO - JANUARY 24:  A stack of vote-b...
Image by Getty Images via Daylife

Most teams in business today rely on email.  Though imperfect it is ubiquitous for electronic communication.  It has proven the lowest-common denominator for communication between team members.

The question of how to organize email is often left to each team member.  I think this approach is lacking – it leaves folks with good organization skills at an advantage to keeping up with information.  As a team we should all be committed to keeping everyone in the loop.  A little effort up front can pay big dividends in team productivity.

Mailing lists allow team members to easily filter email and keep track of emails as appropriate to their role on the team.  In larger teams they also allow for managers in the team to manage the email lists appropriate for their team members.

From my experience (which is assisted by my last team at Microsoft – the former Max team) the following list of mailing lists should be created for a product team.  Assume each one is started with a short description of the product/team (for example: gizmo-dev is the developer mailing list).

-dev: developer mailing list.  Only developers on this list.
-test: test mailing list.  Only testers on this list.
-bus: business analyst, program manager mailing list.
-team (aggregate of -dev, -test, -bus): entire team, sometimes includes upper management
-commit (aggregates team): all checkin emails related to software development
-deploy (aggregate of team): deployment announcements for software deployments
-chat (aggregate of team): non-work related chatter – like new joke site, xkcd comic, etc
-oof (aggregate of team): out of facility announcements – like at the dentist for the next two hours, out for a week next week etc

Continue reading ‘Engineering Team Communication: Using Mailing Lists Effectively’

Successful Teams have High Bandwidth Communication

Synergy

Image via Wikipedia

Going to college during the dot-com boom meant that we had lots of opportunities to play buzzword bingo.  This post talks about one of the buzzwords I remember hearing repeatedly from that time – synergy.  This word was used to talk about business models (B2B to provide synergy between companies) and organization culture (we look for synergies between team members when hiring).  As far as I remember, most of the presentations were full of rhetoric and little substance.  Much like the word’s connotation in its time. To truly create synergy between team members, meaning, to get the team to produce more than they could individually, the team must have high-bandwidth communication.

You already know this type of communication, just maybe without a name before.  It’s the type of communication you have with your best friend, your oldest friend, or your closest confidant.  It doesn’t matter how much time has elapsed since you both last spoke, within minutes of talking you are fully engaged in conversation. Simply put, high- bandwidth communication is when both parties are fully engaged in the discussion, adding valuable contributions, while not struggling to keep up.  It is relatively common in personal lives – I would argue that it is probably how you have chosen your closest friends.  They are the people you can trust that understand you implicitly.  Now transfer this to a work environment or a team project.

First, you don’t need to be best friends with your team members.  But you do need a way to collaborate efficiently.  High bandwidth communication means you are sharing ideas and collaborating without expending extraneous energy.  It means you say it once and everyone gets it.  It means you draw it once on the white board and nobody needs to pick up a pen and elaborate/extend your ideas. It means you are finishing each other’s thoughts and ideas together.  How often does that happen for you at work?

I have seen many teams try to “process” their way into high-bandwidth communication.  These are in the form of additional status emails, meetings, TPS reports and the like (we should all agree on a template for sending our status emails to keep them consistent and easy to read).  As much as I have seen this tried, it never gets close to high-bandwidth communication.  This just frustrates some folks on the team and burdens those that aren’t frustrated with additional minutia to manage throughout their day.  What my team recently did which resulted in much higher bandwidth communication is far simpler – we got to know each of our working styles.

A ‘work style’ is simply a way to talk about the personality you have at work.  Not that you aren’t yourself at work, but you aren’t.  Nobody is.  And if you are, then I probably wouldn’t want to work with you.  At work the decorum of professionalism should be adhered to.  This is for everyone’s comfort and to keep people from feeling uncomfortable.  My work style is devoid of the vulgarity that is a big part of my personality.  My work style also limits profanity, which unfortunately, is a pretty big part of how I speak outside of work.

fancy logo/writing for use in MBTI articles

Image via Wikipedia

How did we get to know each other’s working styles? We took personality tests.  The Myer’s Briggs Part II to be exact – with answers geared to how we behave at work.  And then we had a facilitator help visualize and present our results.  We did a great exercise to demonstrate how much time we would each spend based on our personalities in the four stages of approaching a new problem.  Team building exercises have never made much sense to me, until this one.  By getting to know each of our work styles we learned how to communicate more effectively with everyone.  Extroverted people dominate meetings and spoken communication – and by realizing that more than half the team is introverted by nature – we realized we needed to create a meeting atmosphere more conducive to introverts (we do this better now by doing lots of sticky note exercises when getting team feedback).

Does this mean my team has really high-bandwidth communication overnight?  No.  But we are much better off than we were before the exercise.  We keep a printout of our results in a common place for the entire team to see on a daily basis – a little reminder of how hard it is on some folks to talk in groups and to others to quiet down to let others in.  We aren’t the greatest team yet, but we are committed to improving as a group and are actively working towards it.  Moving towards high-bandwidth communication at work will improve your team’s ability to deliver on its goals in a more timely manner with less overhead – sounds like synergy to me.

Do you have high-bandwidth communication at work?  What techniques has your team used to bring about better communication?  Leave a comment or shoot me an email to let me know.

Reblog this post [with Zemanta]

Reality Check: You Do Have Time

This is the second post in a series about the realities of life as I have found them

“I’m just too busy for …” – How often have you heard this or thought this?  The goal of every person at every stage of life is to feel comfortable in that stage of life.  Until that happens time management will always seem like a challenge.  This post will explore why most people feel that they do not have enough time in each day, why nobody older seems to care, and what to do to feel more efficient. Continue reading ‘Reality Check: You Do Have Time’

Roadtrip 2008: Arlington to Seattle – Pictures Online

Finally got around to writing briefly about Shaily and my cross country drive in November 2008 from Arlington VA to Seattle WA.  I’ve posted it on our website thearyafamily.com.

From now on you will see more and more family related postings on that site and this site to be more individual and technical stuff.

Here is a snippet from the writeup:

Road Trip 2008 – Pictures Online

In November 2008 Shaily and myself drove cross country from Arlington VA to Seattle WA.  The trip took us slightly over four weeks.  We started on Thursday October 30, 2008 and arrived in Seattle on Sunday November 29, 2008.

Along the way we saw and stayed with friends and relatives.  After we ran out of friends and relatives we stayed at numerous Days Inn hotels (I can still taste the free breakfast) and one EconoLodge (wouldn’t recommend it).

We drove and drove, here is a rough map of our route:

View Rajat and Shaily’s Roadtrip 2008 in a larger map

The cities we covered are all marked on the map, but here they are in order: Philadelphia PA, New York City NY, Zanesville OH, Kent State OH, Ann Arbor MI, Chicago IL, Minneapolis MN, Bend SD (Badlands National Park), Mount Rushmore SD, Chugwater WY, Cheyenne WY, Park City UT, Portland OR, Seattle WA.

We stayed with friends or family in: Philadelphia, Zanesville, Ann Arbor, Chicago, Portland, Seattle.

Model-View Controller Design Pattern Presentation

Quick post with a couple attachments. Recently I put together a couple presentations to present to a working group inside University of Washington.

If you are on a team or in an organization that has not heard of model-view controller, hopefully you can use this presentation to bring your team on-board with the simplicity and power of the pattern.  There is lots of information on Model-View controller all over the web but I couldn’t find a presentation that tied it all together like I wanted.  Feel free to let me know about other such presentations in the comments.

Model View Controller

The second presentation is an introduction to ASP.NET MVC – the new Microsoft web framework that substitutes Web Forms for web development. Luckily this framework released very recently and we have been using it at work. It is a pleasure to use instead of Web Forms.

Introduction to ASP .NET MVC

MVC is everywhere, let me know your thoughts on these slides and on good online resources for design patterns in general.

Download them here, or check them out on Scribd:

Reality Check: There is No Perfect Job

This is the first in a series of posts about the realities of life as I have found them.

“Find a job you love and never work again” – This quote is completely wrong.  The truth is that every career, every job, almost everything in life, has both good and bad parts mixed together.  There is no job that will make you feel like you are not working all the time. This post explores how to come to terms with this reality and helps identify how to choose a job that is maximally rewarding and enjoyable.

Continue reading ‘Reality Check: There is No Perfect Job’

2008: Year in Review

Editorial Update: Removed a couple of unnecessary stories from this post – they served no purpose and I decided I didn’t need them to get my point across.

Though it is past April 15th and I missed my “taxes” deadline for this post, I still wanted a chance to share some of the events from 2008.  It was another big year, so I’m sticking to the ordered/chronological list like last year.

  1. Continue working for Clearspring
    The job had me working day and night, with frenetic pace that only a startup can impose.  Back then I thought I was thriving in it – somehow having convinced myself that the “world” would end if I didn’t crank out whatever feature I was working on.  Unfortunately it was wreaking my health.  My weight has skyrocketed and I was eating badly.  I also developed a lesion on my face, around my chin.  More on that later.
  2. Shaily arrives on March 20th
    We waited for four long months after our marriage for Shaily’s visa to come through (it was 11 months after we filed for it).  In many ways our marriage didn’t really start until Shaily got here and we were living under one roof for the first time.
  3. Clearspring gets more funding (read more here and here)
    My life and my work are inextricably connected.  I somehow feel like “I” got more funding when Clearspring did.  Again, only the koolaid a startup can offer. My health is still in decline but I’m gung-ho about the company, my future, and our lives in Arlington VA.  When I am at work I am feeling guilty about not being at home with Shaily; when I am at home I feel guilty I am not working harder at work.  This is a recipe for disaster, I just didn’t know it then.
  4. Wedding Reception in Portland OR
    My parents throw us a wedding reception in Portland.  It was a great ceremony and we were so happy so many family members could attend. Took one week off from work (the maximum allowed at one time – yay startups) for the reception and for a really fun road trip down the west coast from Portland to LA with my cousins.  I had to leave from LA to get back to work, but Shaily got to enjoy LA, Las Vegas, and more.
  5. The Bit Flipped
    If you know me then you’ve probably heard of me talk about this moment before – it has happened to me before in other teams, at other jobs, in relationships.  It is the moment of clarity that has been brewing in your subconscious for weeks or months that finally comes to the conscious. The picture becomes clear. I no longer want to work for Clearspring.The new funding had raised my hopes for a chance at more equity in the company – especially considering what it was taking out of me.  For twelve Tuesdays in a row during the summer I was at work at 4am to deploy software.  For example, on my birthday, I worked from 4am to 9pm. It had become increasingly clear that more stock options were not being issued to anyone in light of the new funding.

    The work environment that once seemed electric seemed strained and unnecessary.  The constant “fire drill” of chasing after immature web 2.0 APIs with hopefully slightly less immature technology seemed like a cruel joke.  Though in my first professional leadership role I was struggling to find vision/direction/focus in the engineering organization.  I felt strongly that the executive engineering management was not providing  leadership to the organization and was not nurturing the growth of the team.

    Before finalizing my desire to leave I asked to be moved to a different team in engineering – to work on the advertising platform work Clearspring was doing.  I have a lot of respect for the lead of the advertising team and felt I could learn a lot by being on his team – both technically and from him.  My request was not granted with an explanation from my boss (the VP of engineering – not the one that hired me – Clearspring was on its 3rd VP of engineering during my tenure at this point) that my knowledge in my current team was too valuable to be lost.  I was done learning new things on the current team, tired of the work environment and the lack of leadership, and disappointed that no more stock options were going to be available. I decided it was time to leave.

  6. Clearspring Acquires AddThis (read more here and here)
    Another opportunity for Hooman and the Board to issue options comes and goes.  No options are issued.  My mind is already made up about leaving.  I ask to no longer lead a team and am quietly being a developer that works much closer to 50 hours a week instead of what I was doing earlier in the year.  This gives me the time I need to begin the job search and do phone interviews.  Shaily and I decide to relocate back to Seattle WA.  My parents had decided at the same time to spend more time in Portland OR so Shaily and I moving back to Seattle seems natural (moving back for me, moving for the first time for Shaily).
  7. Accepted a position at University of Washington
    To my pleasant surprise the university worked very quickly from cover letter to phone screen to phone interview.  I had already scheduled a trip to interview with other companies in the area and my team was able to work me into a spare day I had on that trip to interview me in person.  I accepted the day the offer was presented.  Since we had an open workspace in Clearspring where very few of us had office phones I had to walk out to my car to negotiate my offer. I wanted to make sure Shaily and I got a break between jobs (something I didn’t do between Microsoft and Clearspring) so I asked for a start date of December 1.  This gave Shaily and me the month of November to drive cross country.
  8. Road Trip Cross Country in November 2008
    I will write separately about the road trip – here I’ll just mention that it was memorable, enjoyable, and worth doing. We got to see: Philadelphia, New York, relatives in Zanesville OH, Kent State, UMich Ann Arbor, Chicago, Minneapolis (well really Mall of America), Bend SD, Mt Rushmore, got stuck in a snow storm and spent the night at a rest area in Chugwater WY, Park City UT, and finally Salt Lake City UT.
  9. Started work at University of Washington
    I’m a senior software systems engineer working on migrating a paper certification process to an electronic one (read more here and here).  This means retiring the mainframe that has been used since 1970s and building a new enterprise system.  The team is just finishing the first major milestone of the project – migrating folks off of the mainframe.  Part of an excited team that is nothing like the stereotypical professional staff team at a university.  Ramp up in ASP .NET development and designing the next major milestone of the project. Lots of learning, and 40 hour weeks. I am visibly more relaxed every day – Shaily notices immediately.

    As a note, Cleaspring had their first major layoffs in December (see here).  I was sad to hear this happened because many of the guys I worked with there were underutilized and overall I felt the team could have produced so much more under the right leadership.  I was glad to find out that many of the team members I knew who were laid off landed okay, some in situations far better for them than Clearspring.

  10. Relocated to Capitol Hill neighborhood of Seattle
    Shaily and I rented an apartment below our friends Brian and Miriam (and Cam) in Capitol Hill.  Brian and Miriam were scheduled to move to Hawaii in January so being right next door meant we got to hang out every day in December and until they left.  The snow storms in Seattle around Christmas were fun – everyone’s travel plans changed and we all spent Christmas together.  Brian and Cam made a turkey. (Shaily and I made ginger cookies from scratch.)  We all partied on New Years together, ringing in 2009 with fake confetti while watching fireworks and dancing till 3am on tunes spun by Cam.

The year brought several significant changes to my life. I changed jobs and moved cross country – AGAIN.  I started living with my wife.  I learned first hand what it was like to work at a startup.  The year ended with me in a very different mental place than when it started.  Maybe it’s maturing, maybe it’s living a married life, whatever it is I am glad it happened.

Reading List Updated through 2008

I know it’s late, but until taxes are due I can still write about 2008.  There is lots to cover in the annual ‘Year In Review’ post, but I’ll get to that soon enough.

This post covers the books I read in 2008.  Since I post my writeups about the books around the time I finish them (to help me keep a chronology of what I’ve read) many won’t show up on the first page on this site, so this post helps shed some light on them.

Please let me know your thoughts on these books (especially the ones I didn’t like) in the comments.

The books I read during 2008, in chronological order:

  1. “Midnight’s Children” by Salman Rushdie
  2. “A Fine Balance” by Rohinton Mistry
  3. “Family Matters” by Rohinton Mistry
  4. “Unaccustomed Earth” by Jhumpa Lahiri
  5. “Liar’s Poker: Rising Through the Wreckage on Wall Street” by Michael Lewis
  6. “Tokyo Doesn’t Love Us Anymore” by Ray Loriga
  7. “The Life of David Gale” by Dewey Gram
  8. “The House” by Danielle Steel
  9. “A Case of Need” by Michael Crichton
  10. “Seize the Night” by Dean Koontz

Also worth noting, I updated the tags on all the posts in the reading category to include the author’s name, hopefully this will be helpful metadata to track trends in my reading habits.

“The Wisdom of Whores: Bureaucrats, Brothels, and the Business of AIDS” by Elizabeth Pisani

Product DetailsDid not get a chance to finish this as the library called it back, but read the majority of the book from February  2009 till March 2009.

Pisani documents her travels and entrance into the world of “sex and drugs” as she puts it to find out about the spread of HIV through the late 1990s.  The story moves quickly and her writing style is enjoyable.  Her perspective is pragmatic and how she writes about “whipping up” the case for HIV to get funding from the rich countries and the difficulties in getting accurate results in developing countries.  There is lots of content mixed in with great stories about the sex habits in Indonesia, Singapore, among other places.

Enjoyable read considering I know nothing about epidemialogy.  Hope to get it again from the library soon and finish it off.

Read more about it and buy it from here. Find out more from Pisani’s site as well: http://www.wisdomofwhores.com.