Ubuntu and VMware: Miscellaneous Fixes
This is the latest installment in a series of long posts that log my successes and failures in the effort to replace Windows XP with Ubuntu. Starting with several posts in July 2008, and continuing for the better part of two months thereafter, I had developed what seemed to be, for me, the best solution. Introductions to those various posts provide more details of the two computers on which I was making this effort, as well as other aspects of the situation. Briefly, I had a primary computer and a secondary computer. Both were dual-booting Windows XP and 64-bit Ubuntu Hardy Heron 8.04. I was using VMware Workstation 6 to run Windows programs, when I could not find an acceptable Ubuntu alternative; and my further fallback was to run Windows programs in native WinXP by dual-booting the computers (preferably, whenever possible, the secondary computer). I had now received and installed an EVGA 256-P2-N751-TR GeForce 8600 GT 256MB video card to replace my previous EVGA 256-P2-N624-AR GeForce 7900 GS card. Both, no doubt, were fine cards, but I had invested a huge amount of time trying and failing to get it to work properly with my Ubuntu installation. I had even considered dialing back to the 32-bit version of Ubuntu but, for better or worse, had already spent $170 on the 64-bit version of VMware Workstation. So there was some motivation to try to make it work this way, if possible -- hoping, of course, that 64-bit was the future anyway. This saga within a saga had begun with my attempt to get multiple monitors working properly. I was not sure where to begin, at this point, but the first thing I looked at was Ubuntu's System > Administration > Hardware Drivers, there on the primary computer. I saw, "No proprietary drivers are in use on this system," followed by a list consisting of just one item: "NVIDIA accelerated graphics driver (latest cards)" and an indication that that driver was "Not in use." So, OK, what should I do about that? The truly wise thing, I decided, would be, first of all, to reboot the computer and make a backup of Ubuntu installation as it now stood. The backup tool I had chosen for this purpose was Acronis True Image 11 Home, so I stuck in that CD and did the deed. Acronis had succeeded for me in one recent use and failed in another, so I was not sure I wanted to rely solely on it. But then I thought maybe I hadn't chosen the disk image option for the second one, so I let it slide and moved on with the NVIDIA project. I decided that the driver listed in Hardware Drivers might not be the right one for the new video card. But as I was reading the endless gyrations that I had gone through in one of my first stabs at this problem, I realized that I wasn't exactly sure when I had reinstalled Ubuntu or what screwed-up situation might be left over from that. I decided the best policy might just be the most straightforward one, so I went into Hardware Drivers and clicked to enable the latest NVIDIA driver. It needed a computer restart, so we did that. On reboot, I went back into Hardware Drivers and now it said the drivers were in use. Encouraged, I tried running Second Life again. And, you know, it worked. So changing video cards may have been the answer to the whole graphics hassle. Rebooting also seemed to install the Compiz feature described in the previous post; I was now able to rotate between Ubuntu desktops by rolling the mouse wheel on both computers. The graphics card issue had also been a problem in my previous attempts to install Google Earth and to use multiple monitors in VMware Workstation. But before I could see whether the new card would resolve those issues, I needed to fix something else. I was doing some of my actual work on the primary computer, and I needed to gain access to a university computer via Virtual Private Network (VPN) on the secondary computer. That is, I wanted to be viewing some PDF articles on the right-hand monitor, which I'll call monitor no. 2, which was connected to the secondary computer, while writing about those articles on the left-hand monitor, no. 1, which was connected to the primary computer. This was not the only arrangement I could have used for this task. I could have expanded the Windows desktop, in the virtual machine on monitor 1, to extend to monitor 2 as well. I was running the second monitor through a KVM switch (separate from the KVM switch used for mouse and keyboard), and could thus have just punched the button to bring both monitors within the primary computer's desktop; and then I could have used a web browser within the VM to access the university website via VPN. I had already configured VPN in the VM, so that part would have been easy. The problem with this approach was that it would perpetuate my dependence on Windows. I was not sure whether it would be better from a security perspective, since I did not know the exact security status of Windows within VMware Workstation. It would also have its own complexities, insofar as I had not actually set up the multiple monitor arrangement yet. And in any case, I wanted both of my computers to have as much capability as possible, so that I could sail right on with productive work if one of them was down, going through some maintenance process, or otherwise preoccupied. Another thing I had to take care of was to update the firmware on my router. I had been meaning to get around to it since I had first installed it, because I had the general impression that updated firmware was important in making sure the router functioned effectively as a hardware firewall. I went to the firmware download page for the Linksys WRT54GL router and downloaded the latest firmware. It landed on my desktop. I unzipped it. This gave me a .bin file. Then I looked at the installation instructions. They led me to the page on how to access the router's web-based setup page. For that, I needed the router's IP address, so I went to the instructions for finding that, but they were for Windows. I found some advice that said to just type ifconfig in Terminal. That gave me several numbers, but it sounded like I was supposed to go with the value under eth0. That one said "inet addr:192.168.2.101." I entered that into the address bar in Firefox and got "Unable to connect: Firefox can't establish a connection to the server." I went back and looked at the advice again. They said the router would end in either 0 or 1. So I tried 192.168.2.0. Unable to connect. But 192.168.2.1 got me a login dialog. Now I had to remember my router ID and password. But I couldn't. I found some advice that said the default was to enter no username at all, and enter "admin" as the password; and if that failed, use the reset button. But that worked, and I was in. Before anything else, I went to Administration, there in the router's internal website, and changed the password. I went to the Wireless and Security settings and made sure they were saved the way I wanted. Then, under Status, I saw that the firmware version was 4.30.11. The one I had downloaded was 4.30.12, and it had a newer date. I looked at the release notes for my version and saw that they had apparently updated some security stuff, so I decided I had better go ahead with the firmware update. The next thing Linksys advised was to back up the router's settings. To do this, in the router's webpage, I went to Administration > Config Management > Backup Configuration > Backup > Save File. That went to my desktop. The next step was Administration > Firmware Upgrade > Browse. I browsed to the desktop and indicated the .bin file that I had unzipped from the firmware download. Then I clicked Upgrade. This gave me Upgrade Is Successful. To complete the upgrade, the instructions said, I had to close my browser and reset the router by pressing its Reset button (on back) for 30 seconds. But another way to reset, they said, was to go into the router's webpage and choose Administration > Factory Defaults > Restore Factory Defaults > Yes > Save Settings. That sounded easier, so I tried that. It said I would be returned to the previous webpage after several seconds, but instead I got "Unable to connect." It seemed to be trying to reach the router at 192.168.1.1. I typed 192.168.2.1 in the browser's address bar. That didn't work either, nor did 192.168.2.0 or 192.168.2.101. The inet addr value was still the same in ifconfig in Terminal. I was now unable to save these notes on Blogger or to reach Hotmail. I tried pressing the router's reset button for 30 seconds. Still unable to connect to any of those 192.168 numbers. Of course, I was now also unable to reach any Linksys or other webpages for instructions. As I recalled, there was another option for resetting, which involved (if I wasn't mistaken) holding in the router's reset button for 30 seconds while unplugging and replugging the router's power. Before doing that, it occurred to me to try to connect using the other computer. But no, it wasn't just the computer; neither of them could connect now. I tried that alternate reset approach. No joy. The router lights were flashing; I just didn't have any use of the thing. I unplugged its power and its Internet connection and plugged this secondary computer directly into the DSL modem. Now I could connect. I went back to the notes I had kept two months earlier, when I had previously wrestled with this same problem. But it looked like I had done everything I had written there. I wondered if maybe I had to restart Firefox or the computer to make it work. Before restarting the computer, I tried accessing the router using Opera. To do this, as I quickly discovered, I would have to plug the router back in and reconnect it. But Opera got nowhere on this. Next, I tried leaving the secondary computer connected to the router, disconnecting the router from the modem, and plugging the primary computer directly into the modem. Now the primary computer was online. In Firefox on the secondary computer, I typed http://192.168.1.1. Now it worked! I got the password screen, entered "admin" as the default password, and I was in. The Linksys instructions now told me to restore the router's settings by going, on the router's internal webpage, to Administration > Config Management > Restore Configuration > Browse. I browsed to the configuration file I had saved on my desktop. They called it a Config.bin file, but Ubuntu had saved it as WRT54GLV1_v4.30.11.cfg. I selected that and clicked Restore and got Upgrade Is Successful. I connected the computers back to the router and the router back to the modem. Now I got "Unable to connect" when I tried 192.168.1.0 or 1.1 or 2.0 or 2.1 on the secondary computer. It also could not access Hotmail. But the primary computer was now able to go online with no problem. I restarted Firefox on the secondary computer. Firefox didn't seem to want to restart right away, so I rebooted the computer while I was at it. That solved it. I got back into the router at 192.168.2.1. Apparently the restored configuration had restored that as its address; not sure why Firefox wasn't able to go to it without restarting/rebooting. I checked the settings I had recently changed, there in the router's internal webpage, and everything looked good. I clicked Save Settings just to be sure, re-entered my new password once more for the road, got back in, and killed that webpage. I was able to browse the Internet once again on both computers. Firmware upgrade completed. I had used dvgrab to capture video from my video camera in Ubuntu. It had converted a 40-minute (or so) tape into ten .avi files, each 1GB in size. After fooling with Ubuntu alternatives, I had decided that I would just continue to do my video editing in Adobe Premiere Elements (APE) in WinXP for the time being. I had found that APE did not run smoothly in VMware, so I decided I would do this video editing in a native WinXP dual boot. I decided to do this on the secondary computer, so as not to interrupt my work in VMware on the primary computer. (I had set up five different virtual machines, each for a different project, and I generally kept four of them suspended at any one time, with Windows Explorer and other programs and documents all set up, ready to go back to work on that project whenever I had the time or other materials or information I needed to advance that project a bit further.) So now it came time to edit some video on the secondary computer, dual-booted into WinXP. But -- what's this? All I could get, from those ten .avi files, was static. The audio was pretty much OK, except for a light, rapid clicking sound, but the video was totally screwed up. It was just static, like you would get if you tuned into a TV station that was off the air. My first guess was that dvgrab had produced the wrong kind of .avi file. I used VirtualDub to patch together those 1GB AVIs into two larger files, and then tried importing the resulting .avi files into APE. But the audio was missing on the first one. So I tried again, converting each .avi separately, without combining. Audio was good for each of these individually. I noticed that the new AVIs were now about 8GB each, replacing the 1GB .avi files that dvgrab had produced. Now the audio was OK and I was able to work with them. This doesn't mean that native Windows was any better-behaved than before. I could run Ubuntu endlessly on the secondary computer without a problem, whereas Windows kept shutting down the system at random. Ah, the bad old days of Windows ... Had a new problem. I was trying to watch videos, from YouTube and elsewhere, on the primary computer. Firefox wasn't playing them because I didn't have the Flash player installed and, at last time I had tried, I could not get it to work. So I had resorted to watching them in Internet Explorer, within a VMware virtual machine. But now I would sometimes get an error message from VMware:
Failed to open sound device /dev/ dsp: Device or resource busy Sound will not be availableAccording to PinoyTux Weblog, "this means the sound device in your host machine is currently in use and the VMware client is not able to access the device." The solution recommended there was to type "killall esd" in Terminal and then maybe restart VMware. I didn't want to go through the time and hassle of shutting down and restarting my several open virtual machines if I didn't have to. I was running a couple of programs in my host Ubuntu operating system, so I tried closing them down, one at a time, and then checking current status in VMware Workstation. The first program I shut down was Second Life, and that did it. As soon as Second Life was off, I could watch and hear videos in Internet Explorer with no problem. I restarted Second Life while a video was playing and still no problem. The problem seemed to be solved. Next. I had a bunch of MP3s on the secondary computer. I wanted something like Winamp to play songs at random (i.e., "shuffle play") from a songlist or playlist. I found a thread that said Audacious was the closest thing to it for Ubuntu Hardy 8.04. The Audacious downloads webpage said version 1.5.1 was the current stable release. I went to System > Administration > Synaptic Package Manager, there on the secondary computer, and searched for Audacious. It was there. I installed it. It appeared under Ubuntu's Applications > Sound & Video. I ran it. It was like other audio players I had seen: nice, streamlined interface with no explanation of controls or options, to be learned on your own time. It didn't appear to be able to recurse subdirectories (i.e., to look for MP3s, not only in the immediately indicated folder, but also in subfolders under that one). So I would have to manually load my 15 or 20 different music folders if I wanted all those songs to be available, which I did. Oh, well. At least I now had a music player. I belatedly remembered that I had already had one, in the form of RhythmBox Music Player. But I couldn't get it to work like I wanted either. This was another one of those things I would have to try to look into later. Next, I had a problem on the secondary computer. For some reason, Second Life kept causing it to completely shut down. I suspected this was a hardware rather than software issue, because it happened when I ran Second Life in Ubuntu too. I moved Second Life to the primary computer and ran it in Ubuntu without a problem. But then the secondary computer also started crashing when I was trying to create MPG files in Adobe Premiere Elements in Windows XP. It didn't crash when I tried to save video as AVI; it just happened when I tried to save video as MPG. Odd, but it happened enough to be predictable. It also happened when I reinstalled an older image of my programs drive and installed and ran Premiere Elements on that. I didn't want to have to reinstall Windows if it wasn't necessary. But then I recalled that WinXP had been kind of flaky on that machine anyway, and I thought I might as well take the opportunity to do a new installation, installing only the essential programs, to see if I couldn't make that system more stable. For starters, I used Acronis True Image to make a backup of my Ubuntu installation. I did that because I had installed Ubuntu on the same drive as Windows, and now, when I tried to reinstall Windows using the Windows XP CD, the installer basically indicated that it couldn't create a WinXP partition on that drive. So I wanted to move everything off that drive, if I could, and start over. I then remembered that it was an older drive, and wondered whether that might possibly be part of the problem. I connected another drive to that machine, but when I tried to boot it, I got "Error 17" from GRUB. From what I gathered, this error would happen when GRUB would perceive your drives in the wrong order, and the best solution (other than just unplugging that additional drive) was to edit the GRUB configuration to make it right. I found what looked like a really good explanation along those lines. But rather than spend the time to work through it, I booted with the Ubuntu CD and took a look at what was on that third (newly added) drive. There were several partitions, but it looked like I had emptied them out (as I would have expected) before setting that drive aside. So I ran the Ubuntu CD's System > Administration > Partition Editor and deleted those empty partitions. Then I rebooted. This time, I got GRUB Error 22. This evidently resulted from GRUB looking for a partition that had been there and wasn't anymore. I found a thread that recommended either (a) running Recovery Console (i.e., boot with the WinXP CD and choose repair) and selecting FIXBOOT and FIXMBR, or (b) using Super Grub Disk to edit GRUB. I was thinking I still had another step to go anyway before worrying about that, and that was to restore the Ubuntu backup to a now-empty partition on the second hard drive, so that I'd have my Windows program files on one drive and my Ubuntu files on another, and I could then reinstall Windows from scratch on that first drive. After wiping out the Ubuntu partitions on that Windows drive, though, I was still getting the same error message from the WinXP installation CD:
Windows XP Professional Setup To install Windows XP on the partition you selected, Setup must write some startup files to the following disk: 305243 MB Disk 0 at Id 1 on bus 0 on atapi [MBR] However, this disk does not contain a Windows XP-compatible partition.It occurred to me that maybe this was a problem that could be fixed by FIXBOOT or FIXMBR. I rebooted the WinXP CD again and ran Recovery Console. There, I ran FIXBOOT, but it said, "FIXBOOT cannot find the system drive, or the drive specified is not valid." That made sense, since I had deleted the Windows program partition in preparation for reinstallation. I ran FIXMBR, though, and then rebooted with the WinXP CD and tried again to do a new WinXP installation. But I still got the same message: "does not contain a Windows XP-compatible partition." It was described as "New (Raw)" in the setup program, but for some reason WinXP could not install into it. So, OK, I rebooted with the Ubuntu CD and moved all of the data from the other partitions to the other drive, so I could wipe the drive clean and start over. But even then, I still got the no-compatible-partition error. I finally unplugged the other drives and rebooted with the WinXP CD. I was then able to install Windows XP, and when that was done, I shut down, plugged in the other drives, and rebooted to continue configuring the system. The remaining question was whether Adobe Premiere Elements (APE) or Second Life would cause this new Windows installation to crash. I installed APE and tried again to make an MPG from an AVI. Previously, its problem, which occurred every time I tried, was that it would crash during the second pass while creating a two-pass VBR MPEG. This time, it sailed right through, successfully creating several different MPGs with exactly the same settings. But then it crashed on the second pass of the fourth MPG. Shut the computer completely off, just like before. Surely, this was a hardware problem. But which hardware? Nothing seemed to be overheating, and there did not seem to be anything else unusual going on on the computer. My guess was the power supply, but I didn't have time or inclination at this moment to shut down both computers, swap out, and fool around until maybe I could make it crash again. APE tried again to make that same MPG, and on its second pass it ran just fine. Hmm. This made me think that the problem may have been a program conflict between APE and something else. I'd had a number of programs open previously, but could not remember specifically which ones. It wasn't the screen saver -- I had set that to "None." Power settings? Maybe. It was set to shut down the monitor after 20 minutes; but when that kicked on, the computer now kept running. Anyway, now that I was on the lookout for the possibility of a program conflict, maybe I would be able to home in on it in the future. Meanwhile, with nothing else running, it completed the MPGs just fine. I ran the same five two-pass MPGs to test it, and there were no further problems. So that part of my dual-boot scheme still seemed to be working. Once I had WinXP reinstalled on the secondary computer, I went into Computer Management. I think Computer Management may not show up as an option in Windows. I forget how I discovered it. It was available by double-clicking on compmgmt.msc in C:\WINDOWS\system32. For this and other enduring items, I kept a copy of my Start menu (right-click Start and select Explore All Users) on a separate drive, so that I would not lose the links if I reinstalled Windows. Anyway, in Computer Management, I selected Disk Management and selected the first drive on the list. I right-clicked on it and chose Properties > Tools > Error-checking > Check Now > Automatically fix file system errors > Start. I did not check "Scan for and attempt recovery of bad sectors," because doing that would make it run immediately. After checking Start, I okayed through the rest of the messages. The basic idea was that it would run its check when I rebooted. I did this for each drive and then rebooted. This version of CHKDSK ran on each drive. When it got to the external USB hard drive, however, it started giving me this message: "Deleting an index entry from index $0 of file 25." It kept giving me those messages. I went to bed and, when I got up the next morning, it was still doing it. It went on for hours. I Googled this and saw a thread in which someone concluded that Acronis Disk Director or Acronis True Image had caused the problem. In their case, the series of "Deleting an index entry" messages concluded with some messages that prompted them to think the drive was corrupt. In my case, for some bizarre reason my battery backup suddenly shut off -- no reason in the world, out of the blue, just up and died -- so the experiment was terminated. I switched the external backup hard drive to be connected to the primary computer. When I turned the computers back on, though, Ubuntu was not able to mount that drive. I rebooted the primary computer into WinXP and set up each drive there to be checked via Computer Management. On reboot, it started giving me that same "Deleting an index entry from index $0 of file 25" message, but this time it seemed to be doing it during the testing of an internal drive, not the external drive (though maybe it would have done it there too, later; maybe it had only gotten as far as one of the internal drives). I couldn't tell for sure because I wasn't paying attention when it indicated which drive it would be checking next. It kept giving me that message for an hour, at which point I put in the Windows XP CD, hit the computer's Reset button, went into Recovery Console, and ran chkdsk /r on each partition that Windows could see. I wasn't sure what happens to a Linux partition when your computer is rudely shut down by a failure in your battery backup. After I finished running chkdsk /r (repeatedly, in each case where errors were reported), I ran a manufacturer's diagnostic CD to check all the drives that way too. Or at least I tried to. The Seagate drive passed the SeaTools diagnostic, but the Samsung drives weren't even recognized by the Samsung diagnostic CD that I had from the previous year, and SeaTools crashed when I tried to use it to test the Samsung drives. I downloaded and burned a CD with what appeared to be the latest Samsung diagnostic program, but the program did not run. It gave me an "Abort from unhandled exception" error message. So anyway, I booted back into Windows and set Computer Management to check all the drives again, and rebooted. This time, everything went fine. Whew! End of encounter no. 32335 with Windows XP. I rebooted the primary machine back into Ubuntu and tried to pretend that nothing had happened. By this time, I had turned my attention to the secondary computer. I had reinstalled Windows XP, and that had wiped out my GRUB boot manager. So now I didn't get a choice of whether to boot into Windows or Ubuntu; it just went straight to Windows. This launched me onto a whole extended problemsolving adventure of its own. When it was done, though, I had GRUB and Ubuntu working again on the secondary computer.
1 comments:
Follow-up re: "Failed to open sound device /dev/dsp" error: see http://raywoodcockslatest.blogspot.com/2009/07/ubuntu-904-vmware-workstation-652.html
Post a Comment