Showing posts with label bootable. Show all posts
Showing posts with label bootable. Show all posts

Tuesday, May 8, 2012

Creating a Bootable Windows 7 USB Drive for Installation / System Repair / Recovery - First Cut

Normally, if I booted a computer from a Windows 7 installation DVD, I could get into System Recovery Options (e.g., Startup Repair, System Restore, Command Prompt) that would let me run various diagnostics.  Unfortunately, my laptop did not have a CD/DVD drive.  So if I wanted to see those Windows 7 startup repair options, it seemed that I would have to find a way to do so by booting the computer from a USB flash drive instead.  This post describes the steps I took to develop a USB drive that would give me those options.  It also incidentally describes how to make a bootable copy of the Windows 7 installation DVD on a USB drive.

One approach was to put the entire Windows 7 installation DVD on a USB drive.  The DVD contained about 3GB of material, so this would require a USB drive of 4GB or larger.  Another approach was to put just a Windows 7 System Repair or Recovery CD on a USB drive.  This would require only about 150MB, so I could use a smaller, older, cheaper, or otherwise unused USB flash drive.  The Recovery CD option might load faster than a full Windows CD, but it would not be useful for installation or for recovering system files.

Either way, the first step was to get the necessary files.  The Windows installation files would traditionally be purchased on a DVD, but it was also possible to download them.  Similarly, the Windows 7 System Repair Disc was ordinarily a CD, but it could be copied or converted to files on a hard drive.

To get a System Repair Disc, I had to search my computer for "system repair disc."  That didn't work in my case -- I must have renamed the relevant shortcut -- so I searched for various combinations of "create," "system," "repair," and "recovery."  I could also have used Control Panel > Backup and Restore > Create a system repair disc.  The option of downloading the file(s) needed for a system repair CD was apparently disappearing.  In any case, eventually I found and used the link to a little Windows 7 program whose title bar read simply, "Create a system repair disc."  This created the recovery CD.

Next, the files that weren't already in ISO format needed to be converted to ISO.  The downloaded versions of Windows 7 evidently came in ISO format.  By contrast, the installation DVD and the recovery CD were not in ISO format.  To convert them to ISO, I started by using Magic ISO Maker.  It warned me that it would not create an ISO larger than 300MB, but this seemed to be a bluff to motivate an immediate purchase.  Format Factory would apparently have been one among many freeware alternatives.  When I remembered that ImgBurn would create ISOs from files or discs, however, I deleted the Magic ISO output and used ImgBurn instead, since it had worked well for me in other sorts of projects in the past.

Once I had an ISO, I had a choice between two different approaches to get it properly unpacked and operational on the USB drive.  A dedicated USB drive would focus solely on one version of Windows 7 (e.g., 32-bit vs. 64-bit, Home vs. Ultimate).  This dedicated approach seemed likely to be relatively simple and reliable, and would probably be all that most users would need.  By contrast, a multiboot USB drive would allow the user to install and/or run two or more different operating systems (potentially including e.g., Windows XP and Linux).  I decided to go with the dedicated, single-system approach.

I started with the Windows 7 system recovery CD, which ImgBurn had now converted to a file I called Win7SysRepair.iso.  There seemed to be several ways to put this ISO onto a bootable USB drive.  One approach involved using Grub4DOS.  Another was to use Microsoft's Windows 7 USB/DVD Download Tool.  I ran that Tool.  It called for a few simple steps.  First, I plugged in the little 512MB USB flash drive on which I was going to install the Windows 7 system recovery CD files.  Then I pointed the Download Tool toward the newly created Win7SysRepair.iso.  I clicked the USB Device button, and the Tool found the USB drive.  I clicked Begin Copying and confirmed that it was OK to erase the USB drive.  The tool said, "Creating bootable USB device."  The first time I tried it, it failed, with this error message:

We were unable to copy your files.  Please check your USB device and the selected ISO file and try again.
I assumed this was due to interference from AntiRun, which I was using to keep an eye on USB drives.  I shut down AntiRun and tried again.  But no, the Tool failed the second time too.  To troubleshoot this problem, I ran a search and saw that this was a rare error.

The problem seemed to be that the Tool was formatting the USB drive as NTFS.  I thought the solution would be to go to Start > Run > diskmgmt.msc and quick-reformat the USB drive with a FAT32 file system (using a volume label of no more than eight characters).  But I still got the same error.  Another source said the problem was that the Microsoft programs (diskmgmt.msc and also the Tool) failed to use the Clean command.  In other words, my USB stick had residual formatting from some previous use.

