Showing posts with label boot. Show all posts
Showing posts with label boot. Show all posts

Tuesday, February 7, 2012

ASUS Eee PC: Booting from USB: Second Cut: Ubuntu

I had previously done a lot of flailing around, in an effort to boot an ASUS Eee PC from a USB thumb drive (a/k/a USB stick, pen drive, jump drive, flash drive).  It was time to try again.  This time, there seemed to be some easier and more promising avenues of attack.  This post describes this renewed effort, with a particular focus on booting Ubuntu 11.10.

First, the basics.  In the BIOS Setup Utility, I had set my BIOS to boot first from the USB drive.  I got into the BIOS setup by hitting F2 repeatedly while the the Eee was booting.  I already knew that F2 or Del tended to be the keys to hit, on various computers, if I wanted to go into BIOS setup.  But if I hadn't known that, it would have been wise to get into BIOS somehow and change a certain setting, so that instructions and information would come up onscreen while the computer was booting.  The setting to change for that purpose would logically have been in BIOS Setup > Boot > Boot Settings Configuration > Quiet Boot > Disabled.  But that was greyed out and already set to Disabled on my machine, and yet I wasn't getting those boottime instructions.  The answer was to go, instead, into BIOS Setup > Boot > Boot Booster > Disabled.

With that done, I was all set to reboot the Eee and see, onscreen, the information that I should hit F2 to run Setup.  If it went by too quickly, I could hit Pause (note that, on the Eee, Pause was actually Shift-Pause).  For some reason, I had to hit it twice to make it pause.  Maybe I had bad timing.

I wanted to go into the BIOS Setup, for purposes of booting with the USB stick, in order to tell the computer to boot, first, from the USB stick.  If I didn't do that, it would default to booting from the CD drive (nonexistent, in my Eee) or from the hard drive.  The place to make this change, in BIOS Setup, was at Boot > Boot Device Priority.  The item that needed to be first on the list was "Removable Dev."

Now I was ready to boot my bootable Ubuntu USB stick.  Problem:  I didn't yet have one.  For this, I needed a 4GB USB drive (possibly smaller but not, I think, any larger) with Ubuntu installed on it.  To install Ubuntu on the USB drive, I went to the Ubuntu download webpage, downloaded the Ubuntu 11.10 ISO, and followed their instructions to install it onto the USB drive.  Their instructions were just to download and run the Universal USB Installer from Pendrivelinux.com.  That installer was, itself, a portable program -- no installation needed.  When that installer was running, I needed to select Ubuntu Desktop Edition and follow the instructions.

So I had done that, and therefore I had Ubuntu on my jump drive.  And the Eee was seeing the jump drive when I booted it -- I could see a brief flash of recognition, onscreen, before the stupid thing went ahead and booted into Windows as usual.  This was probably about what I had managed to achieve last time I had tried this.

But, as I say, there were new suggestions and possibilities.  One was that I should have put Eeebuntu rather than Ubuntu Desktop onto that USB drive.  The idea was that Eeebuntu was designed to make it as easy as possible to get Ubuntu working well on an Eee.

To be precise about it, some of the players had changed.  By this point, according to Wikipedia, Eeebuntu had become Aurora.  And, for that matter, Ubuntu Eee (apparently not the same as Eeebuntu) had become Easy Peasy, and Ubuntu Netbook Edition had been merged into Ubuntu Desktop.  A Wikipedia comparison table suggested that there were multiple kinds of netbook-oriented versions of Ubuntu:  some were designed for netbooks generally, some for ASUS Eee netbooks, some for specific kinds of ASUS Eee netbooks, and some for other portable devices (e.g., smartphones).  It made sense to get one designed for an Eee, so at the moment it seemed that an Aurora download (either the promised Gnome edition or one of the original Eeebuntu versions) might provide the road to the future, if I did need to try some other Ubuntu version on that USB drive.

I did not need to do that because, for me, the solution was simpler.  Before I got very far into this project at all, as advised, I tried hitting Esc when I booted, so as to bring up the boot menu.  That gave me an option to boot from the USB drive.  And it worked.  I didn't know whether this would address all of the needs and interests that had prompted me to try booting other programs (e.g., Hiren's, XBoot, Grub4DOS) in my previous try.  But for the moment, I was happy.

Friday, January 20, 2012

Adding Bad Clusters to the Bad Clusters File - Second NTFS Boot Sector Is Unwriteable

I was using Windows 7 and, as such, was using hard drives formatted in NTFS and divided into several partitions.  I booted the system with an Acronis True Image Home 11 boot CD, made an image of one partition, and saved it on another.  When I rebooted Windows, the folder that I had told Acronis to create (named "2012-01-20 Backup") did not exist.  Windows Explorer showed it as being just a file, without an extension.

In Windows Explorer, I right-clicked on the drive and selected Properties > Tools > Check now.  I clicked both boxes (i.e., "Automatically fix file system errors" and "Scan for and attempt recovery of bad sectors") and then Start.  But the tool did not run.  It just disappeared.  That was probably because I had a paging file on that drive (Start > Run > SystemPropertiesAdvanced.exe > Advanced tab > Settings > Advanced tab > Virtual memory > Change).  I could have changed that, and then rebooted to make the change effective, and then gone back into Windows and tried again.

Instead, I rebooted with a Windows 7 installation DVD and went into Repair your computer > Use recovery tools > Next > Command Prompt.  At the prompt, I typed C: and then DIR, and then D: and then DIR, and so forth until I found the troubled partition.  I typed CHKDSK /R and let it run.  In stage 2 of 5, it deleted the index entry for the 2012-01-20 Backup folder (which it was calling "file 1045").  So it looked like I was going to have to redo my Acronis backup.  After finishing stage 5 of 5, it said this:

Free space verification is complete.
Adding 602 bad clusters to the Bad Clusters File.
CHKDSK discovered free space marked as allocated in the volume bitmap.
The second NTFS boot sector is unwriteable.
Failed to transfer logged messages to the event log with status 50.
That last message didn't bother me -- I was always getting that when I ran CHKDSK this way.  But I wanted to know more about the others.  This was the second time I'd had this kind of problem after running Acronis.  I wondered whether the problem was with the drive -- that perhaps I should get rid of it -- or whether it was instead something that Acronis was doing to the drive.

What I had done previously was to try to resize the partition using a GParted Live (i.e., bootable) CD -- or, actually, I had booted an Ubuntu Live CD (version 10.10 -- apparently not all versions had GParted built in) and had gone into its System > Administration > GParted option.  If I recalled correctly, GParted had been unable to resize the partition, apparently because of the partition's problems, so my next approach was to remove everything from the partition and then use GParted (or possibly Windows Start > Run > diskmgmt.msc) to delete and recreate it.  That had worked last time, so I decided to do it again.  This was the last partition on the drive, and the consensus seemed to be that the second NTFS boot sector was at the end of the partition.  I had used this Acronis CD for a long time, and had not otherwise been getting this problem.  So I thought this time I would create another small partition, after this one, and just let it sit.  If Acronis was getting confused when it wrote to the last partition on the drive, that little 1.5GB partition might provide a buffer and solve the problem.

So now I was going to try to find out whether it was indeed a hard drive issue.  (One other note:  as I continued in the process, it appeared that the Acronis backup may have come very close to filling the troubled partition.  I wondered whether that could somehow have corrupted it.)

I went into GParted again.  It showed an exclamation mark next to this partition.  When I right-clicked on it and looked at Information, it said several things, including these:
ERROR:  This software has detected that the disk has at least 602 bad sectors. . . . This means physical damage on the disk surface caused by deterioration, manufacturing faults or other reason.  The reliability of the disk may stay stable or degrade fast. . . . Unable to read the contents of this file system!  Because of this some operations may be unavailable.
This number of bad "sectors" matched the number of bad "clusters" reported by CHKDSK (above).  That is, it appeared that there might be no bad sectors other than those that were reported after the Acronis process.  I rebooted into Windows and continued to use the system as usual while moving my data off the troubled partition via Windows Explorer.  Then I rebooted into Ubuntu > GParted and, as just indicated, I created two partitions where there was formerly one.  As before, the first of the two was an NTFS partition.  The new addition was that 1.5GB partition, which I formatted as ext3 (invisible to Windows, thus causing no confusion).  Then I did another Acronis image of my programs drive (C:), as before, saving the image to the new NTFS partition.  When Acronis was done, I went back into Windows and saw that Acronis had created what appeared to be a valid image.

