Showing posts with label hardware. Show all posts
Showing posts with label hardware. Show all posts

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.

Wednesday, January 12, 2011

Windows 7: Upgrade Installation to Win7 Software RAID0 Array

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

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

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

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

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

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

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

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

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

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

Monday, January 10, 2011

Acronis True Image Home 2011: Restoring Windows 7 to RAID 0: FAIL

I had installed Windows 7 on a regular hard drive -- what Win7 calls a "basic" drive.  I had made an image using Acronis True Image Home 2011 (ATIH).  Now I was trying to restore that image -- using the ATIH Universal Restore feature installed by the Acronis Plus Pack -- to a new, empty software RAID0 array that I had just created in Windows 7.  This post describes my efforts.

For perspective, I could perhaps restore an image of a Windows 7 installation onto a hardware RAID0 array, and I might be able to restore an Acronis image of a RAID0 array to a non-RAID partitionAcronis promised that the Plus Pack would enable me to restore to a striped software RAID0 array.  But now that I had made the purchase, a search led to a thread suggesting that the promise was false.

Here's how the effort unfolded.  After booting the ATIH CD, I went into Recover My Disks > Browse (wait) > select the .tib file to restore (or, in my case, the first of the five DVD-sized files comprising the backup).  I went on, OK, Next, and came to "Recover whole disks and partitions" and "Use Acronis Universal Restore."  It gave me the option of adding device drivers.  On the assumption, at that point, that drivers were not necessary in a software array, I clicked Next.  I indicated the partition I wanted to recover, and specified New Location as the dynamic volume that I had created for this purpose.  (Dynamic volumes were listed at the bottom of the screen -- I had to scroll to see them all.)  I clicked Next, and here is the message I got:

You are about to recover a partition containing OS files.  If the recovery destination is an existing non-active dynamic volume, then the system will be unbootable because activation of dynamic volumes is not supported.  Are you sure you want to continue?
I searched and found only a few links containing that statement about activation.  A post by an Acronis employee in an Acronis forum said, "The issue will be resolved in a future update of our software."  To see if the most recent update had resolved it, I went to the Acronis site and downloaded the latest build of ATIH.  I was doing this from an Ubuntu live CD, so I had to save the download (an .exe file) to a USB drive and jump it over to my laptop, running Vista, to install the .exe so I could burn an updated CD that would hopefully have better news for me in terms of restoring to a Win7 RAID0 array.  This was a lot of fooling around.

While that was happening, I went ahead with the next step, using my present copy of ATIH.  Alas, a new error:
There may not be enough free space on the system partition to boot up your operating system after recovery.
This was an odd message.  I had two 50GB partitions in my new RAID0 array.  The backup I had made was from just one partition of either 40GB or 50GB.  I clicked OK there and Acronis stopped.  It didn't try to see whether the restore would fit.  Evidently it was not set up to think in terms of RAID0 arrays.

I guessed that even the updated ATIH would not try to fix this.  But it was going to be a while before I could find out for sure.  The installation on the laptop was taking its sweet time.  After seemingly completing most of the installation, it aborted with this message:
Installation Incomplete

The installation was interrupted before Acronis True Image Home 2011 could be installed.
I didn't know who or what interrupted it.  The laptop was just sitting off to the side, doing its own thing.  I wasn't touching it.  I tried again.  Now I got a new error message:
The error was encountered while the installation.
That's really it.  That was what the message said.  It provided technical details that I didn't understand.  Toward the bottom, it said, "A possible reason might be that you do not have enough privileges."  OK, Vista.  Even though I was running as Administrator on the laptop, that was not enough, and possibly the good people at ATIH couldn't have noticed that until we were at the end of the installation process.  I was unfortunately not knowledgeable enough about the solution and was quite tired and not very patient with the idea of researching that question in order to resolve this tangent from a tangent.

I gave up on that Vista errand and just installed the upgraded ATIH on a Windows XP machine.  No permissions issues.  The upgrade took a while, but then it was successful.  Now I needed to remember how to install the Plus Pack.  My previous post about Plus Pack led me to an Acronis instructions webpage.  The basic process seemed to be to install ATIH, install the Plus Pack, and then go into the new Start Menu entry for Plus Pack and click on Acronis WinPE ISO Builder.  That required me to "Specify a path to the folder with the WinPE files."  A search for that exact statement yielded only a post where someone was trying to combine ATIH and Acronis Disk Director on one CD.  A different search led to an Acronis page instructing me to download the Windows 7 Automated Installation Kit (AIK) from Microsoft.  This was a 1.7GB download.  Was this really what people had to do if they wanted to use Acronis Universal Restore?

