Fun with MBR and Boot.ini

I had a bit of a scare these past 24 hours when I thought that I had fucked up my newly installed and configured Windows XP PC, which for the purposes of this blog I will refer to as Lester. Lester has a 500gig SATA harddrive, as well as an older 250 gig drive, which was a holdover from my prior computer. As a result, the smaller, secondary harddrive had 3 partitions on it: an XP system partition, an Ubuntu partition and an NTFS partition with a buttload of mp3s on it.

Last night, I decided to delete the 3 separate partitions on my secondary drive and reformat the whole thing as a single NTFS partition for mp3s. I used Partition Magic and some other partition program I had snagged off BitTorrent. I was very cautious while formatting and succeeded in deleting the partitions and wiping the drive. However, when I rebooted, Lester would not start up and displayed an ominous message about no bootable media being found.

This was pretty damn confusing, since I knew that I had formatted the correct drive and was pretty sure that all my windows files were still present on the main drive. What the fuck had happened? Was it a virus?

Well, to make a long story short, I eventually was able to restore the MBR (Master Boot Record) and boot.ini on the main drive and get it to boot into Windows again (although I ended up installing Windows on the mp3 drive just so I’d have something to boot into so I could muck around with the main drive). After I had fixed Lester, I realized what had happened. When I had originally installed XP, for some bizarre reason, the boot.ini file for XP was installed, not on the hard drive containing my Windows system, but on the hard drive containing my mp3s and the other 2 unused partitions. Thus, when I wiped this drive, it blew out my boot.ini file and Lester was dead in the water.

Even odder, when I installed the temporary version of XP on the newly wiped mp3 drive to give myself access to the files on the main drive, it put the new boot.ini file on the main drive! So, at that point, boot.ini was where I wanted it and I only had to go in and edit it to tell it to load the windows install on drive 0 instead of drive 1.

In case anyone ever has a similar issue, here are the instructions I finally found on editing the MBR and boot.ini:

  1. You can try restoring the MBR in MSDOS with either the FIXMBR command or with fdisk \mbr. In my case, this didn’twork, since I was still missing boot.ini.
  2. I was able to edit the new boot.ini file with the following commands, run from the commandline (I don’t think boot.ini is visible within Windows Explorer, even with Show Hidden Files enabled):
    1. attrib -H -S -A -R boot.ini — This sets the boot.ini file as editable
    2. notepad boot.ini — Pops it open in Notepad so you can edit it.
    3. attrib +H +S +A +R boot.ini — Restores boot.ini as a hidden, system file, after you have made your edits and saved.
  3. Reboot and all is well. You can add multiple entries in boot.ini under the [operating systems] section. For me, the operative thing to change was the rdisk option. You’d think the disk option would control which harddrive is being described, but actually the physical drive is referenced by the rdisk option. Thus, I had to change:

I must confess that despite the stress of thinking I had lost all my files, it was pretty damn gratifying to actually fix this myself by getting down and dirty with the MBR. Nevermind that I wouldn’t have ever had this problem if I hadn’t fucked up in the first place…

Zombie Evacuation Plan **Updated**

Nicole and I had a wonderful walk this afternoon that took us down our street to the CVS and then to the local Genuardi’s, via the cemetery behind our house. During the walk, it occurred to me that although we had replaced our smoke detector batteries the prior Daylight Savings Day, our Zombie Evacuation Plan had not been updated since we had moved into our new house, almost a year earlier.

As those of you who live near cemeteries know, a good Zombie Evacuation Plan can mean the difference between life and death — saving one from an awful brain-eating fate. Unlike some of our wealthier neighbors, we are unable to afford the high premiums charged for zombie insurance in a residential zone within a half mile of a cemetery. Thus, in the event of an outbreak, our house will be a total loss and we will be entirely on our own to make it to the nearest Army evacuation point — Abington Hospital, or City Hall in Philly, in the event that the hospital is overrun.