I ran System Information for Windows (SIW) to find out which drive this new partition was on, and who made that drive.  After consulting with Disk Management (Start > Run > diskmgmt.msc) to figure out whether I should be looking at disc 0 or disc 1, I saw that it was a Seagate ST31000520AS.  I went to Seagate's webpage and downloaded SeaTools for Windows.  (I already had a copy, but hadn't used it for a long time, and wasn't sure it was the latest version.)  I installed it and ran its Short Drive Self-Test (Short DST).  It passed.  I ran a S.M.A.R.T. test.  It passed that too.

It did not appear that this drive was failing.  I hibernated and then booted up with Ubuntu > GParted.  Its Information option saw no problems.  Neither did its Check option.  I rebooted with the Windows 7 DVD and ran CHKDSK /r on both of the new partitions (i.e., including the little 1.5GB trailer).  There were no statements of the kind I had gotten on the previous try -- nothing about deleting index entries, bad clusters, or an unwriteable NTFS boot sector.  What I got was, "Windows has checked the file system and found no problems" and "0 KB in bad sectors."  Of course, all of my data (except for the newly re-created Acronis backup) was still on the other drive, so I didn't expect file errors (and CHKDSK ran somewhat more quickly on the nearly empty drive).

It appeared that the previous warnings had been false alarms, triggered by the use of Acronis True Image Home 11 to save an image that nearly filled the last partition on the drive. 

To round out my investigation, I went back through the random webpages that I had opened up while searching for insight.  One post raised the possibility that I might have been able to use ntfsresize to resize the partition instead of removing its data, deleting it, and creating a new one in its place.  Ntfsresize (and ntfstruncate) were apparently Linux utilities, and it looked like using them could be risky.  There was a report that seemed to confirm that GParted would have reported an error again if it had found a bad sector, so getting no error messages in GParted's Information option apparently implied that the bad sectors were gone.  Evidently the repartitioning had reset them.  One webpage raised the question of whether the partition had been marked as a boot partition.  As I recalled from my glance in GParted, it hadn't.

Another thread alerted me to the thought that I should have run CHKDSK /B instead of /R.  To verify that, I went into a command window and typed CHKDSK /?.  It said, "NTFS only:  Re-evaluates bad clusters on the volume (implies /R)."  I wondered whether CHKDSK /B might have been a shorter response to the whole problem.  It also said, "The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume."  As Microsoft advised, I wouldn't have relied on those switches by themselves; but since I had already run /R, at this point I could have tried CHKDSK /I /C /B.  (Too bad there wasn't an /M option -- I'd have had a missile.)  Apparently some of these options were not available in earlier (pre-Vista) versions of Windows.

I had run a couple of searches and probably could have gone on indefinitely, but by this point it began to seem that I had already encountered most of the main recent lines of tinkering on the question.  One exception:  I had searched for, but never did find, a tool that would give me a visual representation or map of bad clusters on the drive.  I vaguely recalled that Norton had provided something along those lines, back in the DOS ages.  Defragmenters like Smart Defrag would show a nice, colorful map of disk clusters, but at this point I wasn't aware of a Windows 7 defragger (or other tool) that provided a depiction of bad clusters specifically, so I sent IOBit a suggestion to that effect.

Monday, January 9, 2012

Windows 7: Cannot Create New Folder in Windows Explorer

I was working along in Windows 7 x64, when suddenly I discovered that I could not create a folder in Windows Explorer.  The method I usually used (File > New > Folder) no longer existed:  the Folder option was gone from the drop-down menu.

A search suggested that I was not the only one who had experienced this.  It seemed that suggested solutions had not reliably fixed the problem.  One such solution was to download and run a REG file, and then reboot, to correct a problem in the registry.  I was concerned that such files could make a large number of registry changes, though, with unpredictable consequences, and that not all of those changes might be applicable to all versions of Windows 7.  A more conservative option was to add just one line to the registry, in a sub-subkey that might or might not already be present.  Specifically, the Default value of HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New was supposed to be {D969A300-E7FF-11d0-A93B-00A0C90F2719}.  But mine already was.  So the conservative registry edit wasn't the answer.

Someone had said something about creating a new folder by using the right-click context menu in Windows Explorer.  I had rarely if ever used that approach; and now that I tried it, I saw that the only New thing I could create there was a Briefcase, that holdover from ye olde versions of Windows.  I had often used Ctrl+Shft+N to create new folders, but that wasn't working either.  I ran a search to see if there were other ways to create a new folder, at least to buy some time until maybe a solution would occur to me.  One suggestion was to click on the new folder icon on the taskbar.  I didn't have that, I hadn't seen it, and pinning Windows Explorer to the taskbar didn't create it.  I suspected that perhaps the writer meant "command bar" (i.e., near the top of the Windows Explorer window), not the taskbar.  I did still have a New Folder option up there, but it wasn't working.  It seemed that the basic functionality was gone, regardless of where it might have been available previously.

It took me a while to realize that, of course, I could still create folders by opening a command window and using the "md" command.  Example:  md "\Folder name" -- where quotation marks were necessary because the folder's name had a space in it.  The hard way to open a command window in the folder where I wanted to create a subfolder was to go to Start > Run > cmd, and then navigate to the correct place by using commands like C: or D: to change drives, and cd "\Folder name\Subfolder name" to get where I wanted to go.  The easy way to open a command window in any folder was to go into Ultimate Windows Tweaker > Additional Tweaks > Show "Open Command Window Here."

But back to the missing ways of creating a new folder within Windows Explorer.  There were the inevitable suggestions to search for malware; but I wasn't getting any other weirdness, so malware seemed unlikely.  One discussion brought to mind the possibility that a recent program installation was responsible.  I played around with uninstalling and rebooting, but nothing clear emerged.  It seemed that I would have to restore Windows from a previous version, install upgrades and new programs as needed or desired, and see if I could track more closely when (or if) the problem reappeared.  But before doing that, I went ahead and ran the REG file mentioned above, the one that made many registry changes.  But when I did, I got an error:

Registry Editor

Cannot import D:\Current\NewFolderFix.reg:  Not all data was successfully written to the registry.  Some keys are open by the system or other processes.
I closed all windows that were still open, right-clicked on various icons down in the system tray and closed those, and tried again.  Still no luck.  I went to Start > Run > taskmgr.exe > Processes tab, closed down some processes that looked safe, and tried again.  It still wasn't enough.  I rebooted into Safe Mode and tried running the REG file there.  Same error!  I ran a search for the error message, but found no solution in the several pages I examined.  One hypothesis:  the REG file was not suited for this particular machine and/or version of Windows.

Eventually I did figure out what caused the no-new-folders problem.  It was a program called Boot Deleter.  It had a nifty option to associate itself with Windows Explorer, so that I could just right-click on a file that resisted being deleted by other means, and indicate that I wanted that file to be deleted the next time the system rebooted.  But now that I was watching carefully, the ability to create a new folder disappeared as soon as I clicked on the Associate button.  No real surprise that it would be problematic:  the program had not been updated since 2005.  I clicked, now, on the button to kill the association, but that didn't solve the problem:  the ability to create a new folder was not restored, even after a reboot.

Due to an apparent malfunction or misconfiguration, I discovered at this point that System Restore was not keeping current backups.  So now I would apparently have to restore a drive image from more than a month earlier.  Not a terrible thing, but I wondered if there was another way.  I hadn't used Revo Uninstaller, to watch what was being done when Boot Deleter was installed.  Boot Deleter hadn't installed a desktop icon or otherwise been visible, so I couldn't use Revo's Hunter Mode to figure out the problem.  But I could try reinstalling Boot Deleter, with Revo running, and see if it would work now.  I saw, then, that I would need the pro version of Revo for this, and I wasn't ready to spring for that.