I went back to the search and tried a different Acronis page.  This page said that Plus Pack had three benefits, and it pointed me to three separate webpages describing those benefits:  it would support dynamic drives and GUID partition tables (GPT); it would facilitate Universal Restore between dissimilar hardware, including virtual machines; and the WinPE part would create bootable rescue media.  The page on dynamic drives led to a page on RAID support, cited above, that led in turn to a table, summarizing the kinds of RAID support provided by various versions of Windows.  It said that ATIH Plus Pack supported restoring to RAID0.

The page regarding Universal Restore said that it would work only if "You have created Acronis Bootable Media (standard, WinPE, or BartPE) after the installation of Acronis True Image Home 2011 Plus Pack."  So apparently there were three different kinds of Acronis bootable media.  To see more about that, I went back into the Start Menu, on the XP machine where I had just installed ATIH, and chose the option to start up ATIH.  In its main screen, I went to "Create bootable media."  So this was going to give me the standard variety.  I burned it to a CD.  Much easier than creating WinPE media.

With that CD, I was ready for the next step.  Acronis said that I would need drivers for the hard drive controller or the chipset, in .inf, .sys, or .oem forms -- extracted, if necessary, from .exe, .cab, or .zip files.  The last time I had played with Acronis Universal Restore, I hadn't understood this driver situation and, as I dimly recalled, part of the problem was that I didn't know which drivers I should get and how I should extract them.  It was clearer to me, now, that there was no getting around it:  I had to have exactly the right drivers.  I have written up that pursuit in a separate post, for those whom it puzzles as it puzzled me.

Not to say that I came to a clear understanding.  I just made a stab at it.

With the drivers collected in a folder, I booted the Universal Restore CD.  When I got to the Drivers Manager step, I clicked Add Search Path and pointed to that folder.  Oddly, when I did, Acronis reported, "No items to display," even though I had just put 16 driver files in there.  I guessed that this meant it had not refreshed its view at that point.  It did not have an option to do so.  I proceeded to designate what I wanted to restore and where I wanted to restore it.  Once again, sadly, I got that error message indicating that "activation of dynamic volumes is not supported," followed by that error indicating that there might not be enough space to boot the operating system after recovery, and once again that was the end.

The working conclusion, at this point, was that ATIH did not support Windows 7 programs partitions in RAID0.  I could install Win7 manually in that kind of partition, and perhaps I could use ATIH to back up a manual installation, but I could not use ATIH to restore any such backup to that location.

I clicked on the Help button in Acronis and browsed its contents, to see if I could get a clearer idea about all this.  They didn't seem to have any information on it.  I posted a question about this on an Acronis forum.  Responses to that question tentatively supported the working conclusion that ATIH does not restore images to Win7 software RAID0 arrays.

Monday, September 27, 2010

Dual-Boot RAID 0: Ubuntu 10.04 and Windows XP

I wanted to set up a SATA RAID 0 array that would function like any other dual-boot system:  I would turn on the computer; it would do its initial self-check; I would see a GRUB menu; and I would choose to go into either Windows XP or Ubuntu 10.04 from there.  This post describes the process of setting up that array.

With no drives other than my two identical, unformatted SATA drives connected, I turned on the computer.  The BIOS for my Gigabyte motherboard did not give me the obvious RAID configuration option I had hoped for.  I hit DEL to go into BIOS setup.  Nothing jumped out at me.  Desperate for guidance, I turned to the manual.  I was looking at an Award Software CMOS Setup Utility.  The manual directed me to its Integrated Peripherals section.  There, I set OnChip SATA Controller to Enabled, OnChip SATA Type to RAID, and OnChip SATA Port4/5 Type to As SATA Type.  I hit F10 to save and exit.

According to the manual, that little maneuver was supposed to give me an option, after the initial boot screen, to hit Ctrl-F and go into the RAID configuration utility.  Instead, the next thing I got was this:

Press [Space] key to skip, or other key to continue...
I didn't do anything.  In scanned my drives and then led on to the Ctrl-F option.  I rebooted and tried it again.  Hitting the space key led to the same result.  Ctrl-F opened the AMD FastBuild Utility.  I hit option 2 to define an array.  This gave me a list of my two drives, labeled as LD 1 and LD 2.  Apparently it wasn't supposed to show anything.  LD was short for "logical disk set."  It was essentially showing two separate arrays, each having one drive.  So although the manual didn't say so, it seemed that I needed to get out of here and go into option 3 to delete these arrays.  I did that and then went back into option 2.  Now I was looking at a blank list of LDs, just like in the manual.