Since our evacuation plan is of paramount importance, I welcome your criticism and suggestions. It is very much a work in progress which I strive to continually improve.

  1. Weaponry. Although Nicole has made it clear that the cats should be our primary concern, I feel that if we cannot defend ourselves, then we will be of no help to the cats. Also, prior attacks have shown that domestic pets are generally left unmolested by zombies, particularly when human prey is readily available. Thus, our first action will be to secure the knives from the kitchen. Time permitting, we will also retrieve the gasoline from the shed and the propane tank from the deck, which can be used as a makeshift bomb.
  2. Blank and Nudge. Next, we will get the cats in their carriers.
  3. Shelter. If we’re able, we will board up the windows and doors with the extra wood from the shed and seal up the basement door to limit the amount of space we will need to defend. If the house itself is breached, we will retreat to the upper floor. If the upper floor is then breached, we can always exit the window in the office, clamber down the roof and onto the deck, and from there jump down to the backyard.
  4. Evacuation. As soon as there is an appreciable lull in the fighting, we will evacuate, preferably by car, down Susquehanna toward the hospital. Hopefully, we can make it to the hospital and be evacuated via helicopter. If the hospital is no longer safe, we will need to fight our way down 611 all the way to City Hall.

I only hope that if we ever have cause to put our evacuation plan into effect that we are able to escape with our lives. A house and possessions can always be replaced, but a brain can never be un-eaten.

Xena-Marie, a.k.a. The Walrus, 1998 - 2008

It’s been a rough month for my cats. Blank broke a couple of his toes last month and then this month, we had to have my cat Xena put to sleep. Nicole had noticed that she had stopped eating and kept herself hidden away for most of the day. An X-Ray and blood tests showed only an increased white blood cell count, but a later ultrasound showed fairly extensive cancer in Xena’s kidneys, liver, intestines and lymph nodes.

I received the diagnosis on a Friday and the following Thursday, we had to let her go. I am thankful that Xena was not in any pain and that we had the better part of a week to say our goodbyes.

Xena was my first cat and will always be the best there ever was. When I think of all the things I will miss about her, it breaks my heart. She used to shed so much that I joked I could take all the hair which came off of her and in a matter of weeks, I’d have enough to make another cat. Xena was a sloppy eater and the kitchen floor was constantly covered in food, thanks to her. It was pretty funny to watch her eat — with half the food falling out of her mouth and onto the floor as she chewed.

Xena was one of my best friends and she will not soon be forgotten. Rest in peace, Princess…

Xena attacks!

Regex tester

I added a Javascript regex tester to my homepage. It’s pretty bare bones right now, but I eventually want it to select the text it matches inside the textarea, instead of just printing the match below. I used scriptaculous tabs for the tabs at the bottom, which seemed to work out well.

I have some ideas for additional form widgets I’d like to add to my homepage. I think a timestamp converter could be helpful.

Blanks Paw

Well, here’s my first blog post and it’s about my cat Blank’s paw. Dumb-ass that my cat is, he somehow managed to break 2 fingers on his paw while playing in the basement. I was outside doing some work in the shed and I hear a crash. I come inside and this picnic table/card table that Nicole and I have is overturned. No cats were around.

Later, I noticed Blank was limping. Long story short, we took him to the vet and discovered he’d broken 2 toes on his paw. Check out the x-rays:

Blank’s X-ray

That’s the full x-ray without any magnification. And here’s the close-up on his right paw:

Blank’s paw

Blank cost us $300 on the initial visit to the vet, for xrays and a cast. *Sigh* If only he weren’t suck a klutze… I got some measure of satisfaction when we took him back later and the doctor gave him a pink cast. Here’s 2 photos of him — in the original green cast and in the new pink cast which he pulled off after 1 day. He’s so insecure…

Anyway, Blank’s doing well and I think he should be back to jumping on picnic tables in another couple weeks.