Showing posts with label flash. Show all posts
Showing posts with label flash. Show all posts

Monday, June 18, 2012

A Multiboot USB Drive with Windows 7, Ubuntu, UBCD4Win, Drive Tools, etc. - Second Cut

I had previously worked through the steps to create a bootable USB drive.  I had intended to create just a simple alternative to booting the basicWindows 7 system recovery tools from a CD, but it turned out to be easier to make a more powerful and flexible multiboot USB drive.  Now I had a larger (16GB) USB drive, and more stuff to put on it.  This post contains what I hoped would be a simpler and more comprehensive description of the process of setting up that kind of multiboot device.

USB Drive Setup

I started with YUMI and a bunch of ISOs, either downloaded or created with ImgBurn (see the previous post).  For now, the ISOs I wanted to install were the full Windows 7 DVD, the Windows 7 System Recovery CD, the full Windows XP SP3 CD, Ubuntu 10.10 and 12.04, Knoppix, Acronis True Image Home (ATIH) 11 and also ATIH 2011 with Universal Restore, Ultimate Boot CD (UBCD) and UBCD4Win, Balder FreeDOS, Hiren's Boot CD, BartPE, U.S. DOD LPS, Super Grub Disk, Super Grub2 Disk, MHDDMicrosoft Windows Memory Diagnostic, Memtest86+, Balder FreeDOS, Darik's Boot & Nuke (DBAN), ClonezillaGParted, Partition Wizard, Parted Magic and diagnostic CDs for Samsung, Hitachi, Western Digital, and Seagate hard drives.  Some of these, I knew, were redundant.  I figured I would work out the details later; I was just curious to see how much would fit, and what would work, in the multiboot approach.

Some of those ISOs were already listed as distributions in YUMI.  That was true for Balder FreeDOS, Clonezilla, DBAN, GParted, Hiren's Boot CD, Knoppix, Memtest86+, Parted Magic, Partition Wizard, both flavors of Ubuntu, UBCD, and the Windows 7 installer.  For the others, there was an option at the bottom of the YUMI menu:  Try an Unlisted ISO.  Except for that last choice, using the option to install a recognized ISO would remove that ISO from the list, apparently to help people keep track of what had already been installed.

The ISOs that I had created from CDs, using ImgBurn, were not necessarily named properly. YUMI didn't recognize some of them until I renamed them to match the hint provided in YUMI. For instance, YUMI wanted the downloaded (still zipped, yet renamed to remove the ISO pre-extension) version of Memtest86+.

The installation process got interrupted partway through: I had to pull out the USB drive to use the jack for something else, and wound up killing YUMI and starting again. Neither Windows Explorer nor Windows Disk Management were able to see the drive at all when I reinserted it. This may have been due to not removing the USB drive properly.  I had to plug it into another computer, eject it from that computer, plug it back into the machine running YUMI, and kill and restart YUMI again, to get YUMI to see it again. At about the same time, I also noticed that YUMI would no longer make a program or other ISO (e.g., Ubuntu 12.04) available on its list, once that program was installed on the multiboot USB drive.  Also, YUMI now seemed not to be making any new files or folders on the USB drive, even though it was reporting that the various processes were completing successfully.  The ejecting and reinserting process also apparently fixed these problems:  now, as before, the programs already installed on the USB drive were no longer listed in YUMI, and I could see new things being added to the USB drive.

Windows Explorer seemed to tell me that the installation process was somewhat irregular, presumably due to the divergent demands of these various programs.  Many got their own subfolders, under the "multiboot" folder on the USB drive.  Hiren's Boot CD got its own folder on a higher level; UBCD was represented by just an ISO file in an "ISOS" folder on the USB drive; Balder FreeDOS seemed to have been installed as nothing more than a single file in the multiboot folder.

As noted above, I had to use the "Try an Unlisted ISO" option for a number of the programs listed above.  I used this, first, with the full Windows 7 DVD.  I decided to take this route, after first using the canned "Windows 7 installer" option because, as noted above, I was hoping to install several flavors of Windows.  When I used the canned installer option, the process took only a few seconds, suggesting that perhaps that option was just copying over the information needed for a system recovery approach.  But when I used the custom "Try an Unlisted ISO" option, YUMI indicated that it was copying 3 GB of material, and took several minutes to do it.