So now I was ready to prepare my array.  In option 2, I hit Enter to select LD 1.  This defaulted to RAID 0 with zero drives assigned to it.  I arrowed down to the Assignment area and put Y next to each of the two drives listed.  Now it said there were two drives assigned.  But now I had a couple of things to research.  The screen was giving me options for Stripe Block, Fast Initialize, Gigabyte Boundary, and Cache Mode.  The manual didn't say what these were.

I did a search for information on the Stripe Block size.  I found an old AnandTech article that took the approach of choosing the lowest stripe size where performance tended to level out -- where, that is, increasing the stripe size another notch did not increase performance.  For the RAID controllers they were testing, it looked like performance kept increasing right up to the range of 256KB to 512KB, for those controllers whose options went that high.  Mine only gave me a choice between 64KB and 128KB, so I chose the latter.  A more recent discussion thread seemed to support that decision.

Regarding the "Fast Init" option, a search led to some advice saying that slow initialize would take longer but would improve reliability.  A different webpage clarified that the difference was that slow initialize would physically check the disk and would be suitable if you had had trouble with the disk or if you suspected it had bad blocks.  I decided to stay with the default, which was Fast Init ON.

The "Gigabyte Boundary" option would reportedly make the larger of two slightly mismatched drives in an array behave as though it were the same size as the smaller one.  The concept appeared to be that, if you were backing up one drive with another (which was not the case with a RAID 0 array), you would use this so that the larger drive would never contain more data than the smaller drive could copy.  Mine was set to ON by default.  I couldn't quite understand why anyone would need to turn it off, even if the drives were the same size.

Finally, the "Cache Mode" option was apparently capable of offering different choices (e.g., write-back), but mine was fixed at WriteThru with no other options available.  So I thought about it a long time and then decided this was acceptable to me.  So then I hit Ctrl-Y to save these settings.  Now I was back at the Define LD Menu, but this time it showed a RAID 0 array with two drives and Functional status.  That seemed to be all I could do there, so I exited that menu.  I poked around the other options on the Main Menu.  I seemed to be done with the FastBuild Utility.

Next, the manual wanted me to use a floppy disk to install the SATA RAID driver.  I could have just gone ahead and done that -- I still had a floppy drive and some blank diskettes -- but I thought surely there must be a better way by now.  Apparently there was:  use Vista instead of WinXP.  But if you were determined to use XP, as I was, the choices seemed to be either to go through a complex slipstreaming process or use the floppy.

There was, however, another option.  I could buy a RAID controller card, for as little as $30 or as much as $1,000+, and it might come with SATA drivers on CD.  This raised the question of whether the RAID cards actually had some advantage beyond their included CD.  My brief investigation suggested that a dedicated RAID card could handle the processing task, taking that load off the CPU, but that there wasn't much of a processing task in the case of RAID 0.  In other words, for my purposes, a RAID controller card wouldn't likely add any performance improvement.  Someone said it could even impair performance if it was a regular PCI card (as distinct from e.g., PCIe) or if its onboard processor was slower than the computer's main CPU.  There did seem to be a portability advantage, though:  moving the array to a different motherboard would require its re-creation, in at least some cases, but bringing along the controller card would eliminate that need -- though the flip side was that the card might fail first, taking the array with it.

Further reading led to the distinction between hardware and software RAID.  An older article made me think that the essential difference (since they all use hardware and software) was that software RAID would be done by the operating system and would run on the CPU, and would therefore be dependent upon the operating system -- raising the question of whether dual-booting would be impossible in a software RAID array, as a generally informative Wikipedia article suggested.  To get more specific, I looked at the manual for a popular motherboard, the Gigabyte GA-MA785GM-US2H.  That unit's onboard RAID controller, plainly enough, was like mine:  it depended upon the operating system.  Wikipedia said that cheap controller cards provide a "fake RAID" service of handling early-stage bootup, without an onboard processor to take any of the load off the CPU.  FakeRAID seemed to get mixed reviews.

An alternative, hinted at in one or two things I read, was simply to set up the RAID 0 array for the operating system in need of speed, and install a separate hard drive for the other operating system.  I was interested in speeding up Linux, so that would be the one that would get the RAID array.  I rarely ran Windows on that machine, so any hard drive would do.  A look into older, smaller, and otherwise seemingly less costly drives led to the conclusion that I should pretty much expect to get a 300GB+ hard drive, at a new price of around $45.  Since I was planning to use Windows infrequently on that machine, it was also possible that I could come up with some kind of WinXP on USB solution, and just boot the machine with a flash drive whenever I needed access to the Windows installation there.

I decided that, for the time being, I would focus on just setting up the Ubuntu part of this dual-boot system, and would decide what do to about the Windows part after that.  I have described the Ubuntu RAID 0 setup in another post.