The advice was to fix this problem by opening a command window with Administrator rights and type "diskpart" at the prompt.  This started the DiskPart program, with its own DISKPART> prompt.  The next step was to type "list disk" to see what drives were connected to the computer.  This showed me that, as expected, the last disk was the smallest:  491MB.  That was surely my USB drive.  (It seemed pretty important not to be reformatting the wrong drive.)  That 491MB drive was Disk 2.  So I typed "select disk 2."  It informed me that Disk 2 was now selected.  I typed "list disk" again to check and, sure enough, there was an asterisk next to Disk 2.  So I was ready to type "clean."  It said, "DiskPart succeeded in cleaning the disk."  With that done, I could type these remaining commands in DiskPart, one at a time:
create partition primary
select partition 1
active
format quick fs=fat32
assign
exit
I exited the command window and tried Microsoft's Windows 7 USB/DVD Download Tool again.  It still failed.  I tried again, this time using a different USB drive.  This time was even worse:  previously, it had failed at the 99% mark, but with this drive the copying process didn't even start.  I tried using an ISO built from a System Recovery CD created on another computer, running a different version of Windows.  But the Windows Download Tool said this:
Invalid ISO File

The selected file is not a valid ISO file.  Please select a valid ISO file and try again.
I got that error twice, with ISOs created by ImgBurn and also by Magic ISO Maker.  It was time to give up on the Microsoft Download Tool, reformat the USB drive, and try another approach.

I went back to look at the Grub4DOS approach mentioned above.  I wouldn't be using it to install multiple bootable operating systems on my little 512MB USB flash drive, but it looked like a straightforward process anyway; I figured maybe the education would come in handy later.  For this approach, I needed to download and install MultibootISO.  I found what appeared to be a popular, current version of this program on a Pendrivelinux webpage.

On closer inspection, what we downloading was now called YUMI (short for Your Universal Multiboot Installer).  YUMI was apparently a successor to both MultibootISO and Universal USB Installer.  YUMI was portable; no installation required.  YUMI didn't have a built-in option for installing Windows 7.  I got the feeling that YUMI was not going to replace MultibootISO for this particular task.  Nonetheless, I tried.  In YUMI, I selected "Try an Unlisted ISO."  YUMI didn't complain that the ISO was invalid.  It seemed to think it had succeeded.  Sadly, the USB drive wasn't bootable, at least not in the laptop where I tried it.  I tried again and, whoa, success!  Apparently I had just not hit Esc quickly enough to bring up my laptop's bootable USB drive menu when the laptop was first starting up, or maybe I had hit Esc too many times and escaped my way right out of that menu.  But now, on this second go, YUMI gave me the Windows 7 recovery CD functionality, running from my USB drive.

Well.  This YUMI thing was pretty cool.  When I started this post, I thought I would just be content with the Windows 7 installation DVD. For that purpose, my spare 4GB USB flash drive was sufficient.  But now I wanted to try YUMI with a large USB drive that would accommodate the Windows 7 installation DVD as well as other operating systems and other bootable CDs.  But this would have to await purchase of a 16GB or larger USB flash drive.

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.

Saturday, May 21, 2011

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: Creating a Bootable Virtual Hard Disk (VHD)

As described in other posts in this blog, I was in the process of installing Windows 7.  I had discovered virtual hard disks (VHDs).  I was at the point of wanting to create a VHD that would boot Windows 7.  This post describes that creation process.

There appeared to be several ways to create a bootable Win7 VHD.  I could:

  • install it from scratch, using the Windows 7 installation DVD; or
  • convert an existing physical Win7 installation into a bootable VHD; or
  • convert a Windows Imaging format (WIM) file to a bootable VHD; or
  • deploy a WIM file into a VHD without conversion, and then boot the WIM file.
The fourth option was interesting, but I did not discover it until later.  The first option was tempting, insofar as it, too, would avoid a conversion process.  My prior experience in converting physical Windows XP machines to VMware virtual machines (VMs) using VMware Converter suggested that a conversion process might leave me with a buggy, poor-functioning VHD.

I chose to start with a conversion option nonetheless because I felt it offered some advantages over the approach of installing Win7 from scratch in the VHD.  For one thing, I had heard that a bootable Win7 VHD would not be upgradeable.  In that case, I would probably want to have a reference source -- a physical installation, that is -- that I could go back to, upgrade, and repackage into a new VHD.  Maintaining a reference physical installation could also mean that I could start with a smaller fixed-size VHD and then create a new, larger one as the size of the total Win7 installation grew, instead of taking what sounded like the more problematic approach of using a dynamically expanding VHD.  I also thought it would probably be handy, at times, to have that physical installation readily available, in case something went wrong with the VHD, or if it turned out that there were limitations on what the VHD could do.  That concern came from working with Windows XP VMs, in VMware, that were not able to access USB devices that a physical WinXP installation could access.  In addition, of course, a successful conversion strategy would save me the whole process of doing yet another installation from scratch.