After installing Windows 7 on the multiboot USB drive, I used the Unlisted ISO option for the Windows System Repair CD.  That took only a few seconds.  The USB drive's ISOS folder now contained entries for both of those ISOs.  Same thing when I added Windows XP.  I proceeded likewise for the other unlisted programs noted above:  two flavors of Acronis, BartPE, MHDD, Microsoft Windows Memory Diagnostic, two varieties of Super Grub Disk, UBCD4Win, U.S. DOD LPS, and four hard drive diagnostic CDs.

I made some additional observations during these processes.  One was that the ISOs seemed to be copied verbatim into the ISOS folder.  It was possible that long filenames, or filenames containing spaces or odd characters, could cause problems for some programs.  In other words, looking ahead, I wondered whether it would have been to my advantage to rename some ISOs, at least temporarily, to something simpler.  During each installation, YUMI would report information of the following nature:
Creating Label MULTIBOOT on F:
Good Syslinux Exists...
A Previous Multiboot Installation was detected...proceeding to add your new selectio...
Copy to F:\multiboot\ISOS\Super Grub Disk.iso
Try an Unlisted ISO and its menu entry were added!
All Finished, Process is Complete!
Most of these processes took only a few seconds.  After all, these ISOs were mostly very small, containing just a utility program.  Instead of using the "Try an Unlisted ISO" option, I probably could have configured many of them as "Try an Unlisted ISO (Run from RAM)."  When I had finally worked through the foregoing list of programs to install and indicated that I was done, YUMI said,
YUMI has completed the installation.

Your Selections have been Installed on your USB drive.

Feel Free to run this tool again to Install more Distros.

YUMI will keep track of selections you have already Installed.
Windows Explorer > Properties indicated that the 16GB USB drive was now about 60% full (around 8.5GB used, out of 14.9GB actually available).  I exited YUMI, ejected the USB drive, put it into my laptop, and booted it.

Using the Multiboot USB Drive

When I booted the laptop with the USB flash drive (hitting Esc at the appropriate time to see the option of booting from that drive), I got the YUMI Multiboot USB screen.  It presented four options:  Linux Distributions, System Tools, Other Operating Systems and Tools, and Directly Bootable ISOs.  Under Linux Distributions, it showed me the two Ubuntus (10.10 and 12.04) and Knoppix.  So that part of the installation seemed to have worked.  Under System Tools, it showed me Clonezilla, DBAN, GParted, Parted Magic, Partition Wizard, Balder DOS image (FreeDOS), and Ultimate Boot CD (UBCD).  It had nothing under Other Operating Systems and Tools.  Finally, when I chose Directly Bootable ISOs, it said, "Launching GRUB," and then it showed me quite a list:  Windows 7, the Windows 7 Repair CD, Windows XP, two flavors of Acronis, BartPE, MHDD, four HDD diagnostics options (Hitachi, Samsung, Seagate, and Western Digital), Windows Memory Diagnostic, two flavors of Super Grub Disk, UBCD4Windows, and US DOD LPS.  Collectively, these items accounted for everything on my original list except Hiren's Boot CD and Memtest86+.  I wasn't sure how those had slipped through the cracks.

I decided I wouldn't be able to run all of these programs at this point.  But I did want to try a few.  I started off with the full Windows 7 CD.  It worked.  I was able to go into its repair options and run CHKDSK on an external USB hard drive.  (I had to skip past some dialogs in which Windows expressed its interest in repairing my system.  I was not surprised that it was confused by what it found, and there seemed to be a good chance that it would make a mess of everything as a result, if I let it go ahead.)

After running CHKDSK on that external drive, I exited Windows 7 via its Restart option.  That put me back at the point of hitting Esc and seeing the YUMI Multiboot screen again.  This time, I tried Ubuntu 12.04.  I was able to use its copy of GParted to scan the laptop's internal and external hard drive.  GParted found problems with the laptop's C partition, so I retarted from within Ubuntu -- which, again, restarted the computer hardware rather than putting me back at the YUMI Multiboot screen, as might have happened in a virtual setup.  This time, I chose the Windows 7 System Repair CD, rather than the full Windows 7 DVD, and I was able to use that to run CHKDSK.