Another possibility was to use Process Monitor (PM), which was said to track attempts to modify the registry.  I opened PM, maximized it, spread out its columns so that I could see what was happening, and went up to its toolbar.  I hovered over items to get their tooltips.  At the right end of the toolbar, I turned off a couple of items, so that I was monitoring only file and registry activity.  I went to Boot Deleter and got ready to install it again.  Back at the PM toolbar, I clicked on the Clear button, so that I wouldn't have too long a history to work through.  (I could also have used Ctrl-X to clear.)  Then I went back to Boot Deleter and installed it.  Then, back at PM, I clicked on the Capture button (Ctrl-E).  Then the Filter button (Ctrl-L).  In the Process Monitor Filter dialog, I deselected all of the items listed (e.g., "Process Name is Procmon.exe ... Exclude.").  In the first drop-down box at the top, I selected Process Name.  The second box said "is."  In the third drop-down box, I selected BootDeleter.exe.  The fourth box said "Include."  I clicked Add.  This put my BootDeleter.exe item in the list as the only checked item.  I clicked Apply > OK.  The status bar at the bottom of the PM screen told me that I now had a list of 2,345 events.  I went to File > Save.  "Events displayed using current filter" was already selected.  I changed the format to CSV and specified an output path and CSV filetype > OK.  In Windows Explorer, I double-clicked on that resulting file ("Process Monitor 01.csv"), and manipulated the file in Excel.  Basically, I filtered it for the items that looked like file or registry changes that would need to be reversed.  I wound up with a list of several hundred items.  Clearly, this was not going to be a matter of a few registry keys needing to be undone.  I decided it would be easier to restore the previous image, and catch up to the present that way.

Saturday, May 21, 2011

Windows 7: EUBKMON.SYS Error: Driver Unloaded Without Cancelling Pending Operations

I was using Windows 7 Home Premium.  I tried to reboot into Safe Mode.  I got an error message:

A problem has been detected and Windows has been shut down to prevent damage to your computer.
EUBKMON.SYS
DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
I did a search and got the advice to put the driver (in this case, EUBKMON.SYS) out of action.  The mission was to rename it to be EUBKMON.OLD, so as to keep the file (just in case) but to prevent it from being used.  How to achieve that mission?  The advice in that case involved Windows XP, so they were recommending using the installation CD to get to a recovery prompt and rename it that way.  Another possibility would be to boot Ubuntu or some other Linux variant, or perhaps something like BartPE, and use that to rename EUBKMON.SYS.  Since the machine was willing to boot into Windows 7 Normal Mode, I started with that.  I found EUBKMON.SYS in C:\Windows\System32\drivers.  I was able to rename it in Windows Explorer.  I was not sure whether I would have been able to do so if I had not previously taken ownership of that folder.  While I was there, having just rebooted the computer, I got a dialog:
Windows has recovered from an unexpected shutdown.
Windows can check online for a solution to the problem.
I went with that, but after I clicked on it, it disappeared.  Maybe it found and installed a solution; not sure.  I also went into Control Panel > Windows Updates.  There was only one update, an optional one for Microsoft Security Essentials.  I installed that.  I also ran Glary Registry Repair.  Then I rebooted into Normal Mode, just to see what would happen with EUBKMON.SYS.  After I told Windows to reboot, I noticed that the shutdown screen said "Waiting for EuWatch.  A backup schedule is running!"  That "EuWatch" part got my attention:  it seemed potentially related to EUBKMON.SYS, and the "backup schedule" note reminded me that I had just installed Backup Maker and then had uninstalled it and installed Easeus Todo Backup in its place.  The hard drive was spinning, so I let the thing run; apparently Easeus was in the process of doing a backup before shutdown, for some reason.  A sourceDaddy webpage said that a message like my DRIVER_UNLOADED message (above) could be due to a faulty driver.  While I was waiting, I ran a search for EUBKMON.SYS but got no insight.  The search turned up only eight hits, so it seemed this driver was not a part of Windows 7 itself, adding to the sense that perhaps the problem was caused by one of those two backup programs.  By this time, the computer was prepared to reboot.  It ended up at a black and white screen:
Windows Error Recovery
Windows failed to start.  A recent hardware or software change might be the cause.
It wanted to Launch Startup Repair, so I went with that, but it wanted a Windows installation disc, and I didn't have one.  (I was doing this on an ASUS Eee PC, with Win7 factory-installed.)  The error message status was 0xc000000e and the "Info" statement was, "The boot selection failed because a required device is inaccessible."  I tried Ctrl-Alt-Del > Start Windows Normally.  But that failed.  I was back at Windows Error Recovery, except the top line was now "Windows Boot Manager."  I ran a search and decided to try Safe Mode (hitting Ctrl-Alt-Del to reboot, and then hitting immediately and repeatedly hitting F8).  That didn't work either, but this time it just went back to Windows Error Recovery; no BSOD.  I wondered if the inability to get back into Win7 was due to the renaming of EUBKMON.SYS to be EUBKMON.OLD.  I thought about re-renaming EUBKMON.OLD to be EUBKMON.SYS again; but if I had a bad driver, that wouldn't solve the problem.

I thought maybe I should copy EUBKMON.SYS over from another computer where I had also installed Easeus Todo Backup.  First, though, I thought I'd better just test whether that was the issue.  To do this, I would need a bootable USB drive of some sort.  I have addressed that issue in another post.  Basically, I used XBoot to boot Ubuntu from the USB drive, and then went into C:\Windows\System32\drivers and renamed EUBKMON.OLD back to EUBKMON.SYS.  I shut down Ubuntu, yanked out the USB drive, and tried to boot Windows -- with, of course, the need to adjust the BIOS settings first.  Sure enough, Windows now booted.  The EUBKMON.SYS file was the whole issue.  Instead of replacing it with a working one from the desktop computer, I decided I didn't really like the idea of having my whole system rendered nonworking because one file for one backup utility was not quite right.  There were other backup alternatives. 

So I uninstalled Easeus Todo Backup.  It wouldn't uninstall easily from Programs and Features; I had to hit Ctrl-Alt-Del, go into Task Manager > Processes tab, and kill EuWatch.exe.  But no, that wasn't enough:  I got the same message and had to go back into Task Manager, where a careful look at the Description column showed me that I would also have to kill Agent.exe, TbService.exe, and TrayNotify.exe.  So now I was able to uninstall Easeus Todo Manager.  I tried to send them feedback on why I was doing that, but their feedback agent required email to be set up on this computer, and Windows Live Mail 2011 was taking a long time to start.  Eventually I just scrapped that.  Anyway, with Easeus uninstalled, after a reboot, I took another look at C:\Windows\System32\drivers.  EUBKMON.SYS was still there.  I renamed it to EUBKMON.OLD again and tried rebooting.  The system started.  So without Easeus Todo Backup, EUBKMON.SYS was apparently no longer essential, but the Easeus uninstallation process did not remove EUBKMON.SYS or the other EU*.* files in C:\Windows\System32\drivers (i.e., eubakup.sys, eudisk.sys, eudskacs.sys, and eufs.sys).  Possibly this situation would have been different if I had used Revo Uninstaller.  I wasn't sure if I could safely delete those other files, so I left them.

So now, with all that sorted out, I tried again to boot into Safe Mode.  It worked.  Problem solved.

ASUS Eee PC: Booting from USB: First Cut

I needed a way to boot an ASUS Eee PC with Windows 7 installed.  The mission was to look at, and possibly replace or delete, a certain file in a particular directory on the Eee's drive C.  The Eee didn't have a CD/DVD drive, so it seemed that what I needed was a bootable USB drive with file management capabilities.  I knew the Eee was capable of being booted that way, because I had already successfully booted it with USB drives containing Acronis True Image and GParted.  Unfortunately, I had not succeeded in previous attempts to boot Ubuntu or some other program or operating system, so as to examine files and folders.  This post describes some more attempts along those lines, oriented specifically toward getting various programs to boot an Eee from a USB drive.

Hiren's Boot CD