As I looked into the conversion options more closely, it seemed there were a number of useful tools for the purpose.  WinImage was said to be a capable shareware, command-line tool that could create images in VHD format.  WIM2VHD was a freeware tool from Microsoft for the same purpose.  It appeared that Acronis True Image might be able to restore an image to a VHD.  Disk2VHD, another Microsoft offering, provided a way to create a VHD on a Win7 machine while it was running.  I preferred a GUI, if I could get it, and Acronis had recently disappointed me, so I narrowed down my choice to the two Microsoft tools.  Now it was just a question of whether I wanted to use WIM2VHD to convert a WIM to a VHD, or Disk2VHD to convert a running machine to a VHD.  I decided the latter was the more straightforward approach, so I started with that.

To create the VHD with Disk2VHD, I downloaded, unzipped, and ran Disk2VHD.  It was a portable program, so it did not need to be installed.  It recognized the partitions on my system, and asked which ones I wanted to put into the VHD, and where I wanted the VHD to be created.  For the target location, I designated a Win7 software RAID0 partition.  The source was a 70GB partition of which 32GB was used.  The target was a 100GB partition.  The process of creating the VHD (with source and target on different hard drives) took about five minutes.  The resulting VHD file was 26GB.  This, unfortunately, was not the right size.  It would not be big enough to accommodate any growth in the size of the Win7 installation.  It appeared that there were ways to expand it, but the methods I saw seemed to promise another layer of hassle, complexity, and potential failure. 

Back at the drawing board, WIM2VHD was advertised as creating sysprepped VHDs for native VHD booting.  It turned out that WIM2VHD was an automated way of doing the "deploy" (fourth) option listed above, so there were really only three options.  To run WIM2VHD, I had to download and install the 1.7GB Windows Automated Installation Kit.  I found a Microsoft website with authoritative information about VHDs.  At this point, however, I decided to postpone this project in favor of other pursuits.

Saturday, March 13, 2010

Windows XP SP3 CD Won't Boot

I was trying to install Windows XP on a Compaq Presario CQ60-420US laptop. I had just gotten it back from HP service in Texas, where they supposedly replaced the motherboard to fix a nonworking wired network interface card (NIC). They had reinstalled Vista on it, which I thought was very nice of them, and now the NIC still did not work for purposes of accessing the Internet, but did work for half of a crossover cable connection with another computer. That is, the other computer could access the laptop, but not vice versa.

So I had decided to try to see if WinXP would fare better than Vista on these problems. I wiped out the Vista partition, used GParted to create a new partition, and stuck the WinXP installation CD into the CD drive. Unfortunately, XP would not boot from the CD. GParted had just booted from the CD, so I was pretty sure it wasn’t the drive hardware per se. With the WinXP CD inserted, the computer would recognize that there was a CD in its drive, and would say, “Press any key to boot from CD,” but this just caused the thing to grind away, apparently trying to read and act upon the information on the CD, before eventually (after maybe five minutes) giving me a BSOD (blue screen of death).

I found that this problem occurred with a WinXP CD, containing slipstreamed SP3, that I had used to install XP on another computer; but it appeared somewhat different with an SP2 XP CD.   With that CD, the system went all the way through "Setup is loading files" and said, "Setup is starting Windows" before giving me the BSOD.  Then again, this may have been what was happening when the SP3 CD was grinding away; perhaps it was just not reporting all of the drivers it was loading.

To fix this, one suggestion said to disable BIOS virus detection. But the BIOS did not have a virus detection option. Someone else said laptop CDs are not eager to boot from DVDs, but this was definitely WinXP on a CD.

The BIOS Setup seemed willing to let me try to boot from a USB drive. I wondered if I could install WinXP from a 4GB USB jump drive that I had lying around. To try it, I rearranged the Boot Order so that USB Diskette on Key / USB Hard Drive came first. I wasn’t too sure how to do the rest of this process, so I started by just copying the WinXP CD directly to a 4GB USB drive. While that was underway, I researched the question and found that there were many websites on how to do this, and all of them sounded complicated.