Next, I wanted to defragment the laptop's internal and external hard drives.  Of course, I could do that from within Windows after a normal boot, but it occurred to me that I didn't actually know, or recall, whether there were any defrag tools that could run from a non-Windows boot -- and, if there were such tools, I didn't know whether they would be included in any of the ISOs that I had installed on the Multiboot USB drive.  One thread indicated that Ubuntu, itself, did not have an NTFS-compatible defragger that would be advisable for use on an NTFS partition, especially on drive C, with the possible exception of ntfsfix.  So I looked instead at UBCD.  It seemed to be working -- its System Speed Test ran, producing a processor benchmark and other information -- but it did not seem to have anything for defragging, and it exited awkwardly, requiring a Ctrl-Alt-Del reboot.

BartPE appeared to have plugins that would defrag, so I tried that.  BartPE began to load, but then gave me a BSOD, requiring a hard reset.  That problem recurred on the second try.  BartPE did not seem to work, at least for purposes of this particular laptop.  It gave me a BSOD with STOP error code 7B.  As I watched it start to load, I was reminded that it used Windows XP, so I tried the Windows XP SP3 option from the Multiboot USB drive.  That gave me an Error 27 ("unrecognized command") in response to this command, apparently contained in the Multiboot CD:
find --set-root --ignore-floppies --ignore-cd /multiboot/ISOS/Windows XP SP3 Slipstreamed.iso
I was not able to determine whether the laptop would have accepted a CD in place of the USB drive, for purposes of booting WinXP, because I had no internal or external CD drive to try it with.  I could have tried a single-purpose USB drive containing only Windows XP, but at this moment I had insufficient time and interest to play with that.  My operating conclusion for the moment was that WinXP (therefore BartPE) did not work with this Multiboot USB drive on this machine.

Moving on, I looked to see if UBCD4Windows might have a defragger.  I noticed, in passing, that UBCD4Win contained a copy of DBAN (as did, I think, UBCD), so (if it worked) apparently I did not need to put a separate DBAN install on the USB drive.  UBCD4Win also had FreeDOS.  These options were available from its initial menu, and it appeared that I could add more.  I went into its menu option that would load UBCD4Win per se; I noticed, once again, that it relied on WinXP; and once again I got a BSOD.   As with BartPE, the STOP code was 7B.  A quick look at one troubleshooting guide seemed to indicate that WinXP and these other programs that used it (i.e., BartPE and UBCD4Win) might be failing to load updated drivers for the hard drive controller.  Another thread suggested going into the laptop's BIOS during bootup (F2 on my machine; DEL on some others) and changing the SATA setting from AHCI to Compatibility Mode.  I didn't seem to have exactly that option.  I did have one that was set as IDE->AHCI; I tried changing that to Native IDE.  It occurred to me, as I was doing that, that possibly I wouldn't be having this problem if I weren't trying to boot with the external USB hard drive connected; I had noticed that doing so tended to stall bootup on one of my desktop computers too.  Anyway, the AHCI change didn't help, and neither did booting with the external USB hard drive disconnected.  End of troubleshooting attempt.

I hadn't thought to verify whether the Windows 7 System Repair CD had a defragger.  I tried that now.  "DIR /S DEFRAG*.*" led to C:\Windows\System32\defrag.exe.  I tried it as "DEFRAG /C /H /M /U /X," but that didn't work.  It worked without the /M.  Apparently there was no "background" in the system repair mode.  (For details, type "DEFRAG /?")  So, OK, I did have an NTFS defragger on the Multiboot USB drive after all.  Only later would it occur to me that, by using the /C option, I might be asking the program to defrag the USB drive as well.  That concern faded, however, as the defragmentation went on . . . and on . . . and on.  Granted, defragmenting a fragmented 2TB drive can take a while.  And it did.  It took days.  I was not sure whether a Windows-based defragger would have taken just as long.  I had observed some pretty leisurely defragging operations from time to time.  But this was really a slow boat to China.