More than a year earlier, I had made a similar attempt related to Windows XP.  In that attempt and previously, I had become familiar with various bootable USB jump drive packages, including the Universal Boot CD for Windows (UBCD4Win) and BartPE.  It now appeared that Hiren's Boot CD (HBCD) was an especially good option.  I noticed that it included DBAN, GParted, and other tools that I would like to have on a bootable USB thumb drive.  Following the instructions provided by Hiren and Pankaj (as also shown, somewhat confusingly, on a different website I found later), I took these steps:

  1. I plugged in my USB flash drive -- 4GB, though they said 512MB was sufficient.  I suspected that a drive larger than 4GB would fail due to their use of FAT32 formatting.
  2. I downloaded and ran their USB formatting program (changing no settings).  Then I downloaded and ran their grub4dos program as Administrator.  The device I selected was a Disk (not File).  It was a 4GB USB drive, so on my system that was hd3, which they described as "3851M" (i.e., not quite 4,000 megabytes).  I clicked Refresh next to Part List and selected Whole Disk (MBR).  I clicked Install.
  3. I downloaded the Hiren's BootCD zip file.
  4. I unzipped the BootCD zip file and found that it contained an ISO.  I didn't want to burn a CD in order to proceed with the next steps, so I tried using Virtual CDROM to position that ISO as a virtual CDROM drive. Specifically, in VCD, I clicked Mount, navigated to the ISO, selected it, and clicked OK. The mount failed.  I saw that Virtual CloneDrive (VCD) seemed to be more frequently downloaded, so I tried that.  When I started it, it gave me only a few options.  I adjusted those.  Now I had an icon in the system tray.  I right-clicked on that and got an option to mount drive G, which Windows Explorer was now showing as "BD-ROM Drive."  That opened up a dialog.  I navigated to the ISO.  That seemed to work.  The HBCD instructions said to copy everything from the mounted ISO to the USB flash drive, so I did.  There was some flaky behavior here:  at one point I basically had to restart Windows Explorer to see the contents of the mounted ISO again, but in the end I was able to copy those contents to the jump drive.
With those steps done, I plugged the USB drive into the Eee and rebooted.  I had to hit F2 repeatedly when it first started booting, because I had learned it did not remember boot settings.  I set the USB drive as the first drive to boot.  The USB stick did not boot.  The relevant error message seemed to be, "Cannot find GRLDR."  In other words, the grub4dos step seemed to have failed.  I looked at the directions and tried again.  This time, I skipped the formatting step -- the drive was already formatted -- and went directly to the grub4dos step presented on the alternate HBCD webpage that I had more recently discovered.  But everything seemed the same.  I tried booting the Eee again with the USB stick.  Same result.  I looked at the HBCD FAQs page.  It said this:
If you are getting GRLDR error, or if usb booting is halting with a blinking dos window, or if you are facing with smilar situations, try using syslinux to boot grub4dos. To do that, download syslinux.zip (145 KB), extract its contents, run ‘RunMe.bat’ inside of the extracted folder and follow its steps.
Oy.  But, OK, I downloaded and unzipped syslinux.zip and clicked on its RunMe.bat file.  It did copy files to the USB drive, as promised.  Now what?  I tried booting the Eee with the USB stick again.  That definitely worked.  I was now looking at a GRUB4DOS menu that listed a half-dozen programs.  Unfortunately, none of them was HBCD.  I tried a Google search for info on the HBCD "cannot find GRLDR" error.  Got a couple dozen hits, mostly in Vietnamese.  Bizarre.  I didn't like Bing, but an equivalent Bing search didn't have that problem.  Regardless, I didn't see a solution.  Back at one of the HBCD instructions pages, I noticed that they said I should have run grub4dos as Administrator.  I hadn't done that.  I was already logged in as Administrator, but maybe that wasn't sufficient.  I right-clicked on grubinst_gui.exe and clicked Run as Administrator.  That brought up the same Grub4Dos Installer dialog as before.