At the same time, I continued trying to figure out what was wrong with the laptop’s DVD drive. One source said that they solved the problem by flashing the BIOS on the laptop. This seemed like a more comprehensive kind of solution, so I decided to try this second – right after inserting the USB drive with a copy of the Windows XP CD and verifying that, no, it wouldn’t install WinXP by itself; booting from that USB drive would just give me “Invalid system disk. Replace the disk, and then press any key.”

It seemed odd that the system would boot a Vista CD but would require a BIOS update in order to boot a WinXP CD.  Or at least it had booted a Vista installation CD previously.  I decided to try that again.  Sure enough, with the Vista installation CD inserted, I got “Press any key to boot from CD or DVD” and then “Windows is loading files.”  I thought about trying to slipstream Vista into a WinXP CD, but got some warnings that maybe this would not be a good idea.

So, continuing with the current plan, I went to the HP-Compaq download page and looked for a WinXP BIOS update for this laptop.  All I saw there was a firmware update named sp43474.exe, for the GSA-T50L optical drive, dated April 2009.  Firefox 3.5.8 wouldn’t download it to my other computer; I had to right-click and use the IE View extension to download successfully.  The problem now was that this update was an .exe file, which I would only be able to install from within a running Windows installation.  Catch-22!

Just to be sure, I double-clicked on the sp43474.exe file on the other computer.  It said, “This software update will upgrade the firmware of your system’s optical drive GSA-T50L to rev SC05.”  I had done a printout to PDF from a system information utility before sending the laptop to Texas, so now I searched it for a reference to this model of DVD drive.  It said that, actually, what I had (at least before sending the laptop to Texas) was an Optiarc DVD RW AD-7561S ATA Device.  This seemed to be made by Sony, whereas the GSA-T50L was made by LG.  I supposed that both might ultimately have been made by the same Chinese sweatshop somewhere, but I preferred to try to find a driver for the Optiarc.  But I was curious why my laptop would have an unofficial CD drive.  I was not able to find any references to the Sony Optiarc AD-7561S drive on the Sony Optiarc page, so apparently it was an older or in some sense unsupported model.  I stumbled across a recent thread in which someone else was tired of hassling with HP, couldn’t find a firmware update, and was at the point of just installing the wrong update to see what would happen.  Same problem in another thread.  I even found a thread on an official HP forum where they were talking about this problem.  As one participant in that last thread said, “There does not seem to be any updates for the 7561s at all.”  So, OK, updating the firmware was not an option; the more likely option was to send the machine back to HP for a replacement, assuming they were willing.  I couldn’t do that now -- I needed the laptop -- so we were back at the option of installing XP from the USB.  I went through a long effort of that nature, but ultimately abandoned it and came back to this post.

While that long effort was underway, I began looking into other possibilities.  One was to adapt an Acronis True Image backup (or you could try Macrium for freeware) of a Windows XP installation from another machine, so that it would work on this laptop's different hardware.  The Acronis option that I would need, to avoid a BSOD, seemed to be Universal Restore, which would apparently cost at least $365 (list).  Alternately, it seemed that OEMs use Sysprep to deploy the same operating system installation on many computers, but it looked like more hassle than it would be worth for just one system.  I also looked into the possibility of installing XP via network connection.  This led me to a site that specialized in boot disks.  I didn’t see how I could use any of that, unfortunately -- at least not without a substantial additional time commitment, which was impossible.

The effort to install XP from the USB did not pan out, so at this point I returned to this post.  There seemed to be two basic options.  Either find a way to develop or adapt an Acronis image from another machine so that it would work on the laptop, or get to a command prompt (via USB drive, network connection, or otherwise) and run an installation command (seemingly something like X:\i386\winnt /s:X:\i386, where the /S switch defines the location of the startup files) to install WinXP from scratch.

I wondered if (a) Windows updates were being designed and revised to defeat the Acronis approach and (b) it would be possible to bail out of a WinXP basic installation before installing many hardware drivers, and make an Acronis image at that point.  I tried that, but WinXP would crash almost immediately; and as with other efforts, it would not boot into Safe Mode either.  I figured that putting the Acronis image on the laptop would at least have installed the I386 folder there, so now maybe it was just a question of getting to a command prompt.  I didn't need BartPE on a USB stick for that; I could boot BartPE from a CD.  I had a CD version of BartPE from 2007.  I guessed it would probably work, since XP was much older than that.  But it seemed that whatever caused the laptop to crash when I had the WinXP CD inserted was also going to reject WinXP as part of a BartPE CD.