When the defragging was done, I decided to try running hard drive diagnostics.  The external USB hard drive was a Samsung.  When I tried to run the Samsung diagnostics that I had added to the Multiboot USB drive, however, I got the same "find --set-root" error as quoted above, except in this case it was referring to the Samsung HDD Diagnostics ISO, not the Windows XP ISO.  Basically, though, by this point it seemed that a lot of problems would be solved if they, or I, or someone could work through all the steps needed to make a Windows XP CD work on this USB drive.

And that's where I left it for now.  I had much of what I needed for the laptop on this one USB drive.  Until they improved Yumi and/or until I was able to troubleshoot the problems, I could perhaps get other ISOs to run from single-purpose USB flash drives apart from this multiboot one.  Despite the imperfections, these little devices had come a long way.

Tuesday, August 31, 2010

Exporting from Thunderbird, Importing into Thunderbird

I was using Thunderbird as my e-mail program in Ubuntu.  I decided to switch to using Thunderbird 3.1 for Windows as my e-mail program.  It seemed, at this writing, that most people who were transitioning to Thunderbird were going toward Ubuntu, not away from it.  So in this post I am writing up some things that I had to figure out along the way.

I decided to switch to Thunderbird for Windows because I was planning to keep Ubuntu as my underlying operating system, but to focus my applications on Windows XP, which I would be running in a virtual machine in VMware.  This arrangement, I found, gave me dual-boot advantages without having to reboot.

I was particularly interested in using the portable version of Thunderbird as my Windows XP e-mail application.  This would enable me to take my e-mail and my address book with me on a USB flash drive.  The discussion of Thunderbird for Windows in this post relates specifically to the portable version.

After setting up Thunderbird Portable on a Windows computer and making a backup copy, I went into Ubuntu and simply copied over my data.  I found the relevant data in Nautilus (i.e., Ubuntu's File Browser, the equivalent of Windows Explorer), in this location:  Home Folder / .thunderbird / 6abstqrst.default.  (The 6abstqrst part of that name was apparently generated at random, and as such would have a different name in other installations.  Point is, it's the "default" folder.)

I copied that entire default folder to a USB jump drive and compared its subfolders, item by item, to those on the computer where I had installed Thunderbird Portable.  (Of course, I did these and other folder manipulations (below) while Thunderbird was *not* running.)  The comparable e-mail account data seemed especially to be located under the Data\profile\Mail folder.  Thunderbird's Address Book seemed to be in Data\profile\abook.mab.  The Address Book copied and worked without any problem.  The following discussion focuses on problems in getting the e-mail accounts to work correctly.

The simple process of copying e-mail accounts over seemed to work well enough.  I copied all of the folders from Ubuntu via my jump drive to the corresponding Thunderbird folders on the Windows machine.  I kept backups and did this rather painstakingly.  After replacing the contents of one subfolder in Thunderbird Portable with the contents brought over from Thunderbird for Linux, I would start up Thunderbird Portable and make sure that it still seemed to be functioning OK.  Through this process, I ended up with a Thunderbird Portable setup where the desired e-mail accounts did exist.  This may have been helped by the decision to run Thunderbird's Tools > Import option, which I did somewhere along the way.

When I was done, unfortunately, the e-mail accounts that showed up when I ran Thunderbird Portable were still not showing the contents that I wanted them to show.  For example, my Hotmail account was there, but its Inbox was empty, whereas the Hotmail Inbox on Thunderbird for Linux had contained a dozen e-mail messages.  I could see, moreover, that the Data\profile\Mail\pop3.live.com folder contained an Inbox that was 96MB in size.  That was larger than I would have expected, and in any case much larger than an Inbox containing nothing, which is what Thunderbird Portable was showing me.

It seemed that Thunderbird Portable was recognizing the e-mail accounts themselves, but was drawing the contents of those accounts from the wrong place.  I verified this by removing the entire Mail subfolder from Thunderbird Portable.  When I started it up, it was still seeing the same few old items in the same accounts.  I thought it might have observed or figured out where I had moved the Mail folder, so I removed it from that computer entirely; yet Portable was still seeing those same ghostly remnants of some previous state of my Thunderbird for Linux installation.

