Showing posts with label install. Show all posts
Showing posts with label install. Show all posts

Friday, January 21, 2011

Windows 7: The INSTALL Partition

For a long time, probably since the 1980s, I had kept my Windows installation on drive C and my data on drive D.  (Drives, or partitions of drives, can be readily created within Windows 7 and also by partition manager programs.  GParted, included in the downloadable Ubuntu CD, has been the most reliable partitioning programs for my purposes in recent years.)

Having the data on drive D had several advantages.  One was that I could back up drives C and D on different schedules.  Once I got a good Windows installation set up on drive C, I didn't need to back it up very often.  I'd just make a drive image (using Acronis True Image in the past few years), and I'd make an updated image backup just when I had done some significant new program installation or adjustment.  By contrast, I would want to back up my data on drive D on at least a daily basis.  Of course, when I made the image of drive C, I would need someplace to put it other than drive C.  An external drive was a possibility, assuming the bootable CD would recognize it, but it would tend to be slower, and this would be complete downtime, when it would not be possible to do other work.  It worked the other way, too:  having the data on a separate partition meant that I could completely reinstall Windows without affecting or even worrying about my data.

There were exceptions to that last statement.  Some program configurations were so detailed, time-consuming, and/or oft-changing as to constitute a sort of data.  Not the kind of data I was supposed to be working on, but data nonetheless.  An example:  Firefox add-ons.  It could take a half-hour or more to find, install, and configure my Firefox add-ons after doing a new Windows installation.  Some add-ons allowed me to export my saved settings, but obviously I would not want to store those on drive C; they'd be wiped out if I reinstalled Windows sometime down the line.

I also found it was handy to keep a local copy of the programs that I would install in Windows, after installing the Windows operating system itself.  I did not want to have to re-download all those programs and re-invent all of the things I had previously figured out about installing them.  So instead I had folders containing the programs to install, with installation notes in accompanying text files, and I named the folders in such a way as to guide me in the installation sequence that worked best (e.g., "01 Motherboard Drivers").  There were also quite a few program installers that I tried and uninstalled, or hadn't gotten around to installing.  Also, some ISOs -- ready-to-burn CD images that I had downloaded but hadn't burned to CD, or wanted to keep because it was a hassle to re-download a 700MB image.  I had collected these sorts of things, not only for Windows, but also for Ubuntu.

I accumulated about 75GB of this stuff.  Keeping it all on drive D meant that my daily data backups were swelling up with all this material that didn't need to be backed up every day.  So at some point I moved a bunch of it over to its own partition, with occasional backups.  What I kept on drive D was mostly stuff that I was actually using in my current installation.  One example:  those Firefox settings files.

Sometime in the late 1990s, I discovered that I could move my Start Menu to drive D.  This would have the advantages mentioned above, including especially the fact that my custom-arranged Start Menu (top-level folders:  Productivity, Online, Multimedia, Tools, Startup, Miscellany) would not have to be rearranged each time I installed Windows.  As long as I installed everything in its default installation location, the shortcuts in the Start Menu would come back to life as soon as I reinstalled the target program where the shortcut expected to find it.

A few months before writing this post, I came to realize that, of course, I could also install my portable applications in the Start Menu.  This would be ungainly in the sense that a bottom-level folder in the Start Menu might contain a slew of program files instead of a nice, orderly collection of shortcuts.  But it was handy for keeping everything that ran in one place, where I could copy it to a jump drive and use considerable parts of it on any other Windows machine.  The Start Menu, wherever located, could also be accessed and synchronized on a network, so that I only needed to configure the Start Menu once and would then have it available for any computer I would attach to my home network.  (Making it available did require a registry tweak.)

Putting the portable applications in the Start Menu had an unwanted side effect.  Many portable apps (especially those coordinated by PortableApps.com) used many of the same program files.  That was a problem because I liked to use DoubleKiller to delete duplicate files on drive D.  I couldn't do that anymore, at this point, because it would detect tons of duplicative portable program files that were supposed to be there.  I looked for a different duplicate remover, one that would allow me to exclude folders like the Start Menu folder, but ultimately decided to stay with DoubleKiller for now.  The reason was that I did not want to risk that, one fine day, I would forget to exclude the Start Menu from a DoubleKiller sweep, and (although this was unlikely) would punch the wrong button and delete that Start Menu from my hard drive.

What I decided to do, instead, was to move the Start Menu so that it would join those other program files -- programs to be installed, etc. -- in their own partition.  I called it INSTALL and gave it a letter of W, so that its location would not be affected by the connecting and disconnecting of various USB drives and whatnot.  So then hopefully the shortcuts in it would stay in place, and would require no further adjustment forever and ever.

Right now, unfortunately, they did require adjustment.  I modified the registry tweak to point toward drive W:\Start Menu rather than D:\Installation\Start Menu.  This caused almost no problems.  The main issue was just that a bunch of shortcuts were now dysfunctional, in that they pointed at executable files on D that were now on W.  I ran Glary Registry Repair 3.3.  It identified 165 new registry errors.  As I scrolled down the list, I noticed that a huge number of the problems identified by Glary were links to IrfanView on D.  I considered doing a global registry search and replace for the IrfanView location -- or, indeed, for all references, changing them from D to W, perhaps with the aid of a global registry search-and-replace tool like Registry Toolkit ($25) or Registry Replacer ($15) or Replace Registry Values (free).  But then I decided it might be safer to let Glary fix those dud links and then do a search in a registry editor for any remaining references to D:\Installation|Start Menu.  I used O&O RegEditor to do that search.  I was now down to a total of just 29 registry references to D:\Installation\Start Menu.  I was going to edit them in O&O, but then decided not to.  As long as they weren't hurting me, I was better off just leaving them alone.  One ill-advised registry edit could cost me an hour or more for recover or restoration.

So this was pretty much the end of the project, aside from some continuing cleanup, correction of shortcuts, etc.  I now had an INSTALL partition, labeled as drive W, containing my customized, shared Start Menu and installers for various programs.  I could now run DoubleKiller on drive D without worrying that it might knock out program files, and without having to do manual exclusions to focus it on the data duplicates that I was seeking.

Thursday, January 13, 2011

A Tweaked Windows 7 Installation: Second Try

I was installing Windows 7.  I had spent days exploring various possibilities.  Unfortunately, I had also acquired a networking problem for which a new installation seemed to be the only solution.  This post consolidates what I learned in the first installation attempt, and adds some new items.  As in that previous post, some of these items were recorded after the fact, and may not look or function precisely as described here.  For example, settings may already have been changed by the time they come into focus in the sequence described here.
My first step was to delete all accounts except the Administrator and the Guest.  The changes described here thus had to be made only to the Administrator account.  I also allowed Windows and other updates whenever they seemed to be ready for installation.  In Windows Update, after installing desired updates, I highlighted all unwanted updates (e.g., foreign language packs) > right-click > "Hide updates."

I made some preliminary adjustments in Windows Explorer.  These included Organize > Layout > Details pane, right-click on the menu and turn on Classic Explorer Bar, and also in Windows Explorer, in Tools > Folder Options.  Also, in my early usage of Internet Explorer, I allowed it to turn on AutoComplete (Tools > Content > Settings).  (This did not fix the perennial problem of IE not remembering passwords, by the way.)

During the first installation, I organized programs that I was installing (including drivers, batch files, and other materials) into folders.  I numbered the folders (01, 02, 03 ...) so that they would appear in the correct sequential order in Windows Explorer.  The contents of all of these folders had to be checked to make sure that I was using programs and other materials designed for Windows 7.  Some but not all of my Windows XP programs fit that description.  The first several folders, at this point, had these names:

01 Motherboard Drivers and Utilities
02 Programs Needed at Start
03 Other Installation & Tweaking Programs
04 Broadly Useful Programs
05 Experimental and New Programs
The contents of folder 05 are addressed in later posts.  This post goes up through folder 04.  In other words, this post describes what I installed, and how I adjusted it, to set up a general-purpose system, mostly using software that I had used previously.

Folder 01 contained several subfolders, likewise numbered sequentially.  The first contained drivers that I would need to load during the Windows 7 installation process if I wished to install Win7 in a RAID array.  I had decided against that.  The second subfolder contained drivers to be installed after the basic Windows 7 installation.  I installed these, and continued on to install motherboard utilities.
Folder 02 contained a few items that I found very useful during the installation and setup process:
  • Antivirus.  I was currently using just Microsoft Security Essentials and Windows Defender, for convenience during installation.
  • AvaFind Professional.  A program that quickly finds filenames.  Some program of this sort was invaluable for locating files needed for various purposes during installation and tweaking.
  • 7-Zip.  Programs to be installed, that had to be downloaded, often came in zipped format.  Windows provided an unzipping feature, but this one was more versatile.
  • Google Chrome.  I found it easier to use Chrome, rather than Internet Explorer, to search for installation-related information.  Turning on Chrome's sync feature minimized the time needed to configure this tool.  Basically, my list of favored extensions was available as soon as I installed Chrome.
  • Bullzip PDF Printer.  There were a few items that I wanted to save as PDF during this process.
  • Router driver and utilities.
Folder 03 contained hardware drivers, registry edit (.reg) and batch (.bat) files used to configure the system, and other programs needed for the basic installation and tweaking process.  The previous post describes most of the materials in this folder.  I have added links in the following list to those that are not mentioned in that previous post.  For the most part, I ran straight through these materials, installing them all after the initial Windows installation.  I installed the programs before turning to the manual tweaking tasks (below) because these programs would take care of some of those tasks automatically.  The programs I installed at this point, in approximately this order, were as follows:
  • Printer drivers and utility software.
  • Win7NewInstall.bat and Win7RegTweaks.reg.  These contained a collection of registry tweaks and other adjustments and customizations.
  • Classic Shell, to change the look and some functions of the Windows 7 Start Menu and Windows Explorer to what I considered the more efficient form of Windows XP.  I went ahead and configured these items at this point.
  • Somehow Windows Live Essentials came up, asking how much of Live Essentials I wanted to install.  I chose Messenger, Movie Maker, and Windows Live Mesh.
  • The first time I tried to play an audio file, Windows Media Player popped up and had to be configured.
  • IOBit Smart Defrag.  I had used this defragmenter for several years and had no problems with it.
  • LockHunter.  This was experimental, for me -- a replacement for Unlocker.  Preliminarily, it appeared less functional.  I wanted integration with the Windows Explorer context menu.  I hoped for a Win7-compatible update of Unlocker.
  • QuickTime.  It appeared that several other programs depended upon this program being installed.
After installing those necessary programs, I changed the following items from the default in Ultimate Windows Tweaker (clicking Apply after each bullet point):
  • Personalization:  Hide detail pane.
  • User Accounts & UAC:  Enable admin approval mode for the built-in administrator account.
  • System Performance:  Enable support for 4GB of RAM on 32-bit Windows OS.  Disable Tablet PC Input service.
  • Network Tweaks:  Disable auto-discovery of media contents in shared network by Windows Media Player.
  • Internet Explorer:  Uncheck "Open first home page when IE starts."  Uncheck "Disable IE check for updates."  Uncheck "Notify when download completes."
  • Additional Tweaks:  Uncheck "Show 'Search ...'"  Show "Move To Folder..."  Remove "-Shortcut" suffix for new shortcuts.
  • It appeared, in some cases, that Ultimate Windows Tweaker was not always effective.  I installed TweakNow PowerPack 2010 and used it to deselect drives not to be displayed in Windows Explorer (in my case, floppy drive A). This setting was in Windows Secret > Windows Explorer.
After restarting the machine, I made changes in Control Panel.  These, too, follow but also modify the steps described in the previous post.  Some (Action Center, Administrative Tools) had already been done in previous steps (e.g., while installing updates or resizing partitions)  Auto-Play was already set the way I wanted, which was suspicious:  had I made more changes to the two-week-old image on which I was doing these tweaks than I had recorded?  Likewise for Personalization (Windows Classic theme. Window Color > Adjust at least Active Title Bar, Inactive Title Bar, Menu, and Desktop).  Regarding Backup and Restore, I was still using Acronis as a fail-safe, but was also using the Win7 system image option.  I would make both after completing some more tweaks.  For regular data backup, I was still using Beyond Compare, which I found was pretty good at showing me when I had nested files too deep. 

Control Panel options still requiring attention were as follows:
  • Internet Options: I went into General tab > Tabs > Settings > adjust as desired. I went to Security tab > Custom Level > Scripting section (near the bottom) > Allow programmatic clipboard access > Enable. I saved and closed those.  I went into Content tab > Autocomplete Settings > turn on.  Then I navigated to YouTube.com and played a video, so as to trigger the process of installing Adobe Flash Player.
  • Power Options: Show additional plans > High performance > Change plan settings > Change advanced power settings > Change settings that are currently unavailable > High performance > change individual items as desired > Apply.
  • Programs and Features: Turn Windows features on or off > Make sure Indexing Service is off.
  • System: Windows Activation > Activate. System Protection > Hardware tab > Device Manager > verify no yellow-circle exclamation marks. Hardware tab > Device Installation Settings > Yes, do this automatically. Advanced tab > Performance > Settings > Advanced > Change > Uncheck automatically manage paging file size for all drivers; instead, set a paging file of 4000-8000 MB (or more) on each hard drive (not on each partition). System Protection tab > Configure > adjust Disk Space Usage as needed.
  • Taskbar and Start Menu: Start Menu tab > Customize. Adjust various items to taste. Turn on Run command. Save and close.