I also had an Ultimate Boot CD for Windows (UBCD4Win).  The UBCD ground away for a long time, eventually showed me the WinXP splash screen -- and didn't crash!  Instead, it gave me a choice, "Select shell to start." It still seemed to be in its process, so I waited, and it chose the automatic option for me.  It gave me an option of setting up networking, but I didn't know how to answer the question as to which sort.  I tried to cancel, but it seemed intent upon continuing, so I just used the default options.  I went to Start > Command Prompt and typed DIR C: (using capital letters here just to indicate the actual command; DOS is not case-specific) and, no, the I386 folder was actually not installed there yet.  I put the WinXP CD in the CD drive and typed DIR X: because it looked like X was the letter that UBCD had assigned to the CD drive.  I typed COPY X:\I386 C:\ and it copied files.  Then it froze.  I killed that window and tried running Start > Programs > File Management > Explorers.  None of the explorer programs would run.  Eventually I realized this was because I had removed the UBCD disc.  I put it back in and tried again.  The explorers still didn't work.  I had belatedly realized that COPY was probably not the best command, so I tried XCOPY X:\I386 C:\I386 /E /H /Y.  It copied lots of stuff, and not the way I intended.  Now all the stuff that should have been in the C:\I386 folder was instead in the root (C:\) folder.  Oops.  I wound up deleting it all and starting over.  There were just a few files in C:\ that I couldn't delete (i.e., biosinfo.inf, bootfix.bin, config.sys, and mstask.inf), and of course several folders (i.e., Documents and Settings, I386, Program Files, and Windows).  Problem:  there was no WINNT.EXE file to be found.  On my other computer, it was in C:\I386, but it was not in that folder on either the laptop or the WinXP CD.  I carried it over via jump drive.  It took UBCD a minute to recognize the jump drive, but it did.  I typed WINNT.EXE and hit Enter.  I got this:
Windows XP Setup
This program does not run on any 32-bit version of Windows.
Use WINNT32.EXE instead.
Setup cannot continue.  Press ENTER to exit.
So, OK, I jumped WINNT32*.* over to C:\I386.  (The USB flash drive was recognized as drive G, as I discovered by feeling around.  That is, I tried D: and got a partition; tried E: and got a partition; tried F: and got an error; tried G: anyway and there it was.)  But it froze.  It would copy the WINNT32.* files, but not the WINNT32*.DLL files, not even one at a time.  I tried running C:\I386\WINNT32.EXE anyway.  It gave me an error:
The file C:\I386\WINNT32U.DLL could not be loaded or is corrupt.  Setup cannot continue.
I didn't have that particular one on the jump drive, so I went back to the source machine and tried to jump it over.  But I got the same problem:  the command window froze and had to be killed.  I rebooted the computer with an Ubuntu 9.10 CD and then copied all of the WINNT32*.* files (and a WINNT32 folder) from the source computer to the laptop's C:\I386 via jump drive.  Back in UBCD, I tried running that same WINNT32 command and got that same "could not be loaded or is corrupt" error.  One post suggested this sort of message might be due to insufficient RAM.  A Microsoft webpage said that I should double-click on WINNT32.MSI.  I wasn't in a GUI, so I just tried typing WINNT32.MSI at the command line.  This opened a dialog asking me what program I wanted to use to open this kind of file.

Since I had a command prompt using UBCD, I tried a different approach.  The command I used this time was:
X:\i386\winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource
But this gave me an error, stating that this command was not recognized.  I tried it again, inserting a BartPE jump drive and replacing X: with H: since H was where the jump drive was.  This worked, but it just gave me the same error message I had gotten a long time earlier:
Setup cannot continue because upgrade functionality is disabled and your copy of Windows XP only allows upgrades.
I tried replacing H with C, since I had already copied I386 to C.  This just gave me the message about WINNT32U.DLL being unloadable or corrupt.  One post led me to think that this problem might be unique to my WinXP SP3 disc, so I loaded an SP2 disc and tried winnt32.exe with that.  That did not seem to achieve anything:  the disc spun up and then down and I was back at the command prompt.  I tried it again with the SP3 CD.  Same result.  Apparently I had mistyped the command previously.

I thought maybe I could run winnt if I could find a 16-bit DOS equivalent.  My search led to FreeDOS, where I downloaded FDFullCD.iso.  I burned it and booted the laptop with it.  I indicated that I wanted to boot FreeDOS, and then chose option 3, FreeDOS Live CD with HIMEM + EMM386.  But I got this error:
Selected page frame e000 not available, searching automatically
No suitable page frame found.  EMS functions limited.
I gathered that EMM386 was not a good option in this case.  I rebooted and tried again, this time choosing option 4, HIMEM only.  This produced a bunch of error messages, but at least it put me to an A: prompt.  Drive B appeared to be a RAM drive.  The program did not recognize drive C.  I thought this must be because it was an NTFS drive, but no, FreeDOS did not recognize any drive, including the CD drive.  I booted FreeDOS again, and this time chose option 5, FreeDOS Live CD only.  I still got some error messages, including "There is no CDROM, or the wrong CD-ROM!"