It took a bit of effort to figure out where those ghostly remains were hanging out.  Portable wasn't drawing them from Data\profile\Cache; they persisted even after I emptied that.  To find the answer, I started Portable, changed the system date to a year in the future, copied one of those old e-mail messages from one folder to another, changed the system date back to the correct year, and exited Portable.  Then I copied the entire Portable folder to a workspace folder elsewhere on the computer, and searched for files bearing that future year's date.  Aside from cache files and scripts, there turned out to be only a handful of files dated in that future year.

That effort led to the discovery that the Data\profile\prefs.js file that I had brought over from Ubuntu was not suited for Windows.  I went to the original backup of my Thunderbird for Windows Portable and copied its prefs.js file to the Portable installation that I was tinkering with, thus overwriting the Ubuntu prefs.js file.  Both of them began with a warning:  "Do not edit this file."  Instead, the warning said, I could follow the instructions provided on a webpage that, as it turned out, was no longer in existence.  A different webpage did advise me to edit prefs.js directly.  Again, of course, I would want to do this while Thunderbird was not running; and if there was any doubt about that, Windows Task Manager (Ctrl-Alt-Del > Processes tab) would confirm whether there was an instance of thunderbird.exe or ThunderbirdPortable.exe currently running.

I opened prefs.js in Notepad, widened the Notepad window to prevent lines from wrapping, and took a look.  I decided I didn't know exactly how to edit prefs.js, so I tried the alternative that the instructions at the top of prefs.js seemed to prefer:  I started Firefox, typed about:config in the address line, and looked to see what was there.  (Note that I did not have any other copies or versions of Thunderbird installed on that computer, else things could have become very confusing.)  I searched for instructions, and eventually realized that it might not make sense to use about:config to change system preferences for a portable program.

So I tried another search.  This led to a webpage that led, eventually, to a mozillaZine webpage that advised me to start over and try using the Kaosmos ImportExportTools utility.  So I made a fresh start, replacing my munged-up Thunderbird Portable with a copy of the backup, and then I installed the ImportExportTools utility as instructed.  Then, in Thunderbird Portable, I went to Tools > ImportExportTools > Import mbox file.  At this point, I had to ask myself:  What, exactly, is an mbox file?  A search led to the discovery that mbox is an e-mail storage format that didn't seem very relevant to Thunderbird's own storage format

To test this, I went ahead with where I was in the ImportExportTools process:  I selected the "Select a directory where searching the mbox files to import (also in subdirectories)" option, and pointed it toward the top level of the folder I had copied over from Ubuntu Thunderbird.  To my surprise, the tool asked me if I wanted to import various programs.  I said no to parentlock and yes to all the other folders it asked me about.  After asking me about those folders, it didn't seem to be doing anything, except that I could see movement in the green progress bar at the bottom of the screen.  When it seemed to be finished, I didn't see any change in Thunderbird's list of folders.  I killed and restarted Thunderbird.  Still no change.  I poked around and then, whoa, I discovered that it had imported everything, including my archives, into the Hotmail Inbox folder (not the actual online one -- just the copy of it that Thunderbird keeps).  I killed T-bird again, made a backup copy of this remarkable state of Thunderbird Portable, restarted the program, and began moving and rearranging folders.

This was looking good, but there were still some things to fix.  First, in T-bird Portable, I tried sending a message that I had kept in the Hotmail drafts folder in Thunderbird for Ubuntu.  I got this message:

Send Message Error
Sending of message failed.
An error occurred sending mail.  Unable to establish a secure link with SMTP server smtp.live.com using STARTTLS since it doesn't advertise that feature.  Switch off STARTTLS for that server or contact your service provider.
A search and then a refined search led to the quick answer that I just had to stop my avast! antivirus software from scanning outgoing messages.

Next, I wanted to get rid of some Local Folders, especially the Inbox and Outbox.  I found a thread that made me think these folders were a product of Smart Folders, which would supposedly combine all of my e-mail inboxes into one Inbox, etc.  I did not want this.  Actually, I wasn't sure this was even the correct explanation, because I was seeing new incoming messages in my Hotmail Inbox, and they were not being mirrored in my Local Folders Inbox.  The advice I got from Yahoo! Answers, usually a font of goofy bewilderment, was as follows:
You can't remove the Smart Folders account using Tools -> Account Settings. You need to either edit prefs.js with a text editor or use the Config editor to delete the account from mail.accountmanager.accounts.
I was inclined to believe this because I had just run across another webpage with more or less the same conclusion.  But the advice on that webpage was oriented toward deleting all local folders, whereas I was using the Local Folders heading as the place to park my e-mail archive.  I right-clicked and saw, from Properties, that Outbox folder was located at Data\profile\Mail\Local Folders\Unsent Messages.  I quit T-bird, made a backup copy of the whole T-bird Portable folder, went into that Local Folders folder in Windows Explorer, and deleted the Unsent Messages entries.  I then restarted T-bird.  No joy.  As expected, the Outbox was still there and the Unsent Messages entries were back.  A new search led to a blanket statement that you could not delete the Outbox because it served an essential function, different from a Drafts folder:  it held messages that the user had tried to send but (because of e.g., no Internet connection) had not yet actually been sent.

So I turned to the next problem arising from the import into Thunderbird Portable for Windows.  I now had two top-level folders appearing at the left side of the T-bird window.  One was for my Hotmail account; the other was for Local Folders.  There should have been a third one, for another e-mail account that had appeared as a top-level folder in T-bird in Ubuntu.  This seemed to be a simple matter of going into T-bird Portable > File > New > Mail Account and entering the information about the account as it was recorded in T-bird for Ubuntu.  But the Mail Account Setup process stayed stuck for a long time on "Looking up configuration:  Trying common server names."  I finally went into Manual Setup and got it working that way.  And with that, the project was done.  I had transitioned from Thunderbird (Ubuntu) to Thunderbird Portable for Windows.

Saturday, August 28, 2010

Organizing Portable Applications in Windows XP

In a previous post, I have noted what I felt were several advantages of portable software, but have also mentioned one or two problems with my attempt to use the PortableApps.com framework.  This post describes my progress toward another approach to using portable applications in Windows XP.

For quite a few years, I had used drive D to hold portable applications.  These were programs, links, and other materials that I would not have to reinstall, if Windows itself needed to be reinstalled on drive C.  So now it was pretty easy to set up a folder called D:\Installation\Portable Apps.  Under that folder, I set up a subfolder called _Menu.  (With the beginning underscore, Windows Explorer would put it at the top of the list of folders.)  In _Menu, I arranged shortcuts to each of the programs I had brought together into the Portable Apps folder.

This approach had its own advantages and problems.  On the positive side, it could be much faster to run programs from the hard drive than from a USB drive.  So treating drive D as the authoritative source, to be backed up and copied from, made sense.  Then, if I took the USB drive off to some other location and made changes on it and/or on drive D, I would want synchronization software that would let me reconcile those two drives in their changed form.

On the negative side, this rigid file structure, which worked well enough on the hard drive, might not work so well with a USB drive.  Imagine copying a program from drive D to a USB drive that would be plugged into some other computer, where drive D would not be available.  The jump drive would take some other letter -- say, G.  At this point, all of my menu shortcuts to portable files stored somewhere on drive D would fail.  Worse, every reference to drive D within my portable programs would fail.  For instance, if the program kept its settings in D:\Installation\Portable Apps\CoolProgram\coolprogram.ini, it would now be unable to find those settings.  (Fortunately, portable programs usually seemed to refer to other files within the same folder, so this might not be too much of a problem.)

To avoid problems with references to drive D, I went looking for another approach.  In the Portable Freeware Collection (PFC) website, I found a list of portable program launchers, ranked in terms of popularity.  At the top of that list, I found a program called PStart.  Its webpage said, "Unlike Windows shortcuts, PStart uses relative paths, when installed as a portable application. If your USB key drive gets another drive letter when you insert it into another computer, your portable applications still can be started properly" -- as long as those applications were on the same drive as PStart.  This appeared to be an improvement on PortableApps.com, where there was some indication that relative addresses might not work for programs other than the .paf files you would get through PortableApps.com itself.

So I downloaded PStart and ran it.  It acted like a normal installer, with advice to close all other programs before continuing.  It seemed that it might not let me install it as a portable application.  I went to the PStart FAQs page for guidance.  It seemed to say I could just go ahead.  Sure enough, I came to a screen that gave me a choice between local and portable installation.  But the portable one was not seeing any portable drive -- because, of course, I had not plugged one in.  That is, it was not going to let me do a portable installation directly to D:\Installation\Portable Apps.  I plugged in a USB drive, backed up, and tried again.  But it was still just saying "other drive" -- that is, it was not recognizing the USB device.  So, OK, I canceled the installation and tried again.  This time, it found the USB drive.  I noticed that, now, it did offer me a Browse button, and that led to any drive on the system.  So perhaps I could have installed it directly to somewhere on D after all.  But it was OK; I went with the approach of putting it in the default location, which was the root of the USB stick.

When installation was done, I accepted the option of starting PStart now.  It gave me a little pop-up window that said, "Rightclick to add items."  I didn't want it to add items to the USB drive, so I killed it, went to the root of the USB drive in Windows Explorer, and moved PStart.exe (the only thing I found there) to D:\Installation\Portable Apps.  Then I double-clicked on it and it ran.  But now I noticed I had two PStart icons in my system tray, so I killed this newly started session, right-clicked on one of those tray icons and selected Exit, and then right-clicked on the other one to show the pop-up window again.

Since I had already accumulated a boatload of portable apps in D:\Installation\Portable Apps, I didn't want to right-click and add each of them manually.  I didn't find guidance on the webpage, but in the program itself, File > Search for Executables seemed to be just what the doctor ordered.  This placed a single top-level item in the Items tab, called simply D:\Installation\Portable Apps, with an indication that it had found 429 items.  I opened that item, dragged the corners of the little window to make it bigger and easier to read, and started down the list.  There were a lot of items to delete.  For example, in the case of 7-Zip, it found 7-Zip Portable, 7-Zip Console, 7-Zip File Manager, and 7-Zip GUI.  I had to decide which ones to delete, and then select and delete them one at a time.  Sometimes I had to try them out; sometimes I had to consult D:\Installation\Portable Apps to see which ones I would actually want to run.  In this way, I reduced the list to 102 programs.

Now there was the question of organizing them.  In my _Menu folder, I could create subfolders for various categories of programs -- web browsers, for example.  PStart's list of 102 programs was not the easiest thing to sort through and find what you were looking for.  I sent PStart's makers a question about that.  In the meantime, I planned to keep both organizing approaches.  I would use PStart for its dynamic ability to start a program regardless of the drive letter assigned to the USB drive; but I would use my menu and its submenus of shortcuts, when copying the Portable Apps folder to another hard drive, because I had long been running portable apps from the same place (i.e., D:\Installation) on my various virtual and native Windows installations.

Before long, I found that I was not using PStart very much.  One reason was that it was just more familiar to use the menu of shortcuts.  I wasn't doing very much work in situations where I actually needed a portable drive.  When I did need to run an app from the jump drive, I could just navigate to its folder and click directly on its .exe to run it.  I wanted portable apps primarily so that I could reduce the number of program complexities and reasons for a system crash in Windows XP.  I wasn't sure if portable apps would actually help in that, but that was the nature of the investigation in process.  So I was just using shortcuts to run my portable apps from their own menu, with the idea of adding that menu to my regular Start Menu at some point.

If I had tried to depend more heavily on PStart, it seemed that I would have had some problems.  First, it was not easy to keep its menu updated.  If I brought in a batch of a dozen new portable apps that I had just downloaded from some website, there didn't appear to be any way to detect just the newcomers.  If I ran PStart's regular "Scan for executables" menu option, I would get the list of 400+ executables again, and would have to go picking among them.  I didn't have that kind of time to devote to this.  In some future iteration, I hoped, the program would remember what it had found previously, and would present me only with the newcomers.