I went through the steps again.  In the process of abandoning the one HBCD instruction page for the other, I had also overlooked another step:  "Copy grldr and menu.lst (from HBCD folder) [actually found in the grub4dos\grub folder] to the usb drive."  I did that now.  The menu.lst (that's MENU.LST, with an L, not MENU.1ST, with a one) file overwrote the one that syslinux had placed on the USB drive.  I wasn't sure how this was going to work:  I hadn't removed syslinux from the USB drive.  But I gave it a try.  This time, I got a somewhat longer Grub4DOS menu.  Unfortunately, I didn't see most of the tools that had interested me originally; and after a moment, the computer went ahead and tried to load Windows 7, even though I had not to my knowledge issued any command of that sort.  I rebooted.  It seemed I must have left the cursor sitting on the option for "Custom Menu ... (Use HBCDCustomizer to add your files)," because that one was ready to boot automatically in just a few seconds.  Hitting Enter on that item opened a longer list.

What I wanted, in the particular situation, was something like Ubuntu, with which I could use a GUI to change files in a particular folder on the Windows 7 programs drive C.  I decided to try Eeebuntu 3.0.1 Netbook Remix.  It gave me an error message, and within 10 seconds I was back at the Grub4DOS menu.  I tried Ubuntu 10.04 Netbook Remix.  I tried Ubuntu 10.04 (GNOME Desktop x86).  All of these were giving me "Error 15:  File not found."  They seemed to be trying to load an Ubuntu (or whatever) ISO.  Was I supposed to have that on a separate USB drive, also plugged into the netbook?  I tried Eeebuntu again.  It seemed to be looking for eeebuntu-3.0.1-nbr.iso.  A search led to Aurora and Wikipedia webpages indicating that Eeebuntu 3 was based on Ubuntu 9.04, which at this point was two years old and outdated in a number of ways.  I wasn't that much more excited about the HBCD option to load Ubuntu 10.04, also a year old.

I had been thinking, or hoping, that HBCD would somehow miraculously combine all those dozens of CDs on one USB stick, but now that was just not materializing.  If I was going to be using HBCD just to boot Ubuntu, why not have the latest Ubuntu on a stick?  Make it simpler and more up-to-date.  I went to the Ubuntu download webpage and noticed that they were providing instructions that simply involved the Universal USB Installer and a downloaded Ubuntu ISO.  I ran my copy of Universal USB Installer and saw that it was willing to install Ubuntu 11.04 on a stick.  I was about to proceed with that, but then I wondered whether some other Linux distribution would be better for the Eee.  A search led to one webpage in which some people said that plain old Ubuntu was fine.  Another webpage suggested Leeenux.  I was familiar with Ubuntu, so I decided to try that (again).

When I had pretty much settled on the approach of using Universal USB Installer to download and install the ISO on my USB drive, it occurred to me that the advantage of HBCD was that I could have a bunch of ISOs on a companion USB drive, and could boot them all with the HBCD USB drive.  In this concept, I couldn't do it all with one drive, but I could do it with two, especially now that USB drive capacities were increasing:  my second USB drive could hold a dozen ISOs.  I revisited the option, presented in HBCD, of using HBCD Customizer (above).  I was thinking this might be a way to run Ubuntu 11.04 among others.  Thing is, I couldn't find it.  I didn't want to download it from just any random webpage -- it could be virus-ridden -- but it seemed like WOT-banned sites were featuring it.

XBoot

Another search led to some indications that the UBCD4Win was also customizable, so I turned to that possibility.  This search seemed more promising.  On closer examination, though, it appeared that creating this device required a Windows XP CD.  I had one, but others might not.  That requirement would also presumably have prevented me from using it to install Ubuntu.  So I turned to its cousin, UBCD (not for Windows).  A search led ultimately to Pendrivelinux.com, where I discovered XBoot, which was yet another possibility (along with YUMI and the Linux-based MultiSystem. The XBoot instructions required me to download the latest XBoot as well as the other ISOs that I would want to use.  I decided to start with ISOs for GPartedUbuntu 11.04 (which, as I recalled, would not automatically contain GParted), Darik's Boot & Nuke (patched for XBoot), and Acronis True Image Home.  I had purchased a copy of Acronis, and would have been glad to recommend a freeware alternative, but I wasn't immediately finding one with an ISO.  There would probably be other ISOs I would want to add later, but this would do for now.  I wasn't as interested in some of the programs that were supposedly included in Hiren's Boot CD, for instance, because I was keeping a copy of my customized Start Menu (containing portable applications) on a separate USB drive, and many of the programs included in Hiren's were already on that Start Menu.  Many of those programs required an operating system (especially Windows) to be booted already, so I wasn't sure how or why I would be using them on a multiboot USB drive, though of course it could be handy to have everything on one large USB drive.

So anyway, I downloaded, unzipped, and ran XBoot.  It was a portable, which was nice.  I had created a folder for the four ISOs mentioned in the previous paragraph (i.e., GParted, Ubuntu, DBAN, and Acronis), so now I just dragged those ISOs over and dropped them on the XBoot program.  The instructions seemed to say I was supposed to do something with the QEMU and Edit MultiBoot USB tabs, but I couldn't quite figure it out.  I decided to start simply, by clicking the Create USB button on the first (Create Multiboot USB/ISO) tab.  This brought up a dialog giving me the options of using Syslinux or Grub4dos as my bootloader.  They recommended Syslinux, so I went with that.  The dialog automatically identified my USB drive.  XBoot then seemed to be copying my ISOs to the USB drive.  When it was done, it said, "USB created successfully!!  Check by running it on QEMU?"  I wasn't sure if that meant it was going to reboot the system into the QEMU operating system.  I wasn't in the mood to have my desktop system rebooted right then, so I said no.  Then I looked and saw that QEMU was just an emulator, so I probably could have tested it safely.  It wasn't too late:  the QEMU tab within XBoot allowed me (after a Refresh) to run the USB drive and, by golly, it seemed to work.

I plugged the USB drive into the Eee and rebooted it.  As in QEMU, it gave me the option to go into Utility, Linux, or Help.  The Utility submenu had Acronis, GParted, and DBAN.  I went into Linux in the main menu.  Ubuntu was the only option there.  I chose that option.  It ran.  I was able to access folders and go online in Firefox in Ubuntu.  Later, I discovered that, unlike the three other ISOs,  Acronis did not boot.  Acronis could be made bootable on a USB drive by installing the Acronis software and using its Bootable Rescue Media Builder.  I had already done that with another USB drive.  What I needed now was apparently not an ISO of the Acronis CD, but rather an ISO of that USB drive.  I used ImgBurn to create that.  Then I went back into XBoot.  There didn't seem to be an alternative to redoing the whole bootable USB creation process, so I did that.  This time, when the process finished, I tested all of the USB drive boot options in QEMU.  I saw that it had not deleted the previous options; I now had two Acronis entries.  One hung the system; the other successfully started Acronis.  I wanted to edit this menu, so I went to XBoot's Edit MultiBoot USB tab.  When I clicked the "Edit Syslinux menu file" button, I got an error:  "No application is associated with the specified file for this operation."  When I clicked Edit Grub4dos Menu File, it asked what program I wanted to use to edit it.  I tried Notepad.  That worked.  It opened menu.lst, which turned out to be in the root (top level) of the USB drive.  Menu.lst told me that the menu for the Utility section was on the USB drive too, in /boot/grub4dos/utility.lst.  My editing efforts were not too successful, so ultimately I just wiped the drive and started over.  I was not able to get Acronis to work, and in a subsequent retry the Ubuntu also stopped working.  I reformatted the USB drive (not Quick Format) and then redid the XBoot process without Acronis, and now the Ubuntu was failing to load.  I tried that twice.

Assuming I could get Ubuntu working again on the USB drive, the solution, so far, was to use XBoot, a Windows program, to load several program ISOs on a single USB drive.  The Eee would boot from this USB drive and would give me a menu allowing me to choose among those programs.  There seemed to be no practical limit on the number of ISOs that could be loaded this way.  The USB drive seemed to be capable of running just one ISO at a time, and Ubuntu loaded from the USB drive did not seem able to see the contents of the USB drive itself, so it did not appear that stray utilities added to the USB drive would be available to operating systems (e.g., Ubuntu) booted from the USB drive.

Grub4DOS

I wanted to try again to get a multiboot USB drive that would work with Acronis as well as with Ubuntu, DBAN, and GParted.  I found detailed instructions on using Grub4DOS in a way that seemed to meet this need.  The steps were as follows:
  1. Download and unzip the needed files.  These were Grub4DOS 0.4.4 (2009-06-20) and the Grub4DOS installer (grubinst-1.1-bin-w32-2008-01-01.zip).
  2. In the Grub4DOS-Installer folder, right-click and run grubinst_gui.exe as Administrator.  (This was familiar from the steps described above.)  Select Disk, click its adjacent Refresh button, and select the drive on which you want to install Grub4DOS.  The size of the drive was a clue.  In my case, I was installing to a 4GB flash drive, so I selected the one that was 3812MB in size.
  3. Still in the Grub4DOS installer, click the Part List Refresh button.  This time, I got an error:  "Invalid partition table, if you still want to install, use the --skip-mbr-test."  This was presumably why Ubuntu had failed to boot on the last couple of tries with XBoot (above).  But I had already reformatted it!  Some advised using the HP USB Disk Storage Format Tool (HPUSBDisk.exe).  I closed down the Grub4DOS Installer and tried that.  I set it to do a quick format and not to create a DOS startup disk.  That did the trick; I was now able to go back in and select "Whole Disk" next to the Part List, as advised back in the Grub4DOS instructions.
  4. Unlike the situation above, the instructions this time advised checking the "Don't search floppy" box (but nothing else) and then clicking Install.  That succeeded.  I closed the Grub4DOS Installer.
  5. From the unzipped Grub4DOS download folder, I copied grldr to the USB drive.
  6. Skipping to section 3 of the instructions (since I wanted multiple ISOs on the USB drive), I ran Acronis True Image Home on the desktop computer, where I had installed it.  I went to the Main Screen > Create bootable media.  When I got to the Bootable Media Type Selection section, I chose ISO Image.  I saved it to the same folder on the hard drive where I had my GParted and other ISOs.
  7. I created menu.lst in that ISOs folder, so I'd have it in case I wanted to create another USB drive or retry with this one.  To create menu.lst, I started by copying and pasting this text into Notepad:
    timeout 10
    default 0

    title Acronis True Image Home 2011
    map --mem (hd0,0)/AcronisTrueImageHome2011.iso (hd32)
    map --hook
    chainloader (hd32)
    boot

    title CommandLine
    commandline

    title Reboot
    reboot

    title Halt
    halt
    The parts that could be edited were the title (Acronis True Image Home 2011), which could be anything I wanted, and the ISO's filename (AcronisTrueImageHome2011.iso), which had to match what I had actually called the ISO.  (Spaces in the ISO's filename would apparently have been a bad idea.)  I didn't change the (hd32) part of the "map" line.  The "--mem" part of the first "map" line was optional.  It apparently made the ISO load into RAM.  With 2GB of RAM on my Eee, I felt that I could do this with all of my ISOs.  If that had failed, I could have removed "--mem" from that line.
  8. I copied the finished menu.lst over to the root of the jump drive. So now the USB drive contained two files:  grldr and menu.lst.
  9. I copied the Acronis ISO over to the USB drive, so that menu.lst would be able to find it.  The instructions said I could have put it into a folder of its own, as long as the map command in menu.lst could find it (by referring to e.g., /subfolder/AcronisTrueImageHome2011.iso).
  10. While I was at it, I copied the other ISOs (GParted, Ubuntu, DBAN) as well.  I used the patched DBAN ISO mentioned above.
  11. I edited menu.lst so that it would include references to all four ISOs.  As just shown, it already had five lines referring to the Acronis ISO, beginning with "title."  So I copied, pasted, and edited those five lines for each of the other ISOs I wanted to boot.  Here, again, I was allowed to change only the title itself (e.g., changing "Acronis True Image Home 2011" in the copied "title" line to GParted, DBAN, or Ubuntu) and the name of the related ISO on the first "map" line.
  12. I changed the timeout from 10 to 20 seconds.
  13. Again, I made these changes to the copy of menu.lst that I had created in the ISOs folder on the hard drive, so that I would have a copy of it, and then copied it over to the jump drive.
I tried booting the resulting USB drive in the Eee.  It came up with a genuine menu.  First time around, it tried to boot Ubuntu automatically after 20 seconds' delay (that being the first item on my menu.lst), and failed.  Second time, I didn't let that happen; I arrowed down to Acronis (next item) and tried that.  That worked.  When I exited Acronis, it rebooted, and this time I tried DBAN.  That worked too.  Another reboot, another program:  GParted did not work.  It gave me a screenful of information, including this:
BOOT FAILED!
This Debian Live image failed to boot.
Please file a bug against the 'live-boot' package or email the Debian Live mailing list at debian-life@lists.debian.org, making sure to note the exact version, name and distribution of the image you were attempting to boot. . . .
Unable to find a medium containing a live file system.
BusyBox v.1.18.4 (Debian 1:1.18.4-1) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
(initramfs)
It seemed that the Ubuntu/Debian live images (Ubuntu 11.04 and GParted) were not working with Grub4DOS.  A search suggested that others were having this problem too.  One post suggested that changes involving "kernel" and "initrd" might help, but I was not sure how to configure them.  I wondered if the --mem option was screwing up the Linux items, so I edited menu.lst to remove that option from those items.  For GParted, that worked, to the point of giving me the initial menu, but then it led back to the BOOT FAILED! screen (above).  For Ubuntu, I wound up back at the same message as I had gotten first time -- similar to the one just quoted, but much briefer.  It said something about BusyBox but then said, "(initramfs) Unable to find a medium containing a live file system."

Grub4DOS:  Ubuntu

I was perhaps experiencing the problem that "Some linux distributions just refuse to boot from an ISO file on a USB drive."  Of course, Ubuntu could be booted from a USB stick; it was the ISO part that was causing the problem.  This was apparently "experimental."  It seemed that the "kernel" and "initrd" commands could be copied literally, at least for Ubuntu 10.10; I wasn't finding much advice for 11.04.  The approach shown in a couple of websites was like this:
title Ubuntu 10.10
find --set-root ubuntu-10.10-desktop-i386.iso
map ubuntu-10.10-desktop-i386.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=ubuntu-10.10-desktop-i386.iso splash
initrd /casper/initrd.lz
I adjusted menu.lst to replace the previous Ubuntu entry with these lines, copied the Ubuntu 10.10 ISO to the USB drive, and tried that.  (Note:  the line beginning with kernel is long; it wraps.  The next line after "kernel ..." is "initrd ...")  This gave me "Error 60:  File for drive emulation must be in one contiguous disk area."  A search led to the advice to use either Contig or WinContig to defragment the ISO on the USB drive -- to defragment a single file, that is, not necessarily the whole drive.  I was curious whether this kind of separate tool was necessary.  In Windows Explorer, I right-clicked > Properties > Tools tab > Defragmentation.  I selected the USB drive and clicked "Defragment disk."  In seconds, it said, "0% fragmented."  I tried booting again.  Now it said "Error 15: File not found" for the Ubuntu 10.10 ISO.  I couldn't figure this out:  the file was right there.  I re-copied the ISO over from the hard drive to the USB drive and, this time, I defragmented it with WinContig.  It offered to run on the whole USB drive after all, so I went ahead with that.  Basically, I was wondering if there was some kind of magic about the WinContig way of defragmenting.  It took much longer than the Windows defragmenter had taken -- a couple of minutes, altogether, just for that little USB drive.  Eventually I realized that it was hung.  I tried to use Task Manager (Ctrl-Alt-Del) to kill it, but that didn't work.  I rebooted the system.

I tried booting the Eee again with the USB stick.  This time, I got "Error 27: Unrecognized command."  I thought that maybe the Ubuntu ISO could not be in the root folder, so I put it into a subfolder called ISOs, and modified the three references to it (in the menu.lst lines quoted above) accordingly.  (The final menu.lst is shown below.)  Since things were not going well, I went back and re-did the 13 steps listed above.  This time around, they were like this:
  1. Run the HP USB Disk Storage Format Tool on the USB drive.
  2. Run grubinst_gui.exe as Administrator.
  3. Copy grldr from the unzipped Grub4DOS download folder to the "MultiBoot" folder on the hard drive where I was saving everything that I would be copying to the USB drive.  That folder now contained grldr and menu.lst in its top level, and the ISOs in its "ISOs" folder.
  4. Copy the contents of the MultiBoot folder to the USB drive.
This time, we were back to the good old days, when the Ubuntu ISO would actually get as far as loading its splash screen and seeming like it was going to start.  Evidently it helped to start over and/or to put the ISO in a subfolder.  (I wondered whether properly ejecting the USB drive from the desktop, rather than just yanking it out, made a difference too.)  And then, woo hoo, we had liftoff!  Ubuntu was operational.  I fiddled with it for a minute.  Nautilus worked; Firefox worked.  Fantastic.  I quit Ubuntu and tried the other ISOs on the menu.  GParted, splash screen ... BOOT FAILED.  Rats.  Acronis:  Orbit!  Finally, DBAN:  no problem.

Grub4DOS:  GParted and Parted Magic

So how to make GParted work?  A search led eventually to some suggestions that Parted Magic (which evidently contained GParted among other things) or RIPLinuX (which evidently contained Parted Magic plus) might be the superior tool and easier to put on USB.  I was willing to use any of the above, as long as I could figure out how to put it on a multiboot USB -- preferably, at this point, using Grub4DOS.  I looked into Parted Magic, reasoning that, again, I probably wouldn't need all the stuff on RIPLinuX, and it might load slower.  The contemporary way to put Parted Magic on a USB stick by itself was to use Unetbootin.  But how to put it on a multiboot USB?  One webpage claimed that I could download and unzip a USB version, install its contents to the root of the USB drive, and it would run with a modification of menu.lst.  Sadly, that version was no longer available at the cited SourceForge link.  That webpage made similar claims for Memtest86+, BartPE, and UBCD, and I was tempted to experiment with those as well.  I found other webpages providing seemingly easy instructions for adding Hiren's BootCD and Memtest86+ as well.  Most tempting was the option of adding a Windows 7 Recovery CD.  I decided to return to these possibilities later, time permitting.

But continuing with the Parted Magic investigation, I began to find that I probably should have called the subfolder "images" rather than "ISOs" -- referring, there, to the folder on the USB drive where I had put the ISO downloads.  So I made that change in menu.lst and in the folder structure now.  Then I found a thread that seemed to offer a way to make Parted Magic 5.10 work with Grub4DOS.  I downloaded the ISO of that fairly recent version and put it into the images folder on the desktop computer.  I replaced the GParted lines of menu.lst; and when the Parted Magic 5.10 ISO was finished downloading, I opened it with 7zip, extracted the pmagic folder, and put that into the images folder as well -- because that's what they did in that thread, for what reason I had no idea.  I copied the revised contents of the MultiBoot folder on the hard drive to the USB drive and tried booting the Eee with it.  The Ubuntu ran (again); the Parted Magic ran too, though for a minute there I thought it was hung.  Apparently it was taking it a while to load itself into memory.  It really had a lot of tools in it -- not only GParted but also Ghost for Linux, Partition Image, etc.  I didn't think I would be needing much else in the near future.  This success with Parted Magic version 5.10 made it unnecessary for me to look further into other posts relating to versions 5.9, 5.8, 5.75.65.5, 5.5, 4.5, or 4.3.  Acronis still ran, and DBAN still ran.  I was nearly home.

Grub4DOS:  Windows 7 Recovery CD

That discovery (above) of the possibility of adding a Windows 7 Recovery CD to my multiboot USB stick was just too good to pass up.  The instructions said that I would need to start by downloading Microsoft's Windows 7 System Recovery Disc.  This gave me a small torrent link called "Windows 7 32-bit Repair Disc.torrent."  I had already installed uTorrentPortable, so I used that to run that link and download the 143MB recovery disc.  When that was downloaded, I had an ISO that, once again, I could mount as a virtual CD using Virtual Clone Drive.  I downloaded and ran WinSetupFromUSB.  It looked like this might be destructive of my hard-won success on the USB drive, so I did this with another, blank USB drive.

In WinSetupFromUSB, I clicked Refresh to see the correct USB drive.  I clicked the Bootice button.  A dialog popped up.  I selected Process MBR and then Grub4DOS and clicked Install/Config.  I checked "Don't search floppy for GRLDR" but otherwise left everything else as it was, and clicked "Save to disk."  That seemed to be the end of Bootice, so I backed out of there; but then the Bootice dialog returned.  I killed it again, and this time it stayed dead.  Back in the main WinSetupFromUSB dialog, I realized I was suffering from a dearth of guidance.  The webpage I had been loosely following really wasn't cutting it.  Back to the previous one.  It seemed I should have formatted the USB drive while I was in Bootice, so I did that now:  USB-HDD, single partition, FAT32.  Now redo the Process MBR - Grub4DOS step just mentioned.   Now, back in the WinSetupFromUSB dialog again, I clicked the Vista / Win7 option, navigated to the virtual CD drive, and clicked GO.  A minute later, it was done.  I clicked Test in QEMU > GO.  It said, "Windows is loading files ..."  That took a while.  Then QEMU produced a BSOD.  This, I decided, was a project for another day.  A worthy one, if it worked, but a whole new undertaking, by the time I got all these other tools (Parted Magic, Acronis, DBAN, Ubuntu) working on that other USB drive.

Summary

It seemed that WinSetupFromUSB might be a good place to start, for someone who was beginning a voyage of discovery, on the way to creating a multiboot USB drive, and had some time to spare.  WinSetupFromUSB allowed the same Grub4DOS tool that I had found useful in the approach I took.  My approach is summarized in the four steps enumerated above:  run the HP USB Disk Storage Format Tool on the USB drive; run grubinst_gui.exe as Administrator; copy grldr from the unzipped Grub4DOS download folder to the "MultiBoot" folder on the hard drive where I was saving everything that I would be copying to the USB drive; download the relevant ISOs to the "images" subfolder in that MultiBoot folder; and then copy the contents of the MultiBoot folder to the USB drive.  Those contents included the menu.lst file, which in the end looked like this:
timeout 20
default 0

title Ubuntu 10.10
find --set-root /images/ubuntu-10.10-desktop-i386.iso
map /images/ubuntu-10.10-desktop-i386.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/images/ubuntu-10.10-desktop-i386.iso splash
initrd /casper/initrd.lz

title Parted Magic 5.10
root (hd0,0)
map --heads=0 --sectors-per-track=0 (hd0,0)/images/pmagic-5.10.iso (0xff) || map --heads=0 --sectors-per-track=0 --mem (hd0,0)/images/pmagic-5.10.iso (0xff)
map --hook
chainloader (0xff)

title Acronis True Image Home 2011
map --mem (hd0,0)/images/AcronisTrueImageHome2011.iso (hd32)
map --hook
chainloader (hd32)
boot

title Darik's Boot and Nuke
map --mem (hd0,0)/images/dban-2.2.6_i586-fixed.iso (hd32)
map --hook
chainloader (hd32)
boot

title CommandLine
commandline

title Reboot
reboot

title Halt
halt

Thursday, January 13, 2011

Windows 7: Native Virtual Hard Disk (VHD) Boot

I was interested in making Windows 7 Ultimate run faster.  One possibility that came to my attention was using native virtual hard disk (VHD) boot in connection with RAID0.  This post discusses that.

A virtual hard disk was just a hard disk in virtual form.  Normally hard disks were physical.  A virtual hard disk, like a virtual machine (VM), would exist as a file (or a set of files) on a physical hard drive, not as a physical device in itself.  In other words, the user would have a physical hard drive in his/her computer, and somewhere on that drive s/he would have a VHD.

The "native" part of "native VHD boot" meant that the user would have direct access to the VHD.  Ordinary VM software (e.g., VMware, VirtualBox, Virtual PC) would require the user to install an operating system (e.g., Windows 7, Ubuntu) to serve as host (also called "parent").  Then the user would have to install the VM software (e.g., VMware) to manage the guest, and then install another operating system (e.g., Windows XP) inside the VM software as guest.

The VHD concept seemed to be that the host layer would be removed from the equation.  There would be a virtual hard drive that could be loaded or unloaded, perhaps without rebooting the computer.  The computer would be running the "guest" machine (e.g., a Windows XP installation) in virtual form.  For example, a packaged Windows XP installation could run on computer A, or on computer B, without having to be reinstalled and without having to install a host and a VM program like VMware.  In addition to simplicity, this scheme would presumably have the advantage of improving performance by removing extra layers and tasks.

In Windows 7, native VHD boot was apparently available only in the Ultimate and Enterprise versions.  This meant that it could be out of the reach of ordinary users who were not inclined to spring for such expensive software, unless perhaps they had access to it through their jobs or through academic versions.  It did not appear that Ubuntu, for one, would be developing a comparable capability in the near future.  There were hypervisors like VMware's ESXi that apparently provided somewhat similar bare-metal functionality, but ESXi seemed unavailable for my purposes.

I was interested in the possibility of using native VHD boot with RAID0.  This interest arose from a desire to make Windows 7 and other operating systems run quickly.  New installations of operating systems would typically perform well, I found, but then time and the addition of more programs and other demands would slow them down.  So, for example, I had found that Windows XP running as a VM inside VMware Workstation on an Ubuntu host was much more stable than native WinXP, but its performance had slowed dramatically.  My attempts to fix it (even through reinstalling both Ubuntu and VMware) had failed.  After several years of experimentation, I had therefore recently given up on Ubuntu for my purposes.

VHD seemed to offer a good way to run Windows 7 in a RAID array.  I had found that Win7 did not, itself, support booting from the software RAID0 arrays that Win7 was capable of creating.  In other words, a Win7 user could use Win7 to create RAID0 arrays, and could speed things up somewhat by putting some programs and data files on such arrays; but the user could not boot Win7 from a Win7 software RAID0 array, and would therefore have to install and run some Win7 program files from a basic hard drive.

As an alternative, the user could create a RAID array using hardware, either on the motherboard or on a third-party controller.  Hardware RAID had potential advantages of performance, bootability, level support (i.e., the ability to choose versions other than RAID0 and RAID1, including some I had not previously heard of), multiple operating system access (i.e., the data would remain available regardless of how the machine is booted), and reliability.  The performance story was a bit controversial.  I had seen indications that motherboard RAID was no faster than software RAID, and I had heard some claim that RAID0 was no faster than non-RAID, but my own experience (in Ubuntu) was consistent with tests indicating that even a software RAID0 was markedly faster than non-RAID.  Cost was a consideration.  While RAID5 was perhaps ideal, a Newegg search for a SATA RAID5-capable controller would cost hundreds of dollars.  Removing the RAID5 constraint led me to a $30 Rosewill item.  I didn't need that myself; I had motherboard RAID 0, 1, and 10.  For reasons of cost, noise, and heat, I wasn't going to be installing four drives to have RAID 10 (a/k/a RAID 1+0, which Wikipedia (apparently backwardly) called a stripe of mirrors, as distinguished from RAID 0+1, a mirror of stripes).  So for my purposes, it was a choice between hardware RAID0 or software RAID0; and since I was now using Win7 rather than Ubuntu, the desire to boot in RAID0 meant I would be using motherboard RAID -- unless VHD gave me a good alternative.

At this point, I had a general sense of what VHD sounded like.  Among other things, it sounded great.  But it seemed that I wouldn't run into the actual drawbacks and impossibilities until I created my own VHD and tried to use it.  As described in another post, the first step in doing so was just to create and play around a bit with a VHD, within a regular, running Win7 system.

Windows 7: Introduction to Virtual Hard Disks (VHDs)

As described in another post in this blog, I was trying to figure out the best way to install Windows 7 Ultimate.  I had discovered native virtual hard disk (VHD) booting.  It sounded like I could use a native VHD to boot Win7.  I wasn't sure precisely how that worked, so I decided to give it a whirl.  This post describes that process.

I started with Win7 already installed and booted from a basic hard drive.  I had a two-drive software RAID0 array created by Win7.  Actually, it was a set of several RAID0 arrays, of which one was left empty and unformatted.  This, I hoped, would be the virtual partition on which I would install a bootable version of Windows 7.  I had not been successful in doing so natively (i.e., directly, without intermediary software).  I hoped to do so with a native VHD -- that is, a virtual drive that would create a Win7-boot-friendly world within the Win7 RAID0 partition.

The first step was to run Disk Management (Start > type "diskmgmt.msc").  (There were also command-line options.)  I could see my eagerly waiting empty RAID0 partition.  On the menu, I went into Action > Create VHD > Browse.  To my surprise, Disk Management seemed willing to create the VHD just anywhere.  It made sense -- the VHD was going to be contained in a single file that would function like other files -- but I had expected something like a partitioning program here.

I designated a location and filename:  D:\Current\Win7VHD.vhd.  Having heard nasty things about the dynamically expanding option, I went with the fixed size default setting.  Since I had the general idea that I was going to be installing Win7 inside this file, it seemed this file would have to be monstrously large, raising a question of backup:  would a single change anywhere in this file require another mega-backup?  A search led to a thread advising an allocation of 60GB to 100GB for a Win7 partition.  Informed posts in another thread echoed that; likewise a third.  I could spare 100GB on my existing setup without moving partitions, so I set it at 90GB (i.e., 92160MB) just in case there was some funky slippage that nobody was telling me about.  Win7 informed me that it was installing VHD device driver software.

I checked D:\Current.  There it sat, Win7VHD.vhd, size = 94,371,841KB = 92160MB.  Now what?  Apparently one option was to just treat this VHD like a data drive.  In Disk Management, I went into the Action menu pick, with the idea of clicking on the Attach VHD option.  But it was grayed out.  Apparently I was missing something there.  I figured the myster would be resolved eventually.  And then, right before my very eyes, Disk Management changed.  Now it was displaying a new, 90GB unallocated space that it described as Disk 3, Unknown, Not Initialized.  The minutes that had passed since I created the 90GB VHD file were apparently spent actually creating that file in D:\Current.  Evidently this was like the file copying process in Windows Explorer, where sometimes it would say that it had actually gone ahead and copied your 15GB video file to another drive, but what it actually meant was that it was just starting that process, and the new copy would not really exist for a while yet.

Alright.  So now I selected Disk 3, my VHD thing, and went into Action.  Now Attach VHD was not greyed -- it was ready to go.  I clicked on it, to see what would happen next.  Apparently selecting Disk 3 hadn't accomplished anything:  Attach VHD just opened up a dialog asking me where was the file that I wanted to attach.  That made sense -- but then why did Disk Management already show this 90GB unallocated partition?  It seemed like it would have been more logical to show it once I had designated the file that I wanted to attach.  Anyway, I browsed to and selected D:\Current\Win7VHD.vhd and clicked Open > OK.  This gave me an error message:  "The virtual disk is already attached."  So maybe I was right the first time:  as soon as I created the 90GB VHD file, Win7 set aside a logical partition for it, which I was seeing as Disk 3 in Disk Management.  Evidently the Attach VHD option had no real meaning for my present purposes; evidently it had been grayed out because Win7 was then in the VHD-creation process.

So did this mean that Windows Explorer would now display a 90GB unallocated disk?  No.  Well, alright then, could I right-click on the Unallocated area of Disk 3 and format it or something?  No, all options were grayed out except Properties.  Beggars can't be choosers:  I went into that.  There wasn't really anything to adjust there, unless I wanted to turn off write-caching.  Ah, but I could right-click on the left end of the Disk 3 bar, there in Disk Management, and there I did find options:  Initialize Disk, Offline, Detach VHD, Properties, or Help.  It looked all set to let me go ahead and initialize that disk.  So then apparently I would have a 90GB drive, identified with some Windows drive letter -- Q, maybe -- and this drive Q would exist within a 90GB file located in D:\Current.  Kind of an interesting idea.  Probably I could detach it, then, and move it around to some other folder, or maybe even move it without remembering to detach it and thereby crash the system and lose the file and everything in it.  But no, I had faith in Microsoft -- surely they had already anticipated that and would have various protections in place.

It then occurred to me that I had made the drive 90GB because I had an unused 100GB space on my hard drive.  But I was thinking wrong.  The VHD hadn't been created in that unused space.  It had been created in drive D.  I checked the properties for that drive in Windows Explorer.  Sure enough, drive D was a lot more full than it had been 15 minutes ago.  Wherever I was going to be creating VHDs, I needed to make sure I had enough space to play with.  Preferably I would have a space set aside for them, so that I would create and keep them in one place, instead of having to move these gigantic 100GB lumps around all the time, from one drive to another.  I guessed that they could be stored in much smaller spaces on a compressed backup drive, but that trying to run a VHD from a compressed drive would be an extremely slow affair, if such a thing was even possible.

Finally, detaching the VHD gave me the scary option of deleting the disk file.  I was surprised Microsoft put that there.  Oops, my mistake:  there goes 100GB of data.  In this case, I went ahead with it, since I had nothing in the VHD; and for that purpose it was convenient.

So we had the concept of a VHD.  Now, what if I wanted to use a VHD, not just as a storage unit, but as the home of my Windows 7 program files?  In other words, I wanted to boot the system from a VHD.  But how?  That is the topic of a separate post.

Saturday, October 2, 2010

Ubuntu 10.04 and Windows XP Dual-Boot: GRUB2 Woes

I was installing Windows XP SP3 and Ubuntu.  I encountered some error messages early in the process.  This post describes the steps I took in an attempt to resolve those problems.

First, I got this error:
Setup did not find any hard disk drives installed in your computer.
In my search for a solution, I found a thread offering a number of suggestions.  The one that worked for me was to go into the BIOS (hit Del at startup) and make sure the SATA controller was set to ATA, not AHCI.  Mine had started out as ATA, but a notice had popped up when I was first booting it, offering to change it to the AHCI, and I had accepted.  After I fixed this, the next bootup problem was this message:
Windows could not start because the following file is missing or corrupt:
\system32\hal.dll
Please re-install a copy of the above file.
My search on that led to a page offering a number of suggestions.  I started with just rebooting.  That didn't fix it.  suggesting that I go into the BIOS and switch the order in which the BIOS would try to boot my hard drives.  This led to a new message:
error: no such device: [UUID number]
grub rescue>
This apparently happened because I had previously installed Ubuntu on that hard drive.  For this one, I took the advice to boot from the WinXP installation CD, choose R to repair an existing installation, choose the existing installation (no administrator password), and type this sequence of commands:
D:\WINDOWS> C:
C:\> CD \
C:\> FIXBOOT C:
C:\> FIXMBR
C:\> BOOTCFG /rebuild
The last one led to an offer to add D:\WINDOWS to the boot list.  I took that offer.  But then it asked "Enter Load Identifier" and "Enter OS Load Options."  I didn't know what to add, so I just hit Enter for each.  This led to a new error message:
Error: Failed to add the selected boot entry to the boot list.
I guessed that the system was seeing the Windows installation on drive D because I had reversed the boot order in the BIOS.  I did think I had cabled them correctly, with the Windows drive going to SATA0 (i.e., the first SATA connector) on the motherboard.  I looked into Load Identifier and found a Microsoft page with information on that and other parts of this situation.  It told me to type the name of my operating system:  Microsoft Windows XP Professional, though apparently anything would do.  For OS Load Options, it said, type /fastdetect.  Unfortunately, this was not satisfactory.  I got the "failed" error again.

The responses to this seemed to lean in the direction of editing the boot.ini file.  A thread on that gave me the idea of just copying my boot.ini file from another computer.  A Microsoft page gave information on editing it if I was already in WinXP, which I wasn't.  A webpage devoted to boot.ini said it should be possible to just delete the boot.ini file in order to boot the system.  The webpage also gave some sample boot.ini files.  I typed "help" at the prompt and got a list of options.  There didn't seem to be an editor in the Repair Console.  I typed "dir" to verify that boot.ini was there, and then typed "type boot.ini" to see what was in it.  It didn't look very complicated.  What's more, it looked like my XP Pro entry was already there, which could explain why my BOOTCFG command didn't work.  I pressed the up arrow to retrieve my BOOTCFG command and hit Enter to run that again, just in case.  It failed again.

I typed "exit" and shut down the computer and swapped cables so that maybe this drive would show up as C rather than D.  That merely resurrected the "no such device" GRUB error.  I decided to explore that one for a while.  A search led to some commands that I could have entered, but then I saw a suggestion that maybe I could fix it by just installing Ubuntu, which I had planned to do anyway, and let it sort itself out.  So I went ahead with that, following the Ubuntu installation approach I had worked out previously.  But at this point I only did the initial installation from the CD, and then rebooted to see what the Windows situation was now.  Sadly, I still had the "no such device" error.

I guessed that the problem was that I was using two drives.  One of them had perfectly reasonable Windows and Ubuntu installations on it.  The other had leftovers from some previous Ubuntu installation.  I didn't know for sure, but on that hunch I unplugged the second drive and rebooted.  But no, that gave me the "no such device" error either way, no matter which disk I plugged in.  I plugged in both drives, rebooted with the live CD, and ran System > Administration > GParted to take a look.  Interestingly, it showed that a partition on the second drive was marked as a boot drive, when it should not have been.  I changed that.  It didn't make a difference.

Ultimately, I plugged in a USB drive while booted with the Ubuntu live CD, copied over the data files, wiped both of the drives in the machine, and reinstalled WinXP and Ubuntu, in that order.  That solved the problem.