I guessed that whatever kept this CD-ROM drive from recognizing WinXP was also impairing its recognition of the FreeDOS CD somewhat.     In that case, I wondered if I could install the contents of the WinXP CD from a bootable FreeDOS USB drive.  To make that, I followed instructions to install Unetbootin on my Ubuntu machine, and then used Unetbootin to make a FreeDOS bootable USB stick.  When that was done, I checked its properties and saw that Ubuntu indicated the filesystem type was msdos.  I copied the /I386 folder from the slipstreamed WinXP SP3 CD to the USB stick, put the USB into the laptop, and rebooted.  After a Unetbootin screen, I was back at the FreeDOS menu.  I tried option 3; same errors as before.  I tried option 5.  This time, it recognized the USB drive as drive C.  Then I realized that this was no help; it still couldn't see the partition on the hard drive where I wanted to install WinXP.  Well, could I reformat that partition as FAT32?  I formatted another USB drive as FAT32, put it into the laptop, and rebooted from the FreeDOS stick.  It did recognize the FAT32 USB drive.  Now, could I install WinXP on a FAT32 partition?  It looked like it was supposed to be possible.  I pulled out the USB drives, rebooted the laptop with GParted, and replaced the NTFS partition where I had planned to install WinXP with a FAT32 partition.  (I figured this would be much faster than trying to convert from NTFS to FAT32.)  Of course, now I was wondering whether the FAT32 alternative would also have made a crucial difference with some of the attempts to install from UBCD.  When GParted was done, I rebooted with the FreeDOS stick.  Sure enough, now I could see the FreeDOS stick as drive C and the WINXP partition as drive D.  I tried using XCOPY, but it didn't work.  I wasn't sure how to copy subfolders etc. in FreeDOS.  Rather than research it, I removed the FreeDOS USB, rebooted with UBCD, plugged in the FreeDOS stick, found that WINXP was now drive C and the FreeDOS stick was drive G, and therefore used XCOPY G:\I386\*.* C:\I386 /E /H /Y to copy the I386 folder from the FreeDOS to WINXP.  This time around, that ran very smoothly.  I rebooted with the FreeDOS USB stick.  I went into the I386 folder on the WINXP partition (which was drive D in this case), and typed WINNT.  Windows XP Setup asked me where the XP files were located.  It defaulted to D:\I386, so I left it at that.  Next, it said this:
Windows XP Professional Setup
Setup did not detect SmartDrive on your computer.  SmartDrive will greatly improve the performance of this phase of Windows Setup.
You should exit now, start SmartDrive, and then restart Setup.  See your DOS documentation for details about SmartDrive.
I looked into SmartDrive.  Along the way, I ran across the ingenious suggestion that I could use an IDE to USB adapter and, with that, could use the internal CD drive on a desktop computer as an external drive for some other computer (if I had needed to do that).  (This would require leaving the CD drive's power connected in the host computer.)  SmartDrive itself was an MS-DOS disk cache program, to speed up file transfer times.  It appeared that FreeDOS might have its own cache arrangement, presumably faster if I could get HIMEM and/or EMM386 to load.  The best I could do was to reboot, choose FreeDOS option 3, ignore the FreeDOS boot error messages, and continue past the WinXP setup message about SmartDrive.  WinXP setup next said, "Please wait while Setup copies files to your hard disk."  It copied files for a while, and then froze.  I had heard something about how WINNT would only start the process, so I rebooted with UBCD, went into C:\I386, and typed "winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource" and, this time, it worked!  It gave me "Welcome to Windows Setup" and then asked for my WinXP's product key.  I went through the various options, accepting the defaults (including the offer to upgrade my drive to NTFS), and it began the installation process.  It estimated that it would take 52 minutes, instead of the usual 39.  But then something happened.  I turned away, and when I looked back, we were back at the UBCD prompt.  I ran WINNT32 again, just like before, but this time I said No to the option of upgrading to NTFS.  It didn't matter.  I ran it a third time, and again it crashed, shortly after it finished "Copying Installation Files."  No error message or anything.  I rebooted UBCD and tried installing again from the I386 folder that I had added to the bootable FreeDOS USB drive, using the command "G:\i386\winnt32 /syspart:C: /tempdrive:C: /makelocalsource" (because G was where the system saw the FreeDOS USB drive).

So now I wondered whether I could boot to a very WinXP-compatible 32-bit command line.  I started with Vista.  My Vista installation was not booting at this point, probably because I had told GParted to hide the Vista partition, so I inserted the Vista DVD and rebooted.  I went with its Repair Your Computer option but didn't proceed with the repair, choosing instead the steps necessary to get a command prompt.  I inserted the FreeDOS USB and found it at drive H.  But before trying it, I went to C:\I386 and ran that WINNT32 command again.  It proceeded just as it had done in UBCD, except I didn't recall having to agree to the license agreement in the UBCD process.  It crashed -- it put me back to the command line -- just as it had done in UBCD.  I tried again, this time starting from the I386 folder in the FreeDOS USB.  I even swapped out the Vista CD for the WinXP CD, just in case that would make any difference.  It didn't.  Another crash.  I took out all bootable items, rebooted, and got "Disk error.  Press any key to restart."  So, no, it had not by some magic completed the process.

I rebooted UBCD.  On another computer, I copied C:\Windows\system32\chkdsk.exe to a new Utilities folder on the FreeDOS USB.  I plugged in the FreeDOS USB, navigated to C:, and typed D:\Utilities\chkdsk /r.  It ran.  I told it to force a dismount.  It quickly checked files and slowly checked free space.  It found no problems.  I rebooted with GParted and had it check the filesystem on the WINXP partition.  No problem there either.  I wondered if the presence of even a hidden Vista partition was screwing things up for WinXP.  I deleted both partitions and recreated WINXP.  The WinXP CD would still not boot.  The Vista CD would still boot, and it gave me a command line from which I could run winnt32.  Even so, it crashed again.  I wondered whether the problem was with my SP3 CD.  I made another folder on the FreeDOS USB, naming it I386-SP2, and copied the I386 folder to it from the WinXP SP2 CD that I had used in making the SP3 CD (i.e., having the same product key).  I tried running WINNT32 again from the Vista command prompt, using this I386-SP2 folder as the source.  This gave me an error:
Setup was unable to build the list of files to be copied.
The system cannot find the path specified.
I verified that the WINXP partition was still drive C, and that it contained an I386 folder.  The problem seemed to be that the I386 folder has to be named I386 -- nothing more, nothing less.  I renamed I386-SP2 to be I386 and re-ran the WINNT32 command.  It crashed again, in exactly the same way as before.  I checked C: to see what WINNT32 was actually doing there.  The answer: not much.  It was creating files named $WIN_NT$, with the extensions .~BT and .~LS, along with a file named textsetup.sif, and it had copied NTLDR over.  And that was about it.  I deleted those $WIN_NT$ files and tried WINNT32 again, this time using the product code from my other WinXP CD.  It crashed, of course.

Someone said that a problem something like this one sounded like it might be due to a bad CPU or other hardware.  Of course, that was always possible.  I wasn't ready for that yet; after all, everything else seemed to work OK.  But I was running out of other theories.  Then I stumbled into a search from which I gathered that "downgrade" was an official searchable term, especially where Vista was concerned.  PC Magazine had a two method article, but neither method would work for me since I wasn't able to boot from the XP CD.  I found what looked like the consummate downgrading guide, with specific information for my laptop model.  For a CQ60 with an Intel CPU, it seemed to say that I should slipstream the ICH9 SATA driver (ICH9M-E/M SATA AHCI Controller) into the XP installer using nLite.  To get the ICH9, I downloaded and unzipped f6flpy3289.zip, but I did not understand why the highly regarded CherylG was telling me that I would find my driver inside iaAHCI.inf.  In the process of digging around for the driver she named, I contracted a virus, which prompted me to get up-to-date on Spybot Search and Destroy and on the Web of Trust add-on for Firefox.  I eventually found the driver on an HP webpage (though not the downloads webpage for my laptop).  I ran it on another computer (it was an .exe file) and it tried to install itself but then said the computer didn't meet the requirements, which I assume meant something about its particular CPU.  The conclusion there seemed to be that it would help to run it on a computer whose hardware was very different from the target computer, so that it would just extract but would not install.  I didn't know if it would run on the laptop from the Vista prompt, but anyway this was not the concept of slipstreaming, so I went back to the first one that CherylG had pointed toward.  Then I downloaded nLite and looked at the recommended guide for slipstreaming the driver.  Now that I saw the guide, I understood why CherylG was pointing me toward an .inf file.  She apparently didn't mean that I somehow had to extract the driver from iaAHCI.inf; I just had to include that .inf file in the slipstream.  This seemed to be the only thing I had to slipstream, so I went ahead with it.

The slipstreaming process began by copying the entire SP3 CD to a folder on the hard drive that I called SP3CD.  I started to install nLite, which required the Microsoft .NET Framework 2.0.  Installing that required trying to update .NET Framework 1.1 and then downloading a tool to uninstall it when the updates failed, and then manually doing registry edits etc. to uninstall it when the tool failed.  That ran overnight.  Next morning, when that was done, I followed the MaxEasyGuide to slipstreaming with nLite.  The first time, for some reason, it did nothing.  Second time, it made a file that I called SP3-SATA.ISO, containing the ICH9M-E/M SATA AHCI Controller driver from within iaAHCI.inf -- and now I understood what CherylG was saying.  Next question:  what was I supposed to do with this thing?  I decided to open it with UltraISO and copy its I386 folder to another folder.  Then I ran Beyond Compare to see how different it was from the original slipstreamed SP3 I386 folder.  It looked like there were a couple dozen differences in files.  So, OK, the nLite process seemed to have done something.  I wasn't sure I had done all of these steps right, but I decided to give it a shot.  I used Beyond Compare to synchronize the I386 folder on the FreeDOS USB with the I386 folder I had just extracted from SP3-SATA.ISO.  Whoa.  Many, many differences.  I forgot -- I had been using the SP2 I386 folder.  I changed that around and re-ran the comparison.  Still tons of differences!  Oh, I knew why.  It was because of the timechange.  The files were mostly the same, but some had been created an hour before the others of similar name.  I told Beyond Compare to ignore unimportant differences and did a full refresh, but that made no difference.  I bit the bullet and upgraded 6,992 files on the FreeDOS USB.  While that was underway, I re-ran the nLite and Beyond Compare processes, just to be sure.  Everything looked good.  I put the updated FreeDOS USB drive into the laptop and re-ran the WINNT32 command.  Alas, that wasn't the answer.

I found another thread that seemed to say that CherylG's advice on drivers was for an AMD CPU, whereas my CQ60-420US had an Intel CPU.  But some respondents said they were definitely using the Intel drivers and it still wasn't working.  Unfortunately, the drivers they pointed to were no longer availlable at the Intel website.  Daniel Potyrala advised that I download and run CPU-Z in order to find out not only my CPU type but also my chipset.  I couldn't very well run CPU-Z without an operating system.  Since it seemed that having Vista on the same hard drive did not explain why I could not even run WINNT32, it seemed to be time to restore the Vista partition using GParted and Acronis.  Adam Pash assured me that it didn't matter which came first, WinXP or Vista, so I left the WinXP partition in place (in hopes that it would someday be operational) and just added the Vista partition behind it.  I downloaded the appropriate version of CPU-Z, jumped it over to the laptop, and installed and ran it.  CPU-Z said that my mainboard chipset was an Intel GL40, which meant that I needed to slipstream . . .  the ICH9M-E/M SATA AHCI Controller driver, just like before.  So Mr. Potyrala was wrong; CherylG had given me the right tip.  But then Fernando1 said there were different drivers for 32-bit and 64-bit CPUs.  My T4200 Pentium (Penryn) was a 64-bit.  It was hard to tell the two apart; the driver names were the same.  I repeated the nLite process.  This time, the Textmode driver I selected was the ICH9 SATA AHCI Controller (Desktop ICH9R).  There were, again, some differences, so once again I updated the FreeDOS USB drive and tried it in the laptop, this time typing  "I:\i386\winnt32 /syspart:F: /tempdrive:F: /makelocalsource" because the FreeDOS USB was at I: and the WinXP partition was now at F.  That didn't work, so I tried once more, this time selecting the ICH8R/ICH9R SATA RAID Controller.  That didn't work either.

It was time to quit.  The webpages to remember, for future reference, included Quang Do's post in an HP forum, listing drivers and their sources; ditto Riskyone101; and perhaps a post, by wimb, that I really didn't understand.  The approach to remember was to use Unetbootin in Ubuntu to quickly create a FreeDOS bootable USB drive, if I needed 16-bit support, or just a Vista DVD or UBCD, if I could go straight to 32-bit support; to format the target drive in FAT32 rather than NTFS if necessary; to use nLite to create a slipstreamed ISO, assuming I could find the right drivers, and UltraISO to extract files from that ISO to load via USB drive if necessary.  I didn't know why WinXP could not run on the laptop, and I wasn't sure what else to try at this point.