A second problem was that PStart did not provide a way to categorize shortcuts.  I was just stuck with this list of 102 programs.  The office software, video software, file utility software -- it was all just lumped in together.  The Edit > Add Folder option didn't mean that I could add a folder to the PStart file list; it meant that I could add a folder that I wanted to list along with all these applications.  If I knew I needed a video program, but couldn't remember its name or just wanted to see which ones I had available, I couldn't go to a subfolder entitled "Video," within the PStart panel, and choose the most suitable app from there; I'd have to just go down the list of 102 programs, one at a time.  Even then, I'd be limited to those whose names made sense.  If a killer new video program called itself XPQ, it just might not occur to me that this was what I was looking for.  I'd have to edit its name, in the list, to make sure I could recognize it -- thereby increasing the amount of reading I'd have to do when I went searching for a program.

Instead of PStart -- indeed, instead of a menu that I would have to maintain -- I decided to try something different.  It occurred to me that I could just arrange the portable app folders themselves in a menu structure.  So under my Multimedia top-level folder, I would have an Audio subfolder; and in there, I would put the actual program folders for each program that I thought of as being primarily audio-related.  I made a copy of my Portable Apps folder and experimented with this.  Along the way I noticed that I (or whoever I got the idea from) had been mistaken:  shortcuts did seem to keep track of their targets, even when they were copied to another drive -- at least as long as they were all copied together.

This hierarchical arrangement seemed to work pretty well, and I decided to make it my approach, at least for the time being.  The next question was how to integrate that hierarchy into my regular Start Menu, with its shortcuts to installed programs.

Wednesday, February 10, 2010

Ubuntu 9.10, VMware Workstation 7: Failed to Open Sound Device (Workaround)

In previous posts, I tried fixing error messages that I was getting in a Windows XP virtual machine (VM) running on VMware Workstation 6.5.2 on Ubuntu Linux, version 9.04.  I didn't know, at that time, whether some of my problems stemmed from having done an upgrade rather than a clean install of Ubuntu.  Now I found myself facing the same problem again, after a clean install of both Ubuntu 9.10 (Jaunty Jackalope) and VMware Workstation 7.

The problem was as follows:  if I checked the "Connect at power on" option, then audio would not run in the VM until (in full screen mode) I went into VM > Removable Devices > Sound Card > Connect; but when I did that, I would get this error message:

Failed to open sound device /dev/audio: Device or resource busy.  Failed to connect virtual device sound.

One recent discussion seemed to suggest that the problem was that Flash Player and/or Alsa audio.  I suspended my VMs and rebooted the computer.  When it rebooted, I made sure that Firefox was not running.  I resumed the VM and audio played OK in IrfanView.  I started Firefox inside the VM (i.e., in Windows XP) and played a YouTube video.  The audio was still OK in IrfanView.  I started a second session of Workstation and resumed a different VM in that session.  The manual sound card connection went OK; and there, too, I could play audio without stuttering.  The audio in the second VM was not as good; it had some static.

With those two VMs open, I started Firefox in Ubuntu (i.e., not in a WinXP VM).  I played another YouTube video.  Now I got an error message, and audio would not play in IrfanView within the VM.  I tried the other VM; same thing.  The error message was "Failed to open sound device /dev/audio: Device or resource busy.  Sound will be disconnected."  I went back to Ubuntu and killed Firefox.  Now I was able to connect the sound card and play audio inside the two VMs, same as before, complete with mini-stutters in the second one.  I started Firefox again in Ubuntu.  The audio was still OK inside the VM.  If I was playing audio in IrfanView in the VM and then went into a YouTube page in Firefox, the audio would not play in the latter.  I had to restart Firefox to get its YouTube audio to play, and then, as before, I was not able to hear audio inside the VM.  It worked the same way if I played a YouTube video in Opera rather than in Firefox.  So it seemed that the problem (which has apparently been around for years) continued to be within VMware Workstation.

For the time being, the solution seems to be either (a) to watch videos and other webpages that use Flash, do it in a browser session that is running inside your VM, not in a browser running in Ubuntu, or (b) after watching a video or otherwise using Flash in Ubuntu, kill the program that used it (e.g., Firefox) and manually reconnect with your sound card inside the VM.