Technology, Social Media, Travel
RSS icon Email icon Home icon
  • How to Mount a VMWare (Linux) Partition in Ubuntu (Hardy 8.04)

    Posted on August 22nd, 2008 John Berns 2 comments

    I recently had a problem starting a VMWare VM (the VM ran CentOS) and I needed to get some data off the virtual machine. Since the VM would no longer boot, I decided to try to mount the partition under Linux and copy the data off. It was a little trickier than I had anticpated so I tought I would share my solution.

    vmware-mount.pl Doesn’t Get You All The Way There

    vmware-mount.pl does just what is says it will do: it mounts VMWare partitions on your computer, IF the target computer can mount the partition type. The problem with Ubuntu (Hardy 8.04) was that it would not mount an LVM partition.

    Look at vmware-mount.pl for moreon how to use this command.

    But vmware-mount.pl was still useful in helping me find out the partition type and creating a block device from the .vmdk file that I could use other tools to mount.

    Change to the directory where you have the virtual machine files. There will be one (often more) .vmdk files in that directory and these files are the virtual drives that hold the data for your VM.

    cd /path/to/your/vm/

    Now let’s see what is inside these files; we want to know what partitions there are so we can figure out which one has the data we are searching for.

    sudo vmware-mount.pl -p name-of-the-vmware-virtual-drive.vmdk

    That will output something like:


    --------------------------------------------
    VMware for Linux - Virtual Hard Disk Mounter
    Version: 1.0 build-80004
    Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential
    --------------------------------------------

    Nr Start Size Type Id Sytem
    -- ---------- ---------- ---- -- ------------------------
    1 63 208782 BIOS 83 Linux
    2 208845 16563015 BIOS 8E Unknown

    So we have two partitions in this vmware virtual drive. Just by looking at it I can tell that the big partition, partition number 2 is the one that has all my data. But notice the “Id” is “8E” and the “Sytem” is “Unknown.” Well “8E” is the ID for LVM file systems and that’s a problem; let’s try and mount it and see what happens:

    Create a mount point:

    sudo mkdir /mnt/vmdk

    Now let’s try to mount it.

    The command syntax for mounting a .vmdk partition is

    sudo vmware-mount.pl name-of-the-vmware-virtual-drive.vmdk [partition number] /mnt/point

    So if we want to mount partition 2 on /mnt/vmdk we’ll try:

    sudo vmware-mount.pl name-of-the-vmware-virtual-drive.vmdk 2 /mnt/vmdk

    And the results we get are something like this:


    jb@jb-ubuntu:~/Desktop/fuxored-disk$ sudo vmware-mount.pl CentOS\ 4.4-000007-cl1.vmdk 2 /mnt/cent
    [sudo] password for jb:

    --------------------------------------------
    VMware for Linux - Virtual Hard Disk Mounter
    Version: 1.0 build-80004
    Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential
    --------------------------------------------

    It has been reported that this program does not work correctly with 2.4+ Linux
    kernels in some cases, and you are currently running such a kernel. Do you
    really want to continue? [N] y

    No Network Block Device detected.

    There is no Network Block Device defined on this machine. This script is about
    to create the /dev/nb0 Network Block Device. Continue? [Y]

    Creating the /dev/nb0 Network Block Device

    No Network Block Device driver detected.

    Trying to load the Network Block Device driver kernel module... Success.

    Client: The partition is now mapped on the /dev/nb0 Network Block Device.
    mount: unknown filesystem type 'LVM2_member'

    If you know the filesystem of the partition you want to mount, you can provide
    it using the -t command line option. Since you haven't done so, this script is
    going to try to determine the filesystem of the partition based on the partition
    type and id.

    Unable to retrieve the filesystem of the partition (the partition type is BIOS
    and the partition Id is 8E). Please file an incident with VMware at
    http://www.vmware.com/forms/Incident_Login.cfm by copying this error message.
    jb@jb-ubuntu:~/Desktop/fuxored-disk$

    It created a block device that can be read, but the partition didn’t mount as we can see by this message:


    Client: The partition is now mapped on the /dev/nb0 Network Block Device.
    mount: unknown filesystem type 'LVM2_member'

    So we have a block device of type “LVM2_member.” Let’s try to find a way to mount that!

    Luckily, Kurt Wall did a nice tutorial to how to mount a fedora logical volume in Ubuntu that solves our problem.

    If you type in the commands he has listed on that page, one after the other, you will have a mounted partition and problem solved!

  • Fixing Compiz Fusion on ATI Radeon Mobility 9800 Under Ubuntu Hardy (8.04)

    Posted on July 20th, 2008 John Berns No comments

    **** OK, this works–but it’s not feasible. I found xserver-xgl to be VERY slow and had screen rendering issues. ****

    Take this for what it’s worth–and that does not seem to be much.

    When I originally installed Ubuntu Hardy on my HP Pavillion zt3000 laptop Compiz worked perfectly. Much to my dismay, after I re-installed, Compiz Fusion would not re-enable, even though I had the restricted drivers installed and enabled. (Selecting System -> Preferences -> Appearance -> Visual Effects -> Extra returned a “Desktop effects could not be enabled” error.)

    I tried running “compiz” from the command line and one line of the output caught my eye:

    checking for xgl not present

    That gave me enough search terms to search on Google and hit paydirt on UbuntuForums.

    The solution was simple: Go to System -> Administration -> Synaptics Package Manager and install “xserver-xgl.”

    After I logged back out and back in, I enabled Compiz ( System -> Preferences -> Appearance -> Visual Effects -> Extra) and everything worked.

  • When Stupid People Use Computers (Humor from InfoWorld)

    Posted on June 18th, 2008 John Berns 2 comments

    Let’s face it: some people should just NOT be allowed near computers.

    When stupid people use computers
    Photo by °Florian

    InfoWorld, a magazine that is seldom considered a bastion of humor, has a series of hilarious articles with real-life stories about seriously stupid things that IT people and Hackers did with computers.

    They are a great way to kill some time and leave you feeling smugly confident that you are, at least, not that stupid.

    Stupid user tricks: Eleven IT horror stories

    More stupider user tricks: IT horror stories redux

    Stupid hacker tricks

    Stupid hacker tricks, part two: The folly of youth

  • English Font, Thai Look: AW Siam

    Posted on May 10th, 2008 John Berns 11 comments

    What’s not to love about this font?

    aw-siam-font

    AW Siam is a free font for Mac and PC that give you English characters with REAL Thai flair.

    It even uses a few actual Thai characters. (For example, “a” is “lor ling”, “T” is “sara o” and “n” is “tor ta-haan.”)

    The funny thing is, when I showed it to some of my Thai friends that read English, they had a hard time reading it–the “Thainess” of the characters threw them!

  • Secure Password Management with Password Safe

    Posted on April 9th, 2008 John Berns 1 comment

    I have a lot of passwords. Hundreds. I need some place to store them. But that storage system has to be secure. Having a spreadsheet or text document of all your passwords stored on your computer–or a sheet tucked in your wallet–is an invitation to disaster. If you computer is hacked or your list is found by somebody, if it is NOT ENCRYPTED they have the keys to your personal (online) kingdom and they can reek all manner of havoc.

    I have been using Password Safe, a free, open source password manager that stores all my passwords in an encrypted, password protected file. (Yeah–you have to remember that one password, but everybody can remember one password, can’t they?)

    Password Safe was created by Bruce Schneier–the guy that, literally, wrote the book on cryptography. The Java version of Password Safe is cross-platform, so you can use it on Linux, Mac and PC. It allows you to store and manage all your passwords from one place. The data files are small and securely encrypted, so you can back them up to a USB drive, send them to your Gmail account or store them wherever and not worry that somebody will open the data file and steal all your passwords. (Assuming, of course, that you have created a good, secure password for the data file itself.)

    password safe screenshot

    As more and more of our lives is transacted online, keeping our identity, our bank accounts and our information private and secure becomes more and more important.

    Use good passwords and keep them stored in a secure manner. Please.

  • Microsoft Disables hosts File on Win XP

    Posted on December 23rd, 2007 John Berns 4 comments

    Microsoft is brilliant!

    I just moved to a new laptop and in the process I installed the latest and greatest updates for Windows XP—including IE 7. Now none of the hosts in the hosts file on my laptop resolve to the IP’s on my development server.

    It seems that Microsoft, in their infinite wisdom, has decided that there is no longer a need for WinXP to use the hosts file ON MY COMPUTER and that all IPs should be resolved by DNS servers instead. (See http://archive.cert.uni-stuttgart.de/bugtraq/2006/04/msg00291.html for details.)

    Somehow they came to the conclusion that they could change the standard way (standard being that most operating systems use the tiered method of “search hosts then check DNS”) domain names are resolved for my computer.

    What arrogance!

    What stupidity!

    What a mess I have now!

    Using hosts as a way to add a new dev domain is easy and convenient. (Domain name servers came about because hosts files, the first standard for resolving domain names, became unwieldy as the number of hosts increased–but for small lists of hosts it worked great.) I have been using my hosts file to resolve my develpment domains for years now; It’s easier than keeping a local DNS running for the handful of dev domains I have in use at any time.

    So it took me an hour to figure out the problem. (A bit long because it seemed unthinkable that the hosts file would be made obsolete with nary a warning.) Now there is setting up a BIND server so I have a local DNS server. And there is maintaining that. And possibly duplicating that on the other dev system in case there is a failure.

    F**k me.
    The hosts file was sure a lot simpler.

    But for some reason Microsoft determined that I should not have a hosts file that could be used to override DNS. They did it on their own and without consulting me. Or giving warning. Or posting any g-d d-mn instructions on how to get around it.

    But Microsoft is way smarter than me and after all, it’s not my computer anymore—Microsoft owns the damn thing–that’s how it seems by the way they act.

    And that brings me to my second point:

    Can I ask you a favor?

    Can you spare a couple thousand US$?

    I need to get a MacBook and fast. I can’t stand using anything Microsoft makes anymore.