Skip to content

Cash Advance Loans Cash Advance Loans

dd for Windows

My new favorite utility is dd for Windows , at least it was yesterday.  Here’s the short story:

Yesterday I was trying to upgrade my VMware ESXi 3.5 server to ESXi 4.0.  The remote installation failed, and the server wouldn’t boot.  I tried using the ESXi’s “Repair” option, but that didn’t work, telling me that the partition table was corrupt or unrecognized (I don’t remember the exact wording).  Reading an error message like that doesn’t leave one with a warm and fuzzy feeling.  I had a lot of stuff on those virtual machines (VMs) that I cared about, and most of it was backed up, but not all of it.  (Not backing up first was just dumb on my part.)

I didn’t want to re-install ESXi because that option said any preexisting VMs would not be available “right away” – I had a feeling “right away” could end up being “ever.”  So I searched for other options.

As I was searching the web, I ran across mention of installing ESXi on USB thumb drives and booting off them.  I had a 1GB thumb drive that I haven’t used in a couple of years.  So I grabbed it and tried to find some instructions.  Fortunately, the process doesn’t have too many steps, but the last one took me awhile to get right.  That last step involved writing a raw disk image to the thumb drive.  The instructions I had found said to use a utility called WinImage to write the disk image, but I wasn’t able to get the WinImage software.  So I looked for alternatives.

What I needed was a version of the dd command that worked on Windows.  The Unix dd command is a powerful tool for low-level filesystem copying and data translation.  I was working from my WinXP laptop, but I have Linux machines available – I could have used dd from one of those machines.  But I was lazy and wanted to stay on the laptop.

Before long I found dd for Windows , and it ended up working, but it took a little while to find the right options.

dd is very powerful; it can also be dangerous.  It’s a good idea to double-check any dd commands to verify that you are telling dd to do what you want instead of, for example, overwriting your OS drive.  So I took this step slowly.

dd for Windows has a “–list” option that showed a low-level view of the mounted filesystems.  My thumb drive had two partitions listed and at first I tried using Partition1, but even though the command seemed to work without errors, WinXP said the thumb drive was unformatted, and the drive wouldn’t boot my VMware server.  Eventually, I looked more closely at the “–list” output and saw that two partitions were listed for the thumb drive and I tried writing to Partition0.  That worked.  Windows saw files on the thumb drive, and I was able to use it to boot the VMware server.

Here is the command I used:

dd if=VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd of=\\?\Device\Harddisk1\Partition0  bs=1M  –progress

I had to reconfigure ESXi once I got it to boot, but all of the VMs worked fine after I re-added them to the configuration.  I am going to leave the thumb drive as the boot drive for the time being.  Eventually, I’ll upgrade to ESXi 4.0, but I’m in no hurry – I came too close to loosing all my VMs this time.  Next time, I’ll make sure everything is backed up, and I’ll install 4.0 to a clean hard disk.  I don’t think I’ll be trusting VMware’s update utility any time soon.

Posted in Aim At Foot - Fire, VMware.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.