Additional tweaks:
  •  I now had a more or less complete approach for developing a custom-organized Start Menu on a drive other than drive C, where it could be shared with other computers and would survive a Windows crash and reinstallation.  As described in the previous post, Win7NewInstall.bat, used in the previous installation, had created a so-called God Mode folder on this Start Menu.  That folder was still there, so I did not need to recreate it.  I just needed to get around to distributing, across my Start Menu, the shortcuts to every Windows function that I had created via the God Mode folder.
  • As advised, I used Resource Hacker to open C:\Windows\System32\Shellstyle.dll.  There, I went into UIFILE > 1 > 1033.  I searched (Ctrl-F) for the line that said, <style resid="FolderBandStyle">.  I inserted this code after that line:  <if mousefocused="false" mousewithin="false"><Element padding="rect(0rp,0rp,0rp,-28rp)"/></if>.  I left it conditional, able to come up on a mouseover, because I wasn't sure if I might need it in the future.  Later, if possible, I would make this change permanent, without the mouseover option, by inserting only the "Element padding" portion of the line.  With this change made, I clicked on the Compile Script button, there in Resource Hacker. Then I saved the file as Shellstyle.dll in a backup location, so I would not have to do this again.  I right-clicked on C:\Windows\System32\Shellstyle.dll and took ownership, using one of the tweaks installed above.  I copied that backup Shellstyle.dll to C:\Windows\System32, overwriting the existing Shellstyle.dll there.  Then I logged off and back on to see the change.
  • Shut off an annoying question. On the Desktop, right-click Recycle Bin > Propeties > deselect "Display delete confirmation dialog."
  • To make Windows remember size and position of a window, I found two solutions mentioned near the end of a very long thread on the subject.  What worked for me:  right-click on the title (top) bar of a Window.  Choose "Size."  Drag the window and its edges around.  Even if it's exactly where you want it, move it somewhere else and then back, all in one motion.  Then click on the top right X to close the window.  If that technique hadn't worked, I would have gone on to try ShellFolderFix.
  • Every time I started the system, Windows Defender would give me the message, "This program is turned off."  Someone said Windows Defender was unnecessary if I was running Microsoft Security Essentials.  Posts in that thread suggested many remedies, almost none of which worked for the original poster.  A post about two-thirds of the way down that thread offered a solution that worked for me.  I added that solution to Win7NewInstall.bat.
  • Somehow, a Boot folder wound up on drive D.  A thread suggested that (as administrator) I type "bcd c:\Windows /s C:" to get that folder onto drive C with the other system folders.  Before doing that, I made a System Restore point.  To do that, I went into Control Panel > System > Advanced system settings > System Protection tab > Create a restore point.  Then I went ahead with that bcdboot command.  It said, "Boot files successfully created."  I looked at C and, sure enough, there was now a Boot folder there too.  (Maybe there had been before; I hadn't thought to look.)  Now, as advised, to delete that hopefully unnecessary Boot folder, I tried steps through the user interface (taking ownership of the folder), but those did not work.  Using another approach, I went to Start > "cmd" and typed these commands (running as Administrator):
Finally, folder 04.  These were the programs, mostly familiar but some new, that I installed to set up a complete system.  These were as follows:
  • Adobe Acrobat.  I already had a copy, else I would have considered checking out some of the steadily more competent freeware alternatives.
  • Adobe Premiere Elements.  I found that a basic ability to do some video editing was valuable for many purposes.
  • CamStudio.  I was not yet finding good freeware alternatives.  CamStudio, at this point, still did not have a Windows 7 compatible version, so this was a tentative solution.  I was considering buying a copy of Debut, which had done screen video capture pretty well during my trial use of it.  I also installed Jing as an alternative, though it seemed to me that I had already tried and rejected it once if not twice.  When I rebooted, there was suddenly an unexplained, virus-looking dialog offering to let me "Enter or Create a Screencast Account."  When I figured out that this was Jing's doing, I went ahead and created the account.
  • CoolEdit.  An old audio-editing program that still had capabilities and familiarity.
  • Copernic Desktop Search.  My search had led to this as the best desktop search option, much more useful than Google Desktop Search had been.
  • Gadgets.  These were new in Vista and Win7.  Mine were not currently arranging properly on the desktop.  I was not sure how much I would use them.
  • Microsoft Office 2003.  I had OpenOffice Portable already in place as an alternative.
  • Shortcuts to copy into C:\Windows.  As noted in a comment following a previous post, I had discovered that putting shortcuts to programs would make them available for easy reference in batch files.
  • Aqua Deskperience.  I had bought this for capturing text from a region onscreen.  There were freeware alternatives that did the same thing now.
  • EditPadLite.  A Notepad alternative.  After installing this, I decided to rely on Notepad++ instead.
  • File Checksum Integrity Verifier.
  • Firefox.  The portable version had not been reliable for me.
  • Freeware PDF Unlocker.  Drag a PDF onto this desktop icon to make a non-locked copy, so that you can add highlights and comments.
  • Glary Registry Repair.  My Windows 7 replacement for Advanced WindowsCare V2 Personal.  A registry cleaner that I planned to run each time the system started.  I put a shortcut to it in the Start Menu's Startup folder.
  • Google Earth.
  • Handbrake.  For video conversions.
  • iRotate.  Turn the monitor on its side for improved screen captures in some cases.
  • Oxelon Media Converter.  Valuable context-menu addition for all sorts of conversions (e.g., getting audio out of a video file).
  • Paradox dBase Viewer.  For extracting data from old Paradox for DOS files.
  • Skype.
  • TClockEx.  For giving me date and time in the system tray.  I didn't have those because I was using Win7's classic desktop skin.
  • Thunderbird.  For email.  Again, the portable version wasn't up to the job.
  • Total Commander (above).  I wasn't actually using it much, though.  I had largely managed, by this point, to tweak Windows Explorer to suit me.
Note that these were in addition to portable (i.e., standalone) applications that I already had in place and was using for many purposes.  Those were incorporated into my customized Start Menu (above) and therefore did not need to be reinstalled, or even relinked in my Start Menu, at this point.

This gave me a complete working Windows 7 installation.  It represented a great improvement over the previous try.  I was sure there would be further ways to streamline it in future installations.
takeown /f D:\Boot /r /d y
icacls D:\Boot /grant administrators:F /T

Wednesday, January 12, 2011

Windows 7: Upgrade Installation to Win7 Software RAID0 Array

I was trying to install an upgrade version of Windows 7 on a RAID0 array.  This post contains some notes on what I learned about the possibilities.

I had a new basic hard drive.  I started by installing Win7 on that drive.  The upgrade version of Windows 7 required a previous version of Windows to be installed.  It was not enough just to have the previous disc or serial number.  I was interested in upgrading from Windows XP.  To accomplish this installation, then, I had to install my copy of Windows XP and then upgrade from there.

Having done that, I used Disk Management (diskmgmt.msc) in Win7 to create a couple of Windows 7 software RAID0 arrays on two other empty hard drives.  Unlike other RAID solutions, Win7 was willing to create multiple arrays and single-drive partitions on a pair of drives being used in a RAID0 array.

I hoped to install Win7 into one of those arrays (which I called PROG-FUTURE), and to put my data into another.  Of course, since this was RAID0, I planned to have a good backup scheme for the data.

I went ahead and copied my data into that RAID0 data array.  Later, when it came time to try to install the Win7 upgrade to the PROG-FUTURE array, it seemed that this might have been a mistake.  An attempt to install WinXP to PROG-FUTURE got as far as the point where the installer recognized the various partitions on my drives.  It saw the entire hard drive as a single dynamic disk.  In other words, WinXP might have been willing to install to at least one of the two drives I was using for my RAID arrays.  It gave no sign that it would install itself in any array format to two drives simultaneously.

I was not sure whether an attempt to install WinXP, Win7, or any other operating system to a dynamic drive would run into problems.  There did exist a Dynamic Disk Converter program, and probably others like it, that would apparently be able to convert the dynamic disk to a basic disk format.  I could not say how well such programs would work.

It had occurred to me that perhaps I could use the Universal Restore feature of Acronis True Image Home 2011 (ATIH) to restore a working Win7 installation to the PROG-FUTURE array.  My attempts along those lines did not succeed.  As far as I could tell, ATIH was not capable of restoring a RAID0 array.

Another possibility was to use Ubuntu 10.10 to copy Windows 7 program files from a Win7 installation on a basic drive to the PROG-FUTURE array.  This did not appear feasible at this time, however, because Ubuntu evidently could not see the Win7 RAID0 array as such.  I also wasn't sure whether the resulting partition would actually boot.

An attempt to install directly from the Win7 upgrade CD to the PROG-FUTURE array failed early in the process, when I received this error message:

Windows cannot be installed to this hard disk space.  The partition contains one or more dynamic volumes that are not supported for installation.
It appeared, in other words, that Windows 7 could not be installed to a software RAID0 array created by Win7 itself.  I found a thread suggesting that there were ways to make it work, but it seemed that the process was tricky and prone to problems.  It appeared that the array would probably better be created from some other software or by using a RAID0 controller on the motherboard or on a separate controller card.  Another possibility that I had not heard of previously was native virtual hard disk (VHD) boot.

Saturday, October 30, 2010

Ubuntu 10.10: Streamlined RAID 0 Installation

I had previously installed Ubuntu 10.04 on a two-drive RAID 0 array.  I did that to make a Windows XP guest virtual machine (VM) run faster in VMware Workstation 7.1.  I had then run into some problems with that installation, and had abandoned it.  Now it was time to try again, but this time with Ubuntu 10.10.  This post describes the process in more streamlined terms, drawing from the previous post in which I logged the details of that earlier attempt.

This time, as before, I had two hard drives for the RAID 0 array, plus a third drive on which I had already installed Windows XP.  The two empty hard drives for RAID were each 320GB.  That third drive also held my /home partition (i.e., the contents of the /home partition from a previous Ubuntu installation), which contained many of my settings and adjustments for various Ubuntu programs.  In other words, my Ubuntu installation would not be like a Windows XP installation, where it would be necessary to reinstall all of my applications (except the portable ones) after reinstalling the operating system.  The third drive also held my Linux swap space, which I probably could have put into the array instead, along with a partition I called LOCAL, which would hold backup copies of the VMware virtual machines.  I was going to put the active VMs into the RAID 0 setup to make them run faster, but of course RAID 0 was riskier in the sense that failure of either of the two hard drives would mean the loss of everything in the RAID 0 array.

I started by downloading and burning the Ubuntu 10.10 alternate (or "alternative") CD.  I booted that CD and chose the "Check disc for defects" option.  This took five or ten minutes, and then it said, "Integrity test successful," and then rebooted.  So then I went through the "Install Ubuntu" option and took the basic steps (selecting my country, my keyboard type, etc.).  The meat of the RAID 0 process began about three minutes into that video by amzertech (speaking, here, of its Part 1, not Part 2), where it was time to partition the drives.  I went to Manual (i.e., not Guided), and this put me into the main "Partition disks" screen, the one beginning with "This is an overview."  I went down to the first of the two hard drives.  It referred to them as SCSI partitions, but it also recognized them as being sdb and sdc.  So it looked like I had correctly cabled that third drive to actually be the first in the system (i.e., sda, a/k/a SCSI3 according to the partitioner), so as to make Windows happy.

The general concept of the RAID setup process was that, first, you designate some free space on each drive as a physical volume for RAID, and then you combine those physical volumes from the two (or more) drives into a single software RAID device.  The following paragraphs provide the details.

First, following the video, I went down to the first of the empty 320GB drives that I was going to use for my RAID array.  In my case, unlike the video, there was not yet any "pri/log" line showing "FREE SPACE" that I could select, under the drive identification line on the screen, so I just highlighted the drive itself and hit Enter.  This gave me the option of creating a new empty partition table on the drive, and I went with that for each of the two drives.  Then I highlighted the pri/log line under the first 320GB drive, showing free space.  There, I hit Enter and chose "Create a new partition."  For its size, I typed "50GB" and made it a primary partition at the end of the drive.  I guessed that this meant the outside of of the physical disc, where I believed data transfers would be faster.  Instead of leaving "Use as" at the default ext4 setting, I highlighted and hit Enter and went down to select "physical volume for RAID" (enter) > "Done setting up the partition."  I went through the same steps with the second 320GB drive, which was sdc on my system.  So now, back on the Partition disks" screen, each of the two drives showed an entry that looked like this:

#1   primary   50.0GB   K   raid
So this would give me a total of 100GB for my Ubuntu program installation, and I would still have several hundred GB left over as free space.  Now, on the main "overview" screen, I went up to the line that said "Configure software RAID" > "Write the changes to the storage devices" > "Create MD device" > RAID0.  This put me at a list of "active devices."  I wanted sdb1 and sdc1 (i.e., I didn't want to use one of the partitions I had previously created on sda, my third hard drive).  These were the only partitions on drives sdb and sdc, so the choice was easy.  For some reason, they showed up here as being 49999MB rather than 50GB.  I selected sdb1 and sdc1.  I highlighted each of those two, hit spacebar to select them, and then tabbed to Continue > Finish.  This put me back in the "overview" screen, where I saw that I now had these new lines, near the top:
RAID0 device #0 - 100.0 GB Software RAID device
   #1       100.0 GB
              131.1 kB         unusable
I highlighted the line that began with #1 and hit Enter > Use as > ext3 (apparently still more reliable than ext4) > Mount point > "/ - the root file system" > "Done setting up the partition."  This put me back in the "overview" screen, where the line now looked like this:
   #1       100.0 GB     f   ext4      /
I decided to go ahead with the video's approach of putting the swap space on the RAID0 partition.  To do this, I went through the same steps as above, starting with the free space line on each of the two drives.  The only differences were:
(a) I allocated only 5GB on each drive for this partition.
(b) This time, I selected sdb2 and sdc2 (instead of sdb1 and sdc1) as my active devices for the array.
(c) Under "Use as," I chose "swap area" instead of ext3.
The result, back in the "overview" screen, was that I had these lines:
RAID0 device #0 - 100.0 GB Linux Software RAID Array
   #1       100.0 GB    F   ext3      /
RAID0 device #1 - 10.0 GB Linux Software RAID Array
   #1         10.0 GB     f  swap     swap
              131.1 kB unusable
At this point, I wanted to vary from the video by adding one more partition, where I would put my VMs and possibly other things.  I went through the same process as with the first RAID device (above), and I used all of the remaining space on the two drives except for about 1GB.  The active devices in this case (when I got to that point in the process) were, of course, sdb3 and sdc3.  Back in the "overview" screen, I saw that I now had RAID0 device #2 of 528GB.  I would never need all of that space for my VMs, but I had no other use for the space, and this RAID setup process was a one-shot deal:  designate the space in some useful form now, or leave it forever unallocated.

So now, the final step.  I needed to create a /boot partition on just one drive.  That was why I needed to save 1GB.  I could have made one of those last active devices (either sdb3 or sdc3) larger than the other, but there was no point:  as I understood it, RAID0 would use only the amount of space that they both had in common.  So I would wind up with 1GB unused on one of the two drives.  Anyway, to create the /boot partition, I selected that remaining free space on sdb (i.e., the first of my two RAID drives) and used it all up on another ext3 partition.  This time, I chose ext3 without first choosing "physical volume for RAID"; and after choosing ext3, I didn't go right to "Done setting up the partition."  Instead, I stopped first at the "Mount point" option, where I chose the "/boot" option.  Back in the "overview" screen, I saw that I now had my three RAID0 devices at the top of the list, and the /boot device as sdb4 down under the first of my two 320GB drives.

In the "overview" screen, I saw that there was too much information; some had scrolled off the bottom of the screen.  I arrowed down until I got to the very bottom of all that, where I chose the "Finish partitioning and write changes to disk" > Yes option.  This started me right into the Ubuntu installation process, where I just entered basic information (e.g., my name).  The installation was very straightforward, and it worked:  Ubuntu booted up.  I then went to System > Administration > System Monitor > File Systems tab.  There, I saw /dev/md0 as root directory and /dev/sdb4 as /boot.  (The video said that the swap would not be visible here, and it wasn't.)  So my next step, at this point, was to refine the basic installation to suit my preferences.  The description of that process appears in a separate post.

Thursday, September 9, 2010

Ubuntu 10.04 Installation: The Streamlined Version

In another recent post, I described the process of installing Ubuntu 10.04.  This post offers a streamlined version of that post.  That is, it describes another such installation, performed on the basis of that post.

The first step was to install Ubuntu from the live CD.  As before, in this step I installed everything into one root partition.  When installation was complete, I copied my saved fstab from a separate partition to replace the existing /etc/fstab, and then typed "sudo gedit /etc/fstab."  There, I replaced the UUID for the root partition with the new one shown in another Terminal session via "sudo blkid."  I saved and closed fstab.  This part still did not go smoothly -- I still had not mastered the translation of the Ubuntu Community Documentation webpage into terms that fit my situation -- but essentially I typed "cd /" and then "sudo mv /home /old_home" to park the newly installed but largely empty /home folder; then "sudo mkdir /media/home."  On reboot, my desktop was restored to its previous condition.  I deleted the /old_home folder.

Next, I went to the folder where I had saved my backup copy of sources.list and typed "sudo cp sources.list /etc/apt/."  I opened sources.list, copied the commented command lines, and ran them.  They generated what appeared to be error messages.  In Software Sources, I triggered a reload.  It closed without errors.  In Synaptic, I installed these programs:  acroread, acroread-fonts, adobe-flashplugin, boinc, dvgrab, fdutils, gparted, mplayer, nautilus-open-terminal, ntfs-config, p7zip-full, sysinfo, ubuntu-tweak, unetbootin, and webhttrack, as well as these font packages:  ttf-mscorefonts-installer, sun-java6-fonts, ttf-sil-gentium, ttf-sil-gentium-basic, ttf-dustin, and ttf-georgewilliams.  As before, I typed "sudo sh" to install my .bin and .bundle downloads (e.g., GoogleEarthLinux.bin) and double-clicked to install my .deb downloads.  Then I went into Update Manager, and ran and reran it until I was all caught up.

Monitor driver installation and BOINC configuration were as described in the "Settings and Adjustments" section of the previous post.  The GRUB2 menu edits, as described more carefully in that post, were as follows:  to get rid of the Memtest+ options, I typed "sudo chmod -x /etc/grub.d/20_memtest86+."  To let Ubuntu remember which operating system it had used last, I typed "sudo gedit /etc/default/grub," changed the first line to be "GRUB_DEFAULT=saved," and added a second line that said "GRUB_SAVEDEFAULT=true.  To limit the number of Ubuntu kernels shown, I typed "sudo gedit /etc/grub.d/10_linux," added "GRUB_DISABLE_LINUX_RECOVERY=true" at the top, and changed two lines at the bottom to be three that read as follows:

list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
list=`version_find_latest $list`
done
I saved and closed that and typed "sudo update-grub."  I typed "sudo vmware" and made some root adjustments there.  I rebooted and everything looked good.  There were a few rough spots, but I could see that this might not take very long at all, once you got the hang of it.

Friday, September 3, 2010

Ubuntu 10.04 Reinstallation: Another Go

I had previously installed Ubuntu 10.04 once or twice.  This post provides a synthesis of the process, done on a Windows XP dual-boot machine.

Things to Save

The first thing to think about was, What did I want to save from my previous installation?  I was already keeping my data in an NTFS partition that WinXP recognized as D:.  I had named that partition DATA in both operating systems (OSs).  So I did not have most of my data on the root (commonly referred to with a simple slash, "/") partition containing my Ubuntu program installation.  The main exception was what Ubuntu knows as the /home partition.  (This and other Ubuntu folders, being included on a partition formatted in ext3 or ext4, were invisible to Windows.)  The /home partition was the default location for user data files.  My own files -- documents, PDFs, etc. -- were no longer there, but Ubuntu would still save various settings and other things there.  So I decided to try create a new /home partition, and copy the old /home folder's contents to the new /home partition, before reinstalling Ubuntu.  That little effort became the subject of a separate post.

Just in case, I saved my open tabs in Firefox (Ubuntu) using an extension whose name was not visible to me at this writing -- called (I believe) CopyAllURLs.  I also used the FEBE addon to save my complete Firefox setup; and since FEBE had failed in the past, I used the InfoLister addon to save at least the list of addons that I had currently installed.  I had previously saved their settings separately, for those addons (e.g., Tab Mix Plus, Forecastfox) that allowed me to do so.  I saved all of these things to my data drive, not to the Ubuntu programs drive that I was about to wipe out.  All of these steps proved to be unnecessary:  the separate /home partition (below) saved my entire Firefox setup just as I had left it.

I started up Chrome and Opera, both of which I had installed on this machine, and saved a list of their open URLs.  This, too, was unnecessary, thanks to the separate /home partition.  I had already migrated my email and contacts from Thunderbird (Ubuntu) to the Windows portable version of Thunderbird.

There was another thing to save, but I forgot until too late.  I should have run the installed-software command to make a current list of the programs I had installed on Ubuntu.  Instead, I was going to have to use the older list that I had saved some months earlier, and any programs installed since then would have to be rediscovered and reinstalled one at a time.

I should also have saved /etc/fstab.  My set of hard drive partitions had mostly not changed.  I could have just edited that instead of starting over from scratch (below).

That was pretty much all that I needed to save from the old Ubuntu programs partition that I was about to wipe out.  Most of my work was done in Windows virtual machines running on VMware Workstation, and those were on a separate partition already.  So now it was time to begin the installation.

Installation from CD

This time, I installed Ubuntu 10.04 from scratch, using the CD.  Previous inquiries had suggested that the PAE-enabled kernel would be installed automatically when installing from the CD.  (PAE allowed 32-bit Ubuntu to access RAM well beyond the 4GB theoretical limit -- apparently up to 64GB.)  By right-clicking on individual items in the partition install screen during installation, I manually designated a 30GB root ("/") partition for programs.  The installer automatically detected my previously formatted 5GB swap partition.  It seemed that people were still having problems with ext4, so I formatted the root partition as ext3.  At reboot, GRUB did say that I was installing a PAE kernel, so that was good.

Installing Software

Now I ran the second half of the installed-software command (above) to restore the set of programs that I had installed on Ubuntu at various points.  This involved using Nautilus to put a copy of my installed-software list someplace accessible (I chose my Desktop), using "cd ~/Desktop" as the short way of getting to the desktop, and then typing the necessary commands:

sudo dpkg --set-selections < installed-software
sudo apt-get install dselect
sudo dselect
This gave me a menu, from which I chose option 3, "Install and upgrade wanted packages."  It did so.  It took about an hour.  During the process, it asked "Do you want to erase any previously downloaded .deb files?"  My search yielded no clear answer to this question.  I guessed, from a couple of things I saw in that search, that this was like the question that came up in some Windows installations (in Microsoft Office, perhaps), where you would have the option of keeping downloads on the hard drive to make future fixes or upgrades faster, at the expense of consuming additional disk space.  I tried the Yes option.  It paused for a minute and then put me back at the menu.  So I guess it deleted some .deb files.  Anyway, the installed packages included ntfs-config, so now I could run that ("sudo ntfs-config"), so that Ubuntu would recognize my NTFS (Windows) partitions and put appropriate entries in /etc/fstab.  So then /home would be recognized on reboot.

Unfortunately, something in the install-software process screwed up my system, leading to a "udevadm" error message and a whole separate post.  But then, when I rebooted, I had another problem.  I was looking at a nearly blank screen.  It just showed the name of Ubuntu across the top ("Ubuntu 10.04.1 LTS P4 tty1," where P4 was the name of my computer) and then gave me a simple login prompt:  "P4 login."  I wasn't sure what to search for, to solve this problem, so I booted with the alternative installation CD and chose the "Rescue a broken system" option.  Ultimately, it gave me two basic options:  either reinstall GRUB or execute a shell in my Ubuntu program partition (in my case, /dev/sdb8).  I had no idea what to type at the prompt, and I didn't seem to be having a GRUB problem, so I tried a search; but it turned up stuff dealing with monitor problems.  I tried another search and came across the idea that I could just type "startx" to open the graphical user interface (GUI), so I rebooted, entered my username and password at that prompt, and then typed startx.  But this gave me some error messages:  "Failed to open device," "No valid modes," and "Screen(s) found, but none have a usable configuration."

Basically, it seemed that the installed-software process had messed up my system.  So I started over, installing Ubuntu from scratch, and this time I didn't use the installed-software option.  I had to go back through the process of setting up my separate /home partition, and then I worked manually through the installed-software process.  That entailed setting up my repositories.  After that process, some programs were still not installed.  Drawing upon my previous installation and its follow-on comments (as well as notes in a few other posts), I used System > Administration > Synaptic Package Manager to install acroread, adobe-flashplugin, boinc, dvgrab, fdutils, gparted, mplayer, nautilus-open-terminal, ntfsprogs, p7zip-full, sysinfo, ubuntu-tweak, unetbootin, and webhttrack.  Then I installed several programs that I had downloaded separately, on the assumption they were not available via Synaptic.  These included VMware Workstation 7, which I installed, as I had learned to do, by typing "sh VMware-Workstation-Full-7.1.0-261024.i386.bundle" in the folder containing that downloaded bundle file.  The simple "sudo sh" prefix was also adequate for installing my separate .bin downloads (i.e., GoogleEarthLinux.bin).  I installed Beyond Compare, Opera, and Google Chrome by just double-clicking on the .deb downloads.

Settings and Adjustments

Creating the separate /home partition had preserved most of my Nautilus settings, but I still had to tweak a few of those manually.  It had not saved my monitor driver settings, so now I went into System > Administration > Hardware Drivers, searched for available drivers and, for my machine, found NVIDIA accelerated graphics driver (current version) > Activate. This, like other installation and activation steps, would work only when there was no other Synaptic or software installer running.  I rebooted to activate the hardware driver.  Unfortunately, I was still getting some bad ghosting.  Tightening my video cable connectors solved the problem.

Most of my newly installed programs did not require immediate configuration.  To configure BOINC, I went to Applications > System Tools > BOINC Manager > Next > Choose a Project > World Community Grid > Next, and then went into Advanced > Settings to adjust my preferences.

GRUB2 had lost the setting by which it would remember which operating system I had booted last, and would reboot that one instead of defaulting to Ubuntu, so I typed "sudo gedit /etc/default/grub"; I changed one line to say GRUB_DEFAULT=saved instead of GRUB_DEFAULT=0; I added another line, right after it, that said "GRUB_SAVEDEFAULT=true"; I saved and closed that file; and then I typed "sudo update-grub."

Following a previous post, I pruned the list of entries shown in the GRUB2 menu at bootup.  First, I typed "sudo gedit /etc/grub.d/10_linux" and added a line, immediately after the comments section at the top, that said "GRUB_DISABLE_LINUX_RECOVERY=true" (without quotes, as always).  That would prevent me from seeing the "recovery" versions of Linux kernels in that menu.  At the end of that same file, I searched for the place that had these two lines:
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done
and changed it by inserting another list line between those two:
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
list=`version_find_latest $list`
done
(Note that backticks ( ` ) are not the same as single quotes ( ' ) in such files.)  This, I hoped, would show me just the one or two most recent Linux kernels.  Finally, I saved and closed 10_linux and modified its companion file with this command:  "sudo chmod -x /etc/grub.d/20_memtest86+."  This command would hopefully prevent me from seeing the memtest options in the GRUB2 menu.  I rebooted and confirmed that it worked.

Other settings did remain intact via the preserved /home partition.  Unlike the steps described in the previous installation and in another tweak post, I did not have to make manual adjustments to prevent icons for mounted drives from appearing on the desktop.  My previous list of programs that should run at startup remained intact.  Gedit was still my default crontab editor.  The permissions giving me access to various partitions as ordinary user, not root, were still in place.  My VMware settings seemed to have been preserved, except for what may have been a few new root-level settings in the new version of VMware Workstation that I had just installed.

When these steps were complete, I ran Update Manager one last time, rebooted, and confirmed that everything looked good.  Then I rebooted with a CD and made an Acronis disk image on a separate partition.  Done!

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, March 13, 2010

Using a Bootable USB Drive to Install Windows XP on an Uncooperative Laptop

As described in another post, I was trying to install WinXP on a Compaq Presario CQ60-420US laptop that would not boot from a Windows XP installation CD.  This post describes the steps I took to try to install from a USB flash drive instead.

I looked for guides on how to create a bootable USB drive using WinXP SP3.  One webpage suggested that I could use UBCD for Windows (UBCD4Win).  I had already installed UBCD4Win on the computer I was using for this investigation, so I thought this approach might make the process faster.  Following the steps on that webpage, I created a supposedly bootable USB drive, using a cheap 2GB USB thumb drive I had gotten from somewhere.  (It sounded like I had better use at least a 1GB drive.)  The webpage said it could take as long as a half-hour on a really cheap (i.e., slow) USB drive.  I plugged this USB drive into the laptop and pressed Esc during the initial boot screen to open the Startup Menu, and then F9 to bring up Boot Device Options.  It gave me only two options:  the DVD drive and the hard drive.  I exited out of that, and the system tried to Start Windows Normally and then crashed and rebooted.  I powered down, powered up, and tried again.  Same thing.  No joy.  It wasn't working.

I started over, this time creating the bootable USB drive using an OCZ Diesel 4GB USB flash drive (using FAT32 rather than FAT16 as instructed).  It still wasn't a terribly fast process.  When I stuck this one in the laptop and rebooted it and hit Esc and then F9, like before, I got a very different Boot Option Menu.  This time, we had two new entries:  DIESEL and LEGACY PCI DEVICE.  I tried DIESEL.  The screen was completely black except for a white cursor that just sat there and blinked.  (Later, I realized that it would always take a while, and that I should just be patient.  I'm not sure whether that would have solved the problem here.)

I let it go for a few minutes and then restarted the machine and tried the Legacy PCI Device option.  This seemed to be designed for booting via a network connection, from a source at the other end of an ethernet cable.  I didn't have any idea of how to do that.  It appeared that the bootable USB drive process had gone correctly, but that whatever was preventing the system from booting from the WinXP CD was also preventing it from booting from the USB.  To test that, I put the Diesel drive in another computer, which I'll call the "test" computer, and set its BIOS to boot first from the USB-FDD option, second from the USB-ZIP option, and third from the USB-CDROM option.  This gave me "Remove disks or other media.  Press any key to restart."  I did that.  On reboot, it went into GRUB.  (I had this machine set for dual-booting into Ubuntu Linux.)  I went back into the BIOS and changed the first entry to be USB-HDD.  This was my last remaining USB option.  I plugged the Diesel back in.  Once again, "Remove disks or other media."  The Diesel USB drive had given me somewhat more clarity, but it was still not working.  I had tried creating a bootable USB drive once before.  I think that one was for Ubuntu, but it had used the same BartPE components that went into this one.  It hadn't worked either -- not only for me, as I recall, but for a number of other people.

I decided to try another way of making a bootable USB drive, not involving USBCD4Win.  This time, the webpage I followed began with installing BartPE to a folder with a name like C:\pebuilder.  I had already done that, in the process of setting up UBCD4Win.  Next, they had me download and install UltraISO Premium (free to try).  It didn't look like my other CD burning programs gave me the USB-HDD burning option that they recommended, so I went ahead with the installation.  I didn't bother closing my other programs before installing.  Then I ran it as they suggested.  The result was not encouraging.  When I clicked on the drive in Windows Explorer, I got an indication that the drive was not formatted.  I took it out and put it into the test computer anyway.  When I rebooted, to my surprise I got, "Start booting from USB device."  I hadn't yet copied the I386 folder to the USB drive -- couldn't, because the source computer wasn't recognizing it -- but now I yanked it out of the target (I had hit the Pause key at that point in the target machine, so it was just sitting there, politely waiting its turn) and shoved it back into the source machine, which now recognized the jump drive as drive I: (BartPE).  I copied the I386 folder.  While that was underway, I did a quick search for the option of installing XP from the I386 folder on drive C, which I had kind of forgotten about.  It looked like a hassle, so I didn't bother with it at this point.  The I386 copy process got interrupted by an irritating Windows message that one of the files in the I386 folder was being used, so I tried again, copying this time from the I386 folder on the slipstreamed WinXP SP3 CD.

When the I386 folder was all copied to the USB drive, I jerked it out of the source machine and rammed it back into the same USB port in the test machine.  I hit a key to un-pause that machine's boot process, but got "Disk Error -- Press any key to restart."  I did that.  Now BartPE loaded.  It flashed a Windows XP opening screen, so I knew WinXP was there somewhere.  Next, BartPE gave me a screen for DiskInternals.  I killed that.  It wanted to know if I wanted to start network support.  I said no.  I didn't see the DiskPart program described in the webpage, and actually I would have rather used GParted for that anyway.  I tried DiskInternals Partition Recovery, which seemed to be the closest thing to a partitioner, but it didn't look right.  I inserted the GParted CD and went to BartPE's Go > Shut down > Restart option.  On reboot, I went back into the BIOS setup and set the CD-ROM drive to boot before the USB-HDD.

Then I decided I didn't need to be fooling with the test machine anymore.  This USB drive appeared to be working.  So I put the GParted CD into the laptop instead, and also changed its BIOS boot order as just described.  I used GParted to set up a 25GB NTFS partition and then rebooted with the USB drive.  It booted!  This time around, I skipped the partitioning and formatting step described on that webpage, and instead went to BartPE's Go > Command Prompt.  This put me at an X:\minint\System32 prompt.  I guessed this meant that X was the drive letter assigned to the USB drive.  So I did a "CD \I386" and, sure enough, there it was.  So I ran the command they indicated:
X:\i386\winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource /noreboot
Woo hoo -- a WinXP installation screen!  But then, dammit, an error:
Setup cannot continue because upgrade functionality is disabled and your copy of Windows XP only allows upgrades.
Now what?  I had never gotten this before.  There was, as far as I knew, no problem with the CD itself.  A search suggested no obvious solutions.  I suspected this might be a problem caused by the use of a slipstreamed CD with the BartPE process.  I decided to try again with the second approach, to see if that cheap 2GB USB drive could also be made bootable, but using an original Windows XP SP2 CD in that process.  While that was doing its thing, I took another look at that option of installing WinXP from the I386 folder.  I found a webpage that suggested using winnt.exe instead of winnt32.exe.  Unfortunately, I was not sure how to replace the other options in the foregoing winnt32 command.  (Later, I saw somewhere that the command to use would have been X:\i386\winnt /s:X:\i386, where the /S switch defines the location of the startup files).

By this time, BartPE had finished being reinstalled on the cheap 2GB USB drive.  I checked and noticed that the installed files (including /I386) filled 934MB.  The I386 files filled about 2/3 of that by themselves.  I rebooted the laptop with the cheap 2GB drive plugged in, and it worked.  Conclusion:  the UBCD4Win process did not work, at least not unless I wanted to reinstall UBCD4Win, in case it had become screwed up during my previous use of it.  But then, spoke too soon:  the cheap 2GB drive produced the same BSOD I had gotten when trying to install WinXP from the CD.  Why would the same BartPE process work with SP3 and not SP2?  I replaced the SP2 files on the cheap USB with SP3 files (using Beyond Compare to avoid having to recopy everything) and tried again with the cheap USB.  While this was underway, I also tried booting from the SP3 CD again, as I had done at the start of this post.  Nope:  still a BSOD.  When the cheap USB had the SP3 files, I tried booting it.  Nope:  still a BSOD.  So apparently there was some difference between the Diesel USB and the cheap USB.  I tried the Diesel USB once again, just to be sure.  Sure enough; once again it loaded BartPE.

Next, I downloaded WinSetupFromUSB.  It didn’t seem to have a homepage of its own; that link was the first in a long thread about it, and there was a download link there.  It came in a .7z form, and for some reason right-clicking didn’t open up the usual Windows XP “Extract” option, so I used 7-zip to extract it.  It was a standalone; no installation process needed.  It didn’t detect anything on the cheap USB drive, but it gave me options to reformat it with either Bootice or RMPrepUSB.  But then it didn’t seem to be working, so I killed it (Ctrl-Alt-Del) and started it again.  This time it identified it as 2020MB Total (FAT) and gave me an error indicating that I should not be using FAT16 on a drive > 2GB.  So apparently those other instructions were mistaken, and maybe this was why the cheap USB hadn't worked as well as the 4GB Diesel.

I clicked on Bootice and left the Destination Disk setting at the default USB.  The Bootice tooltip had recommended using Grub for DOS, so I clicked Process MBR and chose Grub for DOS > Install / Config.  I left the default settings as they were and went with Save to Disk.  This said, “GRUB4DOS is successfully installed onto this disk!  Please copy GRLDR (and optional menu.lst) to the root of any partition of this disk.”  I clicked OK > Return > Return.  This put me back to the main Bootice dialog.  Following the tooltip, I clicked Perform Format > USB-HAD HAD (Single Partition) and chose NTFS.  I got, “The partition has been formatted successfully.  You can install some kind of MBR and PBR onto it now.”  I had already done the MBR, though, and when I clicked on that it seemed to be indicating that I would be changing the MBR, so I went on to the PBR option.  I left it at NTLDR and hit Install / Config.  This, too, seemed to have been done already.  But then, when I exited all dialogs back to the WinSetFromUSB introductory dialog, I got an error message:
Could not find primary partition on the selected disk!
Please insert USB disk with a primary partition on it and click Refresh button.
I wasn’t sure what I was doing wrong, so I clicked Refresh.  Same error again.  It went away after a few seconds, so I tried RMPrepUSB instead of Bootice.  Here, the steps were numbered.  In step 3, I changed Boot Options to XP.  I went looking for the manual and, in WinSetupFromUSB\files\tools, I found RMPrepUSB.pdf.  (There didn’t seem to be a manual there for Bootice.)  This PDF said that I would have to indicate files to be copied to the USB drive here, in step 5, if I wanted the drive to be bootable.  But what files?  I wasn’t sure, so I just went with this part.  (I noticed RMPrepUSB offered an image “File to USB” button.  From the readme PDF, it seemed this would be useful only if you already had an ISO or other image containing everything that would be needed to boot a USB drive as distinct from a CD.  I didn’t have that, so I didn’t use this.)  Then I clicked on 6, Prepare Drive.  Something went wrong at this point, probably in my choices or in another program I was running.  The system nearly froze, and I had to use Ctrl-Alt-Delete to shut down this program and another one.  I tried WinSetupFromUSB > Bootice again.  It registered the drive as formatted in FAT32, so I went to the PBR button and clicked Install / Config > OK > Return.  Next, Process MBR > Grub for DOS > Install/Configure > Save to Disk.  It said something about installing GRLDR and menu.lst to the root of any partition.  After a search and a look at several websites, I still didn’t know what or where GRLDR was, or which menu.lst to install.  Finally I found a guide on how to use WinSetupFromUSB.  This guide was unfortunately somewhat outdated.  I followed its advice in a modified sense:  I copied the entire WinXP installation CD to a new folder on drive C, and indicated that in step 5 in RMPrepUSB.  Then I clicked step 6, the Prepare Drive button, along with the other OK buttons etc. needed to get it underway.  It spent maybe a half-hour copying the contents of the WinXP installation CD to the USB drive.

When it was done, I clicked Exit and ejected the USB drive.  Before ejecting, I noticed that the contents of the drive appeared identical to those of a WinXP CD; but during the process, I had noticed a brief reference to the possibility that two partitions were being created on the jump drive, and that maybe one of them was hidden.  Maybe this would be the boot partition, and it would make it so that the jump drive really would function like a boot CD.  Maybe.  About this time, I also realized that this might have been a partly wasted effort, insofar as the cheap USB drive had not been a star performer so far; I just hadn't wanted to wipe out that hard-won Diesel drive until I thought I might have a better alternative.

At this point, I used one of the foregoing processes to make a SanDisk Cruzer 4GB flash drive bootable.  I did not record which process; it was late and I went to bed while it was underway.  A day or two passed before I got back to this project.  I booted the laptop with the SanDisk, hit Esc and then F9, and saw that I did have the SanDisk as a boot option.  It did start booting.  It went through "Starting BartPE" and showed the WinXP startup screen, but then collapsed into a BSOD.

I went back to the approach that had worked with the Diesel USB.  This time, it occurred to me, I might not need to go through the long process of copying I386 to the jump drive.  That would be necessary for a situation where a CD drive was not available; but in this situation I did have a drive that would (I hoped) read the I386 file from the WinXP installation CD.  It took only a minute or so for UltraISO to make the Diesel bootable.  When that was done, I closed UltraISO, ejected the Diesel, inserted it into the laptop, put the WinXP CD in the laptop's CD drive, booted the laptop, and did the Esc-F9 sequence on startup.  This time, unfortunately, the Diesel didn't work either; another BSOD.  I thought maybe the problem was that the machine didn't even want to see the WinXP CD, so I tried again, booting the Diesel, without the WinXP CD in the drive, but no:  BSOD again.

At this point, I abandoned this bootable USB approach.  The Diesel USB had worked the first time, to the point of giving me a command prompt.  It might work again, if I kept playing with it.  But by now I had come up with some other possible approaches, so I returned to the effort described in a separate post.

Monday, May 11, 2009

Installing 64-bit VMware Workstation 6.5.2 on 64-bit Ubuntu 9.04

In 2008, I had gone through quite an ordeal to install VMware 6 on 64-bit Ubuntu. What a difference a year makes! By now, VMware was now up to 6.5.2, and Ubuntu was up to 9.04. Also, I had a much better idea of what I was doing. The installation was vastly easier as a result. After installing and configuring Ubuntu, I downloaded the latest version of 64-bit Workstation in .bundle form, copied it to /home/ray (where "ray" was my username), and installed by navigating to that location in Terminal and typing "sudo sh [filename].bundle." In this case, the filename was VMware-Workstation-6.5.2-156735.x86_64.bundle. (To uninstall, go to /home/[username] and type "sudo ./[filename].bundle -uninstall." Stop after the uninstallation portion of the program sequence.) I skipped the "Path to Eclipse directory" option. The installer ran. I got "Installation was successful." To configure Workstation, I typed "sudo /usr/bin/vmware." This opened Workstation as root administrator. I was then able to set Edit > Preferences. The next step was to set up virtual machines (VMs). I had two sources of VMs. First, I had a Windows XP installation that I wanted to convert to a VM. I had been using this installation every day for several weeks and had installed a bunch of software on it. Also, I had been having some weird freezes in Adobe Acrobat, and I wanted to see whether these were caused by the hardware on that particular computer. I figured that if I didn't get the crashes when I ran Acrobat on virtual hardware in a VM, then the physical hardware probably was the culprit. Second, I had some preexisting VMs that I had been using on my previous VMware installation. They had worked reliably, and they were also quite a bit smaller (and would therefore load and back up faster) than the 35GB I had allocated for this latest installation. So, first, to convert that WinXP installation, I booted into Windows, and downloaded, installed, and ran the latest version of VMware Converter. (At this point, that version was 4.0.0.) In this version, I clicked on "Convert Machine" to run it. The first time through, I then ran "Configure Machine" to make it bootable; but I don't believe I did run it when I tried again a second time. In both instances, I indicated that I was talking about VMware Workstation, not a VMware Infrastructure VM. In case it is indeed necessary to run the Configure Machine process, here are the steps in that processs. Configure Machine brought me a message that I needed Sysprep files. These came in different versions, depending on whether the computer had been updated for XP Service Pack (SP) 2 or SP3. (They were supposedly also available on the CD at \Support\Tools\deploy.cab. If you use the CD, remove it before proceeding with the following steps.) I had installed SP3, so I used the instructions for that service pack. For my purposes, the steps to install the Sysprep files were as follows:

(1) Save a copy of deploy.cab on the hard drive, so I wouldn't have to look for it if I didn't like my first VM and needed to recreate it. (2) Double-click on deploy.cab to open it up. (A .cab is a "cabinet," i.e., storage, file.) (3) Copy its files named sysprep.exe and setupcl.exe to a folder named C:\Sysprep. (4) In C:\Sysprep, double-click on sysprep.exe. Select "Don't reset grace period for activation" and set Shutdown mode to "Shut down." Then click Reseal. This should give you a "Sysprep is working" message. It didn't work right for me the first time, but after rebooting it did its deed in just a few seconds.
On the second run-through, I rebooted into Ubuntu, then continued with the following steps. I started Nautilus as root (i.e., "sudo nautilus") and changed the permissions (right-click > Properties) of the /home/ray/.vmware folder so that the user named ray (as distinct from root) had permission to create and delete files in that folder. Then I started the VM, but I got "Error: Cannot open file '/home/ray/.vmware/preferences': Permission denied. Unable to read user preferences." Fortunately, time heals all wounds. When I came back to the installation process at this point, a couple of weeks had gone by and I really had no idea what I was doing previously, but I could see that problem just described seemed to have gone away. So if this happens to you, the recommended solution would be to put your computer in a closet and go on vacation. When I got back to it, I had a new problem. The problem was that my CNN news report videos weren't playing. For this, the recommended solution was to install 64-bit Adobe Flash Player. I followed the instructions to download that. It was a tar.gz file, and this time, instead of using the "tar -zxf filename.tar.gz" command that I had used previously, I tried right-clicking and selecting "Open with Archive Manager." (Not sure if that option had existed in prevous versions of Ubuntu.) This showed me a file called libflashplayer.so. I right-clicked and extracted it to the desktop. I used Synaptic to completely uninstall nsplugin. In File Browser (Nautilus), I enabled "Show hidden files" and moved libflashplayer.so to the .mozilla/plugins folder in my Home directory. That worked for many people, but not for me. I tried again as root (i.e., type "sudo" at the Terminal prompt before any other command -- in this case, "nautilus") and moved it instead to /usr/lib/mozilla/plugins, as one commenter on that instruction webpage suggested. I also tried "sudo killall firefox." Still no luck.
Here, for posterity, were a couple of random notes that I made while I was attempting this installation:
As root, set VM > Settings. As root, in the VMs, type "/dev/audio" in place of "Auto Detect" in VM > Settings > Hardware > Sound Card.
To install VMware Tools in a VM, first use VM > Install VMware Tools. Then, in Windows Explorer, go to drive D and run Setup. May have to insert WinXP CD in the physical CD drive during this process. Better if you've copied the WinXP CD's i386 folder to the VM previously; can just point there for some installation files.
At about this point, I gave up on trying to get VMware to work on that machine. I turned instead to the machine where I had been running Ubuntu 8.04 with VMware Workstation for the past year. I did an upgrade installation of Ubuntu 9.04 on that machine and installed Workstation 6.5.2 there. I used pretty much the approach described above. The upgrade type of installation seemed to save a lot of steps, though; I went right into using Workstation without much delay at all.
I did continue to have a problem, in the new setup, that I had had on that same machine in Ubuntu 8.04. The problem was that if I ran more than one VM at a time, the whole computer would crash when I tried to suspend or close on of them. On the new installation, I didn't get crashes, but VMware became nonworking all the same. I would just get a mostly blank white screen. I couldn't figure out a solution, so I posted a question on this problem.
While I was waiting for someone to suggest an answer, it occurred to me that maybe I could open a separate session of VMware Workstation for each of my VMs. In early testing, at this point, it appears that having eight sessions of Workstation open at once (even if nearly all of the VMs themselves are shut down or suspended) does degrade performance in any given VM. I will be experimenting with how many VMs I can have open without too much of a performance penalty. This approach does seem, so far, to solve the problem of Workstation crashing or becoming unresponsive.