Thursday, July 24, 2008

VMware: Trying Minimalist WinXP Installations

I wrote a small book presenting the steps I took to install VMware on an Ubuntu Linux system, using Windows XP as a guest operating system. In the day or two since I finished that post, I have continued to have additional experiences along those lines, and am writing this post as an addendum to that one. Shortly after completing that post, the performance of WinXP in the virtual machine began to deteriorate. It soon reached a point at which it was basically not working at all. While this was happening, I was continuing to work with Ubuntu on that primary computer, and also on my secondary computer. In doing so, I continued to be impressed with Ubuntu's stability. I would boot the Windows virtual machine on the primary computer, or I would dual-boot Windows on either of the two computers, and I would soon be reminded of its quirky behavior and of the occasional dismaying sense that my installation was failing and that I would need to revert to a previous, better-working state of the system or reinstall it altogether. I had not understood VMware's snapshot concept, so I had not made a good backup of my Windows virtual machine at various stages of its development. Meanwhile, however, I had been thinking about how the performance of Windows seemed to decline as I went through the process of installing various updates, many of which were designed for security. Since I was using a router as a hardware firewall, and was also running Windows within a virtual machine on a Linux computer, I thought it might be OK to try using the most basic of Windows installations in VMware: just install the software, skip the security updates and other upgrades, and see what happens. This would be a departure from my previous procedure, which had been to install Windows and all of the available updates first, and then do the same with Microsoft Office 2003, before installing any other software. So in this new, keep-it-simple approach, I created another virtual machine. I called it WinXPMinimal. I set a 30GB ceiling size for it, allocated 2GB of RAM (for those times when I had lots of Word docs or PDFs open), and enabled all my other partitions as shared folders. Inside the virtual machine, I booted the Windows XP CD and installed the program. This process began at 4:20 PM. While the CD was installing, I investigated e-mail options. My goal was to find an Ubuntu alternative to Outlook 2003, so as to minimize the number of Windows programs I would have to run in the virtual machine. At 4:38 PM, Windows was ready to activate itself. Before doing that, I installed VMware Tools. (This and other steps are discussed in more detail in the previous post.) Then I ran out of steam. I wasn't able to get VMware to resize the guest operating system (OS) window properly; I couldn't figure out why WinXP was not seeing the shared drives so that I could map them. Rebooting did not help. Eventually, I figured out that VMware Tools had not, in fact, installed, and it seemed that I could not install it until after activating. This time around, I went to VM > Cancel VMware Tools Install and then immediately hit VM > Install VMware Tools. Sure enough, the installation wizard popped up. I did a Complete install and tried again on the shared folders thing. No problem! The screen properly resized itself too, and I had the VMware Tools icon in the system tray. So now, at 5:30 PM, a little more than an hour after starting, I was ready to try installing Office 2003. I installed all programs except InfoPath, in case I needed to use them myself or convert someone else's files. At 5:49, Office was installed, configured, and running. (I had previously used the Save My Settings Wizard in Office, so it was easy to restore my old settings.) I had installed no service packs or other upgrades; I just had original Office 2003 running on original WinXP. At this point, I decided to take a snapshot in VMware. According to the VMware Workstation User's Manual (p. 227), "snapshots allow you to preserve the state of the virtual machine so you can return to the same state repeatedly." I felt that bare-bones Office and WinXP might be a good starting point for future experimentation. The manual advised having the machine in the state in which you would want to resume it, so I shut down WinXP before taking the snapshot. It sounded like the snapshot would take a while to create, and that it would not include any of my shared drives -- just the C drive that came with the default virtual machine setup. After looking at the manual, at 6 PM I used VM > Snapshot > Take Snapshot. I got no indication as to whether the snapshot was in process or was already done. I clicked on Snapshot Manager in the VMware toolbar, and it gave me an appealing little map of what snapshots I had created (only one) and where I was in the process. I had noticed that the manual (pp. 233 et seq.) also had further information on this. I was not overwhelmed with numerous snapshots at this point, so I did not read that section in detail. I went back into VMware and powered up WinXPMinimal. I installed Adobe Acrobat Professional 8. That took a while. While it was underway, I continued the look at alternatives to Outlook 2003. I had installed it; I just didn't want to rely on it anymore. I thought about replacing my PDA with one that was designed for use with Linux operating systems. In that case, perhaps I would be replacing Outlook's functions with PDA desktop software. But there didn't seem to be a lot of Linux PDA options, and anyway I didn't need much more than I was getting from my old Palm Zire 21, so I decided to just stay with that. Acrobat was done installing and activating by 6:17 PM, so I made another VMware snapshot. This time, I got a dialog telling me about background snapshots, and I noticed a progress bar in the bottom right corner of the screen. So I guess I was making a background snapshot. It took almost ten minutes, and then I set out to install the next thing I would need on my basic machine. I could have proceeded while it was working in the background, but I was being conservative, and anyway I needed to think about what else would need to be installed. I decided to install Acrobat updates. This was because I was getting persistent reminder bubbles in the bottom right-hand corner of the screen. I could have disabled them, but I hadn't had problems with Acrobat updates recently, so that seemed OK. It also dimly seemed to me that updates had fixed a problem I had noticed in Acrobat at some point. For similar reasons, and also as just-in-case security, I installed Symantec AntiVirus, ZoneAlarm, Spyware Doctor, and Advanced WindowsCare (AWC), with their latest updates, and ran quick scans in each. Spyware Doctor had recently detected a trojan virus that Symantec had failed to detect, and AWC had seemed useful in fixing Windows registry problems, though I hadn't studied that, and could have been imagining a positive effect where there was none. I was also getting persistent reminders that I had shut off WinXP's automatic updates. To fix that, I discovered that I could go into Start > Settings (using classic view) > Control Panel > Security Center and click on "Change the way Security Center alerts me." Up to this point, things had gone pretty smoothly. I had seen a BSOD (blue screen of death) as it flashed by, for a fraction of a second, on one of WinXP's reboots, during the process of installing this software. But that had been early in the process, and it had not recurred. I had decided not to install Firefox in this machine, since I could run it in Ubuntu, so I didn't run into the problems mentioned in the previous post. (I had noticed, in the meantime, that a number of people were suggesting that Firefox 3 was not really ready for prime time, and that Canonical had made a mistake in including it in the Hardy Heron 8.04 version of Ubuntu. I was figuring on running Internet Explorer (IE) in this virtual machine, because it came pre-installed with Windows and because there were some webpages that demanded it. I installed the Google Toolbar in IE and configured that. I noticed, now, that things seemed to be running a bit more slowly. I forged ahead, first by making another snapshot in VMware, and then by installing some additional programs. I decided to do these additional installations while the snapshot was proceeding in the background. Next, I installed IrfanView, for image viewing and for listening to audio recordings; 7-Zip, for file zipping; AvaFind, for file lookups; and a dozen previously used miscellaneous tweaks. Then I installed Corel WordPerfect Office X3, for occasional use to convert files in the WordPerfect, Quattro, or Paradox formats. That took quite a while, so I made another snapshot and then tried to reboot the virtual machine. There was still a lot of hard disk activity going on after the Corel installation and the snapshot, but I couldn't tell what was happening. Even after it had mostly died down, the reboot process did seem notably slower than before, taking several minutes. I thought that might be due to post-installation cleanup, so after the hard disk light chilled down, I rebooted again to see what would happen. It still took about four minutes for the system to shut down and start up again, and for the mouse pointer to be responsive when I clicked on something. It occurred to me that I had two different kinds of things going on, and that perhaps I should have two different virtual machines for them. On one hand, I had Adobe Acrobat and Microsoft Office (especially Word and Excel), which I used quite often. On the other hand, I had a number of programs that I used just once in a while, programs for which I really didn't need instant availability. If the need for one of those programs came up, I could fire up the other virtual machine, use that program temporarily, and then close it down. If I saved the VM in the right state, maybe I wouldn't even need to wait for it to boot up. To explore this possibility, I closed down this WinXP virtual machine and looked at VMware's Snapshot Manager. I had taken a snapshot right after installing the antivirus and spyware programs. Why not try out the ability of VMware to revert to that earlier state? Or, as I thought about it, I realized that the system, at that point, was pretty much what I needed for everyday use. Why not clone that, per the instructions in the Workstation User's Manual (p. 247), and preserve it as my Everyday virtual machine? Then I could continue down the path of adding additional programs to the virtual machine I had been working on. If the Occasional Use VM got too bulky, I could uninstall Microsoft Office and Acrobat from it, and just keep the programs that weren't already on the Everyday VM. Actually, I realized that there definitely would be some uninstalling or other tinkering. If I was going to have the Everyday machine up and running at most times, I didn't need to have a separate set of antivirus and spyware programs running simultaneously on the Occasional machine. Those programs monitored everything, and were thus always a bit of a drag on performance. Uninstalling didn't always work perfectly in WinXP, so it seemed like the cleanest way to build the Occasional machine might be to go back to the very first snapshot, taken right after I had just installed WinXP but had not yet installed Office or Acrobat. I would therefore have two virtual machines with almost nothing in common, other than that they were both running on Windows XP. I would have to do the Corel Office installation over again, this time on the Occasional VM. I wasn't sure if rebooting had been significantly faster right before I installed Corel and my miscellaneous tweaks, so first I reverted to that immediately preceding snapshot and rebooted, to see how that would go. When I double-clicked on that snapshot, taken after I had installed the antivirus stuff, I got a message, "By restoring this snapshot, the current state will be lost." I wasn't worried; I already had a snapshot of the current state, post-Corel. So I said yes. The next dialog said, "Restoring virtual machine state." It took about seven minutes for that to complete. The dialog boxes vanished almost immediately, but the VMware progress bar in the bottom right-hand corner of the screen told the true story. When it was done and the hard drive activity light was only flickering occasionally, I tried another reboot. That resulted in a BSOD and an almost instant appearance of that bootup screen that lets you choose between Normal Mode and Safe Mode in WinXP. I chose Normal Mode, and the system booted OK. I tried another reboot, and that worked, although slowly. I seemed to have a relatively unresponsive system. The hard disk light was running constantly and nothing seemed to be happening. I suspected that AvaFind's effort to refresh its search cache was responsible for much of the delay. After a while, the system was much more responsive. It now contained the programs that I would need frequently, so I got those programs onscreen, like I would want them in daily use; I revised the Start menu to suit my tastes; and then I made another snapshot. This was my Everyday virtual machine. With that done, I turned to the creation of the Occasional Use virtual machine. I had noticed, when naming the "Everyday VM," that the computer would only give me "everyday vm," lowercase. This was a problem that I had encountered in the previous post, when using 64-bit Ubuntu; it had not occurred in the 32-bit version that I was running on the secondary machine. It was also not occurring in Word, inside the VM; there, I was able to type "Everyday," with an initial capital letter, on a test document. I was also getting the problem that just hitting the Shift key (I think) was sufficient to close a window. I rebooted the computer and was pleased to see that Ubuntu shut down and came back up very quickly, and VMware opened almost instantly, and the capitalization problem was gone. To create the Occasional VM, I decided to start with the VMware snapshot that I had called Basic WinXP and Office. According to the manual (p. 247),

To save the current state of the virtual machine, so that you can revert to that state, take a snapshot. To make a copy of a virtual machine for separate use, create a clone.
This was going to be a copy -- called a "clone" in VMware -- for separate use. Next, there was a choice between two types of clones. A linked clone could be made quickly, because it would not be a full copy of everything in its parent. It would continue to need access to its parent. A full clone, by contrast, would be a complete and independent copy that would share nothing with its parent. It would take longer to make, but it would run faster, according to the manual (p. 248). That's what I wanted. The first step they recommended, in creating a full clone, was to defragment the guest (WinXP) operating system. I opened the Basic WinXP and Office virtual machine and defragged its only drive, C. This took only a few minutes. Meanwhile, I saw that there were also some other fixes I would want to make before cloning this machine. First, when I opened it, I got a Windows bubble warning me that I did not have antivirus software installed. So I went into Control Panel > Security Center and made the adjustment described above, to shut off that warning. I also got an error message:
An error occurred while reconnecting D: to \\.host\Shared Folders\STATIC VMware Shared Folders: The network name cannot be found. This connection has not been restored.
So I went into Windows Explorer's menu: Tools > Disconnect Network Drive and disconnected all network drives, hoping that would take care of it. I rebooted the virtual machine -- it took less than one minute -- and this time I got no such warnings or error messages. The next step they recommended, in the manual, was to power off the VM. So I hit Start > Turn Off. I selected VM > Clone and got a suggestion to enable template mode if I wanted other users to be able to create clones from this VM. The purpose of this, according to the manual (p. 252), was to prevent anyone from deleting the parent of a linked clone. Since I was planning to make a full clone, not a linked one, this did not apply. So the next step was to clone from the current state of the VM, with the few small fixes I had just made to the Basic WinXP and Office VM. I called it Occasional Use - Starter. Although the full clone was supposed to take a relatively long time to make, it actually took only four minutes in this case. I now had a separate tab for this clone in the Summary view in VMware. Snapshot Manager showed a new branch of the tree, but with nothing on it except "You Are Here." So I made a snapshot of the Occasional VM at that point. Now Snapshot Manager showed nothing except this branch; there was no longer any connection with the original Basic WinXP and Office VM. I had called the Snapshot "Starter," and realized I could shorten the name of the VM itself to "Occasional Use," or just "Occasional." But there didn't seem to be a way to rename the VM, so I tried making another clone. This time, I got an error message:
Cloning failed: There is not enough space on the file system for the selected operation, free 3.39 GB on the file system and try again.
This seemed odd. I had 50GB in this partition, and the programs installed so far in this virtual machine filled only a few GB. But I did not argue; I deleted the Occasional Use - Starter clone and made another with the shorter name. Next, I examined Control Panel > Add or Remove Programs for things I could pare out of this Occasional VM. First to go: Microsoft Office programs that would already be running in the Everyday VM. I decided that Word and Excel were the only ones, so I clicked Change and deselected those two. To match this, I went to the Everyday VM (whose official, created name was still WinXPMinimal) and deselected all Microsoft Office programs *except* Word and Excel. So if I needed to run Word, I would run it in the Everyday machine; and if I needed to run Access or Publisher, I would run it in the Occasional machine. The VMware progress bar in the lower right corner of the screen did not seem to progress, for the WinXPMinimal machine, while I was looking at the Occasional machine. This did not prevent me from opening Add or Remove Programs and looking at the list of installed programs in WinXPMinimal, which was going to be my future Everyday machine. It was a pretty short list. I changed Microsoft Office as just described, to remove everything except Word and Excel. I decided that everything else I had installed there in the WinXPMinimal machine was indeed stuff that I would be using frequently. So now the next step was to install other occasionally needed programs in the Occasional VM. I started with Corel Office, which was where I had stopped adding programs to WinXPMinimal. I wondered whether that would make the machine sluggish again, or whether that problem in the WinXPMinimal machine had just been due to the accumulation of too many (and, perhaps, conflicting) programs. It didn't seem to; everything was fine now. I could see, now, that I had done things somewhat out of order. The tweaks that I had installed toward the end of the process, in the WinXPMinimal machine, should have been done toward the beginning. Now I had to do them all over again in this Occasional VM, because I did want them operating here as well. An example: deselect the "Display delete confirmation dialog" option in Recycle Bin > Properties. I wanted that sort of thing to function the same in all virtual machines, so I should have set it up at the start. The remaining programs that I needed to install were device-oriented. First, I wanted my Palm PDA to connect to the Palm Desktop software. There was a way to synchronize a Palm PDA using only Linux programs, but it didn't sound easy, and the Windows-based Palm PDA software was easy. So I made a snapshot, and then installed that. I plugged the mini-USB cable into the PDA and tried to synchronize. The computer recognized it, but then said there was a problem installing my hardware. Device Manager (in Control Panel > System > Hardware) had a yellow exclamation circle. I unplugged and replugged the PDA and tried again to synchronize. This time, the Palm PDA appeared with no problems in Device Manager, but otherwise there was no response from the system. Once again, I had to conclude, this was a device I would have to be synchronizing via dual-boot to native WinXP, not in a WinXP virtual machine. Then I realized I hadn't yet consulted the Workstation User's Manual on this point. It said this on p. 354:
Although your host operating system must support USB, you do not need to install device-specific drivers for your USB devices in the host operating system to use those devices only in the virtual machine. . . . If the guest operating system has appropriate drivers, you should be able to use PDAs, printers, storage (disk) devices, scanners, MP3 players, digital cameras, and memory card readers.
In that case, my previous post was mistaken in understanding that my printer/scanner would not run in VMware, and I was now likewise mistaken in thinking that my PDA would not work. If it worked out, this would be a reason to run VMware on top of Ubuntu: it would be able to help Windows-specific devices, lacking Linux drivers, to function within an Ubuntu system. It all sounded great. Now it was just a matter of making it work. So, first, the PDA. The manual said, first, that I could enable or disable the USB 2.0 controller via VM > Settings > Hardware > USB Controller. It was enabled and greyed out. The manual (p. 355) had instructions for automatic and manual connection of USB devices. Since the automatic approach hadn't worked yet, I tried the manual one. The manual said (p. 355),
If you physically plug a new device into the host computer and the autoconnect feature does not connect it to a virtual machine ,this means the device is instead connected to the host. Its name is also added to the VM > Removable Devices menu so you can connect it to the virtual machine manually.
So, OK, I plugged in the PDA and went to that menu. It did indeed have the "Palm Handheld (Virtual Hub 1, Port 1)" with a checkmark next to it. So it was now connected to the virtual machine. It appeared in Device Manager. So why couldn't I get it to sync? I tried syncing from the handheld. No luck. There didn't seem to be a way to do it from the desktop. This was where I had stopped before. The manual (p. 358) noted that sometimes PDAs have autoconnection problems, but their advice for reconnecting didn't solve the problem. I wondered if maybe I had created the account incorrectly when I had installed the Palm software in the virtual machine. I thought I might try synchronizing the PDA and the desktop in native, dual-booted WinXP. So I suspended my two open VMware virtual machines, WinXPMinimal (which I should have called Everyday) and Occasional. Or at least I tried to suspend them. When I clicked Suspend for the Occasional VM, I got this message:
There is not enough disk space to save the virtual machine's state. Please free up at least 1.03 GB and try again. Failed to suspend the virtual machine.
Once again, this was baffling, given that I had set up the machine with 30GB of virtual disk space and had even more than that available. I wondered whether they meant RAM instead of disk space. I had noticed quite a delay in switching between the two virtual machines at one point, and I figured that was because they were each trying to claim 2GB of RAM in a machine that had a total of only 4GB installed, some of which was being used by Ubuntu and some by VMware overhead. But I wasn't getting that delay in switching now. I switched back to the WinXPMinimal VM and shut it down, and then tried again to suspend Occasional. This time it worked. I closed down VMware and dual booted into WinXP. Windows was its good old dysfunctional self, refusing to boot properly, so I felt right at home. I prepared to restore an earlier drive image and try again. Drive Image 2002 imagined that there was a problem with the hard drive on which I had saved that drive image, and was unable to see that drive's contents, so I rebooted Ubuntu to copy that drive image over to another drive. Ubuntu said, "Cannot mount volume." It was, in fact, unable to mount any of my partitions, other than the one containing Ubuntu itself. This was strange. I rebooted into native WinXP Safe Mode, to see about copying the drive image over from one partition to another. But Drive Image could not see the images I had saved, even when I moved them to different partitions where Drive Image did see existing folders. In all these years of using Drive Image, I don't think I had ever seen that before. It almost had to result from using Ubuntu somehow, but how? It didn't make any sense. I wound up reinstalling a basic version of WinXP for my dual boot, and that in itself was a confused mess because, for some reason, Windows decided to label the first primary partition on my first hard drive as G. Not drive C, drive G. Wha -- ? Another first. I found some posts that advised how to edit the registry to fix this, and following those instructions, I wound up with a system that would not boot at all. So I installed WinXP from scratch again. While WinXP was chewing up that additional hour, I was thinking about how short life is, how difficult it will be to accomplish much in life if I have to spend so much of my remaining time on Earth configuring computers . . . While I was waiting for Windows to re-re-reinstall itself as my dual boot on the primary computer, I contemplated the situation on the secondary computer. It, too, had originally run WinXP, and then I had added 32-bit Ubuntu to the mix. Its dual-boot arrangement was working well, except that the Windows part was not working too well. Did I want to invest time in fixing that, or was there another option? One alternative, I thought, might be to install VMware Player, with which I had not yet had any experience, and use it to run a copy of one or both of the WinXP virtual machines I was developing on the primary computer. The scenario here would be that I would generate a working VM on the primary computer and then, using VMware Workstation or Player, both computers would run the identical installation. The secondary computer had a maximum of only 2GB RAM, and I had raided that down to 1GB in order to fully populate the primary computer's memory sockets. I had configured each of the virtual machines to take 2GB. But apparently they could run with less because, as noted above, I did not have a total of 4GB free on the primary computer, and they both seemed to be running there. On the secondary computer, I would not generally have a lot of Word documents or PDFs (or anything else) open, so maybe the memory issue would not be an issue. Pending further experience on the primary computer, I decided to figure on setting up around 6GB RAM on the primary computer and 2GB on the secondary computer, if indeed I could make this VMware thing work on both computers, and if it seemed like I was getting serious slowdowns without it. By the time I had done that much heavy thinking, the WinXP installation on the primary computer had completed, and I had installed Palm Desktop, and I now ran the synchronizer. It occurred to me that synchronizing with the dual boot WinXP on the primary machine would mean rebooting that machine daily, so I thought that I had better set up the same thing on the secondary machine. So what I really got out of this was an excuse to clean off the nonworking WinXP installation on the primary machine, and replace it with something that would do the basic Windows functions I couldn't do in the virtual machine. So I was ready to reboot the primary machine into Ubuntu but, alas, the WinXP reinstallation had knocked out my Grub bootloader. I was getting no Ubuntu option when I rebooted. I followed some How-To Geek instructions on how to get Grub back. Basically, those instructions were to boot the Linux CD and then type this into Terminal:

sudo grub root (hd0,0) setup (hd0) exit

If Windows was now missing from Grub, there were further instructions on that webpage. These directions said they assumed that hd0 was the address I had used to install Grub in the first place. All very good. But the 64-bit Ubuntu boot CD did not finish loading its "Try the CD" option, for some reason, so I tried a Knoppix Linux CD instead. That left me with a black screen and no hard drive activity. This was getting weird. Drive Image, Ubuntu, Knoppix . . . all of these CDs that had worked for me in the past weren't working now, whereas the Windows CD was working just fine. I tried booting the 32-bit Ubuntu CD; same thing. I had a green (not yellow) activity light on the monitor, but a black screen and no hard drive or CD activity. I guessed that maybe Ubuntu couldn't work with this particular monitor, so I tried plugging the other monitor into the primary computer instead. That worked. Now I just had to write down the instructions (above), obtained from a website on the secondary computer, and then run around back and plug the monitor into the primary computer again so that I could enter them. But when I typed those lines, I got back an error, something like, "Cannot mount selected partition." Also, "exit" didn't work. I hit the reset button and booted the GPartEd CD. It informed me that the Windows drive C partition was sda1, and the Ubuntu partition was sdc8. Soooo ... which one was the Grub editor supposed to edit? I wasn't too confident of these instructions. I tried again with some Ubuntu community instructions. They suggested what seemed likely to be a helpful additional command:
find /boot/grub/stage1
So I rebooted with the Ubuntu 32-bit CD. This time, I didn't need to switch monitors. I had no idea why that little problem had cropped up; maybe one of the other CDs had somehow tainted the well. Whatever. In Ubuntu booted from the CD, I typed the lines recommended by the community instructions, and the FIND line came back with (hd2,7). So I guessed that must have been the same as sdc8, subtracting 1 (presumably because the count started with zero rather than one) and restated as hd rather than sd. Anyway, those instructions seemed to work. It said "successful" or "succeeded" -- can't remember which. But when I rebooted, I got no Grub. I was back in Windows, having seen no alternative. I rebooted and got the same thing again. Looking again at the instructions, it seemed that maybe I had not done everything I was supposed to do. I saw that some other people were pointing to those community instructions, so I just replaced their references to hd2 with sdc (i.e., with what I was actually seeing on the screen), and it seemed to work. It gave me the output they described. But when I rebooted the primary computer, once again I was in Windows, without having seen a boot option. Reading further, I thought that maybe what I had been doing was writing to the Ubuntu partition (as I intended) whereas I should have been writing to the boot partition, where Windows was. It was a good theory, so I gave that a run, following the same instructions but sticking with hd0,0. But that got nowhere. I tried another version of almost the same instructions and still just got Windows where they said I should have gotten my boot list back. I decided to try another approach. I had seen several references to BootMagic, which came with PartitionMagic. I booted my PartitionMagic CD and chose the BootMagic option. It asked me to select the operating system partition I wished to boot. I chose the partition containing my Ubuntu files. The system rebooted, and I removed the CD. I got Windows again. I tried installing BootMagic while I was still in Windows. They gave me only one option of partitions to which they would install BootMagic. It was drive G. That was a small, empty FAT32 partition I kept lying around in case I needed it. So I said sure, go for it. I guess because it was an older version, it didn't find the Linux partition automatically. I had to choose an Advanced setting. On reboot, I got, "Error finding BTMAGIC.IMG. Run BootMagic install. Press a key." And when I did, I got Windows again. So I uninstalled BootMagic. I rebooted the Ubuntu (32-bit) CD. It gave me the usual menu. I had not previously noticed the option down below, "Press F4 to select alternative start-up and installation modes." There was also an F6, "Other Options." I tried F4 first, cued in by a website that said the alternative CD contained a Rescue Mode which included a Reinstall Grub Boot Loader option. But neither F4 nor F6 appeared to offer the Rescue Mode. So I downloaded the alternate CD. It was a monster -- took a while -- so in the meantime I continued with my earlier investigation of alternatives to Outlook 2003. I already had an Outlook *.PST file containing e-mails from this year, and I had saved some PSTs from previous years as well. I wanted something that could import them. It looked like people had had some success in this regard with the Evolution e-mail program that was included with Ubuntu. I saw where it was rated at five stars in Applications > Add/Remove. So I decided to start with that, when I got to the point of setting up e-mail on the primary computer. After a long while, the Ubuntu 8.04 alternate CD image was downloaded, and I burned it to a CD and rebooted the primary computer with it. Sure enough, the opening menu offered "Rescue a broken system" as one of its options. (The others all looked pretty much like what you'd see on the non-alternative installation CD.) The rescue option went through some basic steps and hten asked me which device I wanted to use as my root file system. I assumed that meant, where were my Ubuntu files? I chose sdc8. Next, I got a list of five rescue operations, of which "Reinstall GRUB boot loader" was the third. I selected that. Next, it said,
You need to make the newly installed system bootable, by installing the GRUB boot loader on a bootable device. The usual way to do this is to install GRUB on the master boot record of your first hard drive.
That sounded good. The instructions indiciated that entering "(hd0)" (without quotes, presumably) would do that. So that's what I entered. But no. I got "Unable to install GRUB in (hd0). Executing 'grub-install (hd0)' failed. This is a fatal error." OK. I understood. I went back and tried "/dev/sdc8" and got a fatal error there too. Hmm. Had Windows made it impossible to install GRUB? I tried (hd2,7). That failed too. Maybe they meant I should enter it without the parentheses: hd0, not (hd0). hd2,7? No. So I just went down the list, trying every partition on my drives. I didn't get an error when I tried /dev/sdc6, and I thought that was it; but on reboot without the CD I was right back in Windows once again. The sdc8 option was the only one that didn't get an error *and* brought up the "Reinstall GRUB boot loader" option. So I concluded, for multiple reasons, that that was the right one. But it was no go there. One discussion made me think the problem was that I had multiple disks installed, including the Windows one, so I unplugged all but the third drive, where Ubuntu was installed, and rebooted the alternate CD. Still no luck. Or so it seemed. I tried to reboot the system, and suddenly, what did I see but GRUB? It gave me the standard choices between Ubuntu and Windows XP. So evidently the rescue option had done something. Unfortunately, when I chose the normal Ubuntu option, I got "Error 21: Selected disk does not exist." When I chose the WinXP option, I got "Error 12: Invalid device requested." I booted the GPartEd CD and verified that I did indeed have the right disk plugged in, and that the Linux partition was still there. As I viewed GPartEd, I got an inkling as to why I was getting error messages indicating that I did not have enough disk space. GPartEd showed about 44GB used, out of a total of 49GB, on the Linux partition. When I set up those virtual machines to take 30GB or more, they tried to do just that. So, as I recalled, I had last shut down Ubuntu after suspending one of those machines. Suspending it meant that it reserved its claim on dozens of GBs of drive space. What I should have done, when setting up the VMs, was to set them up to demand enough drive space for their needs, but no more. Now, to fix the problem, I could either recreate the virtual machines or use GPartEd to enlarge the partition, at the expense of its neighbor. But that would have to wait. First, what was I going to do about getting the Ubuntu partition running again? Actually, it wouldn't have been bad to just reinstall Ubuntu from scratch. It was a pretty fast process. But what about those virtual machine snapshots? I guessed that they ought to be able to be copied, easily enough, or revived through a new VMware installation. Portability was, after all, part of the VMware concept, as I understood it. Moreover, I had just seen that my approach of making big virtual machines with big memory reservations had come at a cost. What I should have done, maybe, was to create multiple smaller ones, each reserving just a fraction of my computer's total resources. One machine for Microsoft Word and Excel; maybe a separate one for Acrobat. Give each of them maybe 1GB of RAM and 10GB or less of hard drive space. I would rarely if ever need to run all of those programs at the same time, so they could swap resources in and out as the situation demanded. If one of the programs went bad, it would have no effect on my ability to use any of the others; they would not cripple a virtual machine containing multiple programs. They would also be more likely to run on the secondary computer, with its 2GB maximum RAM limitation. This raised the question of what, exactly, was a VMware "appliance." I had seen the term used, but had not really grasped it. But I decided to postpone that question until I got closer to the point of being ready to do something with the answer. First, I needed to get back to the point of having a working system. That need prompted me to stop and reflect on the situation. I had had a working system. Then I had had a problem with being unable to dual-boot it. This had resulted in my Ubuntu installation being unavailable. That result, on my primary computer, was unacceptable. Even if I managed to figure out a fix this time, there was no guarantee that it would save me next time. There was a risk that, in the middle of some rush situation, I would have to stop everything and go back to screwing around with Windows and/or reinstalling Ubuntu. I had already decided to maintain a dual boot setup on my secondary computer, realizing that daily rebooting into Windows on the primary computer would be disruptive. So why not go the additional step -- why not just forget about Windows altogether on the primary machine? I could mess around with Windows on the secondary computer, enduring days of downtime if things went south; and meanwhile my primary machine would continue to chug along with Ubuntu and VMware. I plugged in all three drives and rebooted, to see where things stood. There was no GRUB menu. Instead, Windows booted up with no problem. So I could continue the effort to fix GRUB and use my existing Ubuntu installation, or I could start over with a new Ubuntu installation. I decided to start over. Doing so could save me from spending any more time with this GRUB situation. It would also, incidentally, give me a new Firefox web browser installation. Ubuntu 8.04 had shipped with Firefox 3.0 as its default browser, and Firefox 3.0 had proved not yet ready for prime time. It seemed that Canonical had gotten overeager in its desire to have something new to show. In my opinion, this bad judgment had damaged the company's credibility, and that of Ubuntu as well. I had attempted to uninstall Firefox 3.0, but the attempt had not gone well, and my efforts to repair it had been unsuccessful. At this point Firefox was not working at all in Ubuntu on the primary computer. Upon reinstalling Ubuntu, I could try again to uninstall Firefox 3.0 and restore Firefox 2.x, thereby also regaining access to very useful add-ons that were not yet functioning in 3.0. There was also the question of what to do about Windows. I had several options. One was to wipe out the Windows partition. I thought it might be less drastic to use GPartEd simply to hide the Windows partition before reinstalling Ubuntu. In that case, I thought, I might still have a dual-boot computer, but I would be able to get into Windows, in an emergency, only by unhiding it. It would not appear on a GRUB boot menu, so when the Windows partition was hidden I would simply boot directly into Ubuntu, and when the Windows partition was unhidden I would simply boot directly into Ubuntu. A third option was to try again with the dual-boot concept. Since I was reinstalling Ubuntu, I would not need to use the additional tools and other options I had discovered for possibly fixing the installation or configuring GRUB from within Windows, including GrubInstall, Grub4DOS and WinGRUB. I decided to try this kind of hidden-drive dual-booting and see what happened, so I didn't go further with those other GRUB-related tools at this point. I booted the GPartEd CD and reviewed the situation. Windows occupied the first partition of the first drive, as it demanded. Its partition was largely empty, given that I had now installed just a basic WinXP system. So I instructed GPartEd, first, to shrink that partition and make the space available for other uses, and to hide that partition. My second hard drive, at present, was being used for backup. I thought it probably made more sense to switch the SATA cables and let Ubuntu be on the second hard drive. That way, if I stopped using an internal backup drive, it would have no effect on Ubuntu drive addresses; Ubuntu would continue to be in the first partition on the second drive. All of the second drive's partitions would continue to be logical drives within an extended partition, and my third hard drive would now be backup space. According to a seemingly knowledgeable Ubuntu forum post, it was OK that my Ubuntu partition was extended rather than primary. Chapter 16 of the Workstation User's Manual had some performance tips. First, it said, "The performance of virtual machines depends on the capacity of the host machine's processor or processors, and might degrade significantly if you overcommit the processors by running too many virtual machines at the same time" (p. 369). I decided I would experiment with this and, if necessary, would double-up some of the programs, so as to reduce the number of virtual machines in use; but for now I would rely upon the 64-bit processor (and a possible future upgrade to a faster one) to handle two or three simultaneous virtual machines, which was what I expected to be running most times. The manual also said that Linux 2.2.x series kernels would support only 1GB of physical memory by default (p. 370). "Physical memory," according to Wikipedia, meant RAM. Wikipedia also said that Ubuntu 8.04 used Linux kernel 2.6.24. This made it seem like this section of the Workstation User's Manual might not have been updated recently, as the latest kernel to which it referred was only 2.4.x. The manual advised against having low free space on the host disk (p. 371). A somewhat confusing Ubuntu community FAQ advised having, ideally, twice as much swap space as RAM, but also seemed to cite Wikipedia for the concept that 2.6.x kernels use swap files in addition to swap partitions; that those files are just as fast as swap partitions; and that Linux can put those swap files anywhere, as needed. But I had squeezed some extra space out of a neighboring partition, so I set swap at 6.7GB and the Ubuntu program partition at 107GB. As a performance-improving alternative, recommended using separate hard drives for the operating system and the virtual machines. I wasn't sure how that was done, but I decided to reserve space for it, just in case. So on the third hard drive, I told GPartEd to carve out another 100GB ext3 partition and called it VMS. I chose the third drive because I was thinking that Ubuntu would be busy on the second drive, and my data would be getting written to the first drive, so this third drive would otherwise be sitting idle except when I was writing some kind of backup to it. With all those changes set, I slapped GPartEd on the ass and said Giddyup! and it took off. And so did I. I went for a run, and when I came back, I took a shower, ate, went to the movies, went shopping, and generally frittered away the day. Because it was Saturday. Because it was summer. Because it looked like it was going to take GPartEd ten hours to make all those changes. Next day, I started a new post to chronicle my new start in Ubuntu and VMware.



nice blog and post..
keep up buddy..