Jump to content











Photo

Boot Win 7 VHD on Bare Metal PC from Empty Drive

vhd bare metal boot win 7 grub4dos

  • Please log in to reply
321 replies to this topic

Poll: Are you interested in booting Windows from VHD? (83 member(s) have cast votes)

Would you try to install OS to and boot from a single portable VHD file (virtual disk) instead of hard drive?

  1. Yes (80 votes [96.39%])

    Percentage of vote: 96.39%

  2. No (3 votes [3.61%])

    Percentage of vote: 3.61%

Would you be interested to copy that VHD file to an empty USB Thumb or HD and boot from it on real PC?

  1. Yes (80 votes [98.77%])

    Percentage of vote: 98.77%

  2. No (1 votes [1.23%])

    Percentage of vote: 1.23%

Did you try to boot OS from VHD on real PC instead of Virtual Machine?

  1. Yes, I usually boot VHDs saved on an internal hard drive (34 votes [37.36%])

    Percentage of vote: 37.36%

  2. Yes, I usually boot VHDs saved on a USB drive or thumb (11 votes [12.09%])

    Percentage of vote: 12.09%

  3. Yes, I boot VHDs saved on drives of any type (12 votes [13.19%])

    Percentage of vote: 13.19%

  4. Not yet (34 votes [37.36%])

    Percentage of vote: 37.36%

Vote Guests cannot vote

#251 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 24 December 2011 - 01:55 PM

Its interesting, whether your current UI will reflect the same disk differently before and after Compaction for each case: when one, or another, or both of the operation options are selected by a user? ../public/style_emoticons/default/character44.gif


Well, at present, you have to reload the disk to see the difference. (If that's what you mean). And you can't actually pick which type of compaction, it runs both in sequence.

#252 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 24 December 2011 - 02:22 PM

Yep, MAC school shows up across these pics, shifting information payload to visual representation, but it doesn't have to be iPhone style, unless for an app version adapted for portable devices. Many desktop users complain about Win8 forcing mobile interface. :) I like the last one pic below, how it shows VHD Disk Internal Fragmentation & space occupation by Volumes - if I understood right. Though each Volume Fragmentation needs to be added - may be on the Volume itself like in PartitionGuru, otherwise it looks like too many identical lines, and the volume pic area remains almost unused. Grey background is OK, but I was wondering, if its a good idea for each VHD to have own background color - unless it would distract user attention or create visual clutter.

Some of the above pics also clearly divide the disk on 3 zones: Header, Volume, Footer. Depicting OS type in the Footer also looks nice, but the OS Logo could be smaller. Ladies Shoes might destruct a user attention though. :smiling9: Generally, good look and feel sell products a lot easier, almost themselves, and of course Steve's "Just Works" formula, which also implies as much as the lack of bugs, the team understanding of mass user needs and expectations for a certain product functionality, and active formation of such.

Posted Image

What's missing so far is the depiction of VHD File Fragmentation on its Hard Drive. It might require adding a Hard Drive image on the background, which would also help to visualize relative size of the VHD compare to HD size, and available free space to add more VHDs to that drive. Once HDs are added to the pic, a challenge would be to show them proportionally to their size (say 500Gb HD is shorter than 2Tb HD) - possibly in a form of some extra footer with HD size shown in it.

OR, it will look better and simplify picture comprehension, if depicting a HD separately, with all its VHDs shown on it proportionally to their size with Identicons, and total HD space fragmentation depicted. It would allow to figure out, if the HD must be defraged before more VHDs can be added to it, and if they will fit anyway. :lightbulb: I.e., it can be done similar to Volume depiction, but only showing VHD Disks on a hard drive instead of Volumes on a virtual drive.

#253 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 24 December 2011 - 02:26 PM

Almost forget to mention, MS updated Server 2005 VHDMount drivers to make them compatible with Server 2008 and Vista. The same drivers also work for most part in Win7, as explained in linked in the above post Blog. Nonetheless, MS Server 2008R2 & Win7 seems to use a completely different set of VHD drivers, and from a user prospective one difference is the ability to hot-swap a VHD image mounted by Win7 Bootmrg to allow Native Boot. It remains to be investigated, whether the older drivers can be adapted for that need, thus allowing to boot WinXP & Vista natively from VHD. Or, the newer drivers can be ported back to older OS versions. :wodoo:

See also VHD BCD Store Challenge: Chainload Bootmgr .


As to making Input Forms more functional from info and options payload standpoint, these suggestions may follow once the whole product functionality becomes more structured (in users mind). :) I wonder, if it's possible though to enrich the Input Forms like Expand shown above? And were's Defrag option in context Menu? :dubbio:

It seems, Safary doesn't play nicely with this forum Smileys, especially in post citations. Unless you use IE in VMWare. :3th:

#254 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 25 December 2011 - 01:12 PM

Posted Image

#255 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 25 December 2011 - 01:49 PM

Merry Christmas!

Nice holiday version of the Director. :thumbsup:

Now I see that space inside a Volume pic can be fully occupied by text. Btw, the text would better show Volume name & drive letter (if assigned) instead of Partition #. :smiling9:

#256 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 25 December 2011 - 01:54 PM

Hmm... I use Firefox rather than Safari, not noted any problems with smileys... except perhaps there's no way to disable them permanently :)

I understand exactly what you mean by "defragmentation of VHD file", and I even have the code to that information. But how to get that information across to the users....

There are three types of fragmentation:
  • fragmentation of VHD backing store (what we are talking about right now)
  • fragmentation of VHD BAT (the 2MB blocks appended to Dynamic disks are probably *not* going to be in order)
  • fragmentation of the files contained within the VHD.
The three bars I have at present, really don't show fragmentation ... not exactly, anyway. They just show "which parts of the disk are being used."

That's certainly similar, (it's basically the view from a defrag program with only 1 color). The bar in the partition is basically just the relevant section of the disk usage bar.

One way to show #1 AND #2 fragmentation, would be for the disk usage bar to be a gradient (say, from green to red), with the colors based on the physical position of the 2MB block on disk. That way a defragmented VHD file would be a smooth green to red bar, and a high fragmented VHD file would show up as jumbles of red and green. So, for example, if your VHD was in perfect order (e.g., a fresh disk2vhd image), but half of the VHD was at the start of the drive, and the other half was at the end, there would be a sudden jump in the color gradient.

I wonder, if it's possible though to enrich the Input Forms like Expand shown above?


You know it's possible, but can you think of what to add?

And were's Defrag option in context Menu?


I had an idea about that. Since most of the things you can do to a partition can be done by existing programs once the VHD is mounted, it would be easier to create a user-editable configuration file to allow greater flexability:
eg:

PartitionContextOption "Defrag"
Label "Defragment Volume"
Arguments "-d -q V:"
Program "mydefrag.exe"
DownloadUrl "http://www.mydefrag.....com/download/"


PartitionContextOption "Format NTFS"
Label "Format Volume"
Program "format.exe"
Arguments "-q -f NTFS v:"

PartitionContextOption "Check"
Label "Check Disk"
Program "chkdsk.exe"
Arguments "-f V:"

PartitionContextOption "Bootloader"
Label "Add NT6.0 Bootloader"
Program "bootcfg.exe"
Arguments "NT6 V:"


DiskContextOption "MBR"
Label "Fix MBR"
Program "fixmbr.exe"
Arguments "/mbr V:"

and so forth. My examples are all incorrect, but you get the idea. A lot of these could be preset, with the option to download "plugins" from 3rd parties. The plugins could contain extra menu entries, along additional executables, scripts, and anything else. (eg, some elements of IMG_XP could easily be converted into such a format).

In other words, I really can't be bothered hard coding in a stack of features that already have solutions.

#257 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 25 December 2011 - 01:55 PM

Volume name & drive letter (if assigned) instead of Partition #.


Yeah, that was just "filler" text. No way to show drive letter until it's mounted though. For the thin partitions, I think the best thing would be:

NTFS
12 GB

Not much room for anything else.

#258 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 25 December 2011 - 02:02 PM

A lot of these could be preset, with the option to download "plugins" from 3rd parties. The plugins could contain extra menu entries, along additional executables, scripts, and anything else. (eg, some elements of IMG_XP could easily be converted into such a format).


It wouldn't be hard to get a little more advanced with the configuration files, and have it display a dialog box asking for certain inputs.... In this case, I am imagining "WIM2VHD" being implemented purely as a plugin, complete with "Browse for ISO" and other such required inputs being generated automatically.

#259 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 25 December 2011 - 02:04 PM

Almost forget to mention, MS updated Server 2005 VHDMount drivers to make them compatible with Server 2008 and Vista.


Ahh, that would explain why the version I was using on my 2008 R2 development server worked, but when testing the auto-download-and-install-vhd-mount feature of VHD Director in Windows 7, it failed to install. (I was using the original SP1 URL, which is an earlier version than I have on my 2008 R2 dev box).

Unless you are talking about a recent update? The latest version available when I was coding that feature was still from 2009.

#260 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 25 December 2011 - 02:17 PM

Yes, Preset Configuration & Plugins is a broadly used practical solution. :thumbsup: Special care should be given to selection of compatible plugins, and some of them would have to be "in-house" developed (un)fortunately. :hmm:

I wonder, if Primary Volumes inside a VHD can be differentiated by color from Logical Volumes? Suggestions on enriching Input Forms may start coming a bit later.

As to depicting a VHD File fragmentation, one might want to look at the task in context - when its important, for what purpose:

- to ensure contiguity of VHDs that can't be booted natively by Win7 Bootmgr, which supports booting non-continuous VHDs
- when attempting to add more VHDs to a (external) hard drive with limited free space

Thus, a separate depiction of a hard drive with multiple VHDs on it is desirable. It can look similar to a VHD Drive depiction, with the only difference being showing VHD Files on it instead of Volumes inside a VHD Drive. It can be differentiated easily by presence of VHD Identicons on it. That would allow to depict a similar Bar showing Hard Disk usage. That way several Hard Disks can be mounted inside VHD Director, each showing VHDs saved on it. See also PM for some details. :suda:

Speaking of VHDMount update, MS decided to actively block VHDMount install in Win7 & Server 2008R2 rather than update it. The reason AFAIK was usage of a different set of VHD drivers (just look in Device Management) - the drivers supporting Native Boot from VHD. Can they be used & ported to WinXP & Vista - its an open question... But if you want to install the only mentioned above VHDMount drivers update into Win7 & Server 2008R2, just follow this Tutorial, and see if they can support Native Boot, i.e. hot-swap a mounted VHD from Bootmgr. Note, after installing the Update in Vista & Server 2008, one must manually update VHD driver in Device Manager for new drivers to work. Posted Image

Was talking about this Smiley vanished in forum quotes.

#261 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 26 December 2011 - 01:11 PM

Posted Image

#262 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 26 December 2011 - 01:31 PM

Yes, Preset Configuration & Plugins is a broadly used practical solution. :thumbsup: Special care should be given to selection of compatible plugins, and some of them would have to be "in-house" developed (un)fortunately. :hmm:


Possibly. But I might develop them as plugins, for example purposes.

I wonder, if Primary Volumes inside a VHD can be differentiated by color from Logical Volumes? Suggestions on enriching Input Forms may start coming a bit later.


I spent the first 3 weeks of my "Windows 7 Out of the Box Experience" trying to get GUID Partition Tables / UEFI working. There are no "Logical Volumes" in GPT. So I admit that I hadn't really thought they existed anymore.

They certainly won't work with VHD Director at present, since I'm reading the MBR for the standard 4 partitions. If there is support in DiscUtils for them, it might be do-able. But FTR, I consider them slightly less important than GUID partitioning. And I'm not in a rush to implement that difficult task (Imagine 120 odd partitions in 1 VHD, how horrid).

As to depicting a VHD File fragmentation, one might want to look at the task in context - when its important, for what purpose:


I decided that fragmentation need be nothing more complex than a "It's [60%] fragmented" or "It's contiguous" display item. More information could be shown if you hover/click. After all, if you need a perfectly contiguous VHD to boot, then that's all you need to know.

- when attempting to add more VHDs to a (external) hard drive with limited free space


Well, while I can certainly check the largest available chunk of free space on the drive, I'm not sure I can guarantee that a new VHD will end up there. That's up to the operating system. Either way, I'd schedule that as a "next release" feature.

Thus, a separate depiction of a hard drive with multiple VHDs on it is desirable. It can look similar to a VHD Drive depiction, with the only difference being showing VHD Files on it instead of Volumes inside a VHD Drive. It can be differentiated easily by presence of VHD Identicons on it. That would allow to depict a similar Bar showing Hard Disk usage. That way several Hard Disks can be mounted inside VHD Director, each showing VHDs saved on it. See also PM for some details. :suda:


Not sure I can visual what you mean... draw me a picture in paint.net.

Speaking of VHDMount update, MS decided to actively block VHDMount install in Win7 & Server 2008R2 rather than update it. The reason AFAIK was usage of a different set of VHD drivers (just look in Device Management) - the drivers supporting Native Boot from VHD. Can they be used & ported to WinXP & Vista - its an open question... But if you want to install the only mentioned above VHDMount drivers update into Win7 & Server 2008R2, just follow this Tutorial, and see if they can support Native Boot, i.e. hot-swap a mounted VHD from Bootmgr. Note, after installing the Update in Vista & Server



That's interesting. Did they block it in the operating system, or in the VHDMount (Virtual Server) updates? It certainly is a totally different way to mount a VHD, and totally different backend drivers. But I like it - it has an inbuilt "commit" flag when you close the VHD, just like mounting a WIM.

I don't really think it's the kind of driver that would ever work as "bootable" anyway.

Was talking about this Smiley vanished in forum quotes.


Ahh, I think it just quoted funny. I don't recall anything strange in the original posting.

#263 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 26 December 2011 - 03:32 PM

Hi sfinktah,

What I meant under Magnifying Glass feature is BlockViewer type function showing file names in sectors zoomed with the Glass (possibly shown inside that Glass Circle rather than in a separate Form or Stripe), proven extremely useful to figure out WTF defrag problems, and also assess prospects of adding another VHD to that HD in a contiguous way. :)


Posted Image

#264 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 26 December 2011 - 04:00 PM

I spent the first 3 weeks of my "Windows 7 Out of the Box Experience" trying to get GUID Partition Tables / UEFI working. There are no "Logical Volumes" in GPT.

Could you explain main advantages of GUID Partitioning Scheme? MBR based partitioning remains prevalent in Windows world, for which VHD Director seems currently being developed, but it may gradually change overtime, unless you target portable EFI devices now. :confused1: We can safely set the limit of 3 Primary and 4 Logical partitions in one Extended to depict fully (not symbolically), as most users wouldn't reach that target in Windows systems. Would be also nice to differentiate a Basic Volume from Dynamic. Of course, Disk Partitioning offers a broader variety, but this indeed might wait for a next release. :huh: OR, it might be enough to just highlight Bootable Volumes on a VHD, marking each with OS logo, without details on partition type.

While I can certainly check the largest available chunk of free space on the drive, I'm not sure I can guarantee that a new VHD will end up there.

It will, at least in current NTFS. But VHD Director may suggest whether defrag is required and space is sufficient to place a target extra VHD on the drive. For that to happen, a depiction of current state (several VHDs on the drive & the drive overall fragmentation pic) would help, also highlighting non-contiguous VHDs. I can try to draw that, but don't expect my painting skills be close to yours. :)

My assumption also is, most users would place several VHDs on an empty Volume or a dedicated to service or other tasks removable & networked HD, so there wouldn't be other large files present on it. Even if they are, for the purpose of adding an extra VHD to the drive its enough to show how many VHDs are currently stored on it (while disregarding other files), highlight non-contiguous, and depict HD fragmentation level like above.

Did they block it in the operating system, or in the VHDMount (Virtual Server) updates?

It was purposely blocked on OS side based on the above Tutorial, but installable by following it. Current Win7 & Server 2008R2 VHD drivers are also dated back to 2006, while updated to present OS version. This probably means, one set was acquired with Virtual PC, and another developed in-house, or such... Consider using MS drivers supporting Native Boot if possible instead of VHDMount drivers, because they are present in Win7, and can possibly be ported to WinXP, thus enabling its native boot from VHD (just dreaming). But again, it may be the task for a (distant) future release. :dubbio:

#265 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 27 December 2011 - 06:26 AM

Here's a very rough picture of a hard drive with multiple VHDs, allowing to figure out which ones are non-contiguous, and whether an extra VHD can be added with or without defrag. Current NTFS attempts to write a contiguous file, where possible.

Posted Image

Btw, Paint.net feels somewhat truncated, probably due to first time use. Couldn't figure out, how to increase Eraser size. :) Well, instead of letters its better to use a similar Fragmentation Bar on each VHD file, and show file size.

Next time I'll probably write a defragger code, otherwise we are stuck. :doh7:

#266 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 27 December 2011 - 07:27 AM

Posted Image

#267 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 27 December 2011 - 08:00 AM

What I meant under Magnifying Glass feature is BlockViewer type function showing file names in sectors zoomed with the Glass (possibly shown inside that Glass Circle rather than in a separate Form or Stripe), proven extremely useful to figure out WTF defrag problems, and also assess prospects of adding another VHD to that HD in a contiguous way.


I have the block display already, and can easily add the "Files in this cluster" view (as seen in your favourite defragger). But there is a loading delay, so it would have to be a context menu option. Is there really any need for it in the partition view though? Is this another of those G4D contiguous requirements? If so, I could probably add the red squares for fragmented files aswell.

And I take it you would want the same thing done for the real filesystem. That's totally different code. Fortunately, I've also written that :)

Could you explain main advantages of GUID Partitioning Scheme? MBR based partitioning remains prevalent in Windows world, for which VHD Director seems currently being developed, but it may gradually change overtime, unless you target portable EFI devices now. ../public/style_emoticons/default/confused1.gif We can safely set the limit of 3 Primary and 4 Logical partitions in one Extended to depict fully (not symbolically), as most users wouldn't reach that target in Windows systems. Would be also nice to differentiate a Basic Volume from Dynamic. Of course, Disk Partitioning offers a broader variety, but this indeed might wait for a next release. ../public/style_emoticons/default/huh.png OR, it might be enough to just highlight Bootable Volumes on a VHD, marking each with OS logo, without details on partition type.


I don't believe you can have dynamic volumes in a VHD.

GUID partitioning is a *requirement* for large disks. A disk that is greater than 2TB in size needs to be formatted with GPT. This is probably going to be a non-issue, since the VHD documentation says that 2TB is the limit. GUID partitioning is also used by some Linux distributions, and by Macintosh. However. that would probably only be relevant for people using VHDs for virtualization.


Consider using MS drivers supporting Native Boot if possible instead of VHDMount drivers, because they are present in Win7, and can possibly be ported to WinXP, thus enabling its native boot from VHD (just dreaming). But again, it may be the task for a (distant) future release.


When I have to use the Windows API, it's always the "real" Windows 7 / 2008 R2 driver. I did develop some VHDMount based "attach/detach" code to allow VHD Director to function on XP, Vista, and Server 2003, but it's not currently in use.

I think I have used too many APIs that XP doesn't support (or at least, support fully) for there to be an XP version of VHD DIrector - I'd have to check. Certainly Expanding and Compacting would not be available.

Btw, Paint.net feels somewhat truncated, probably due to first time use. Couldn't figure out, how to increase Eraser size. ../public/style_emoticons/default/smile.png Well, instead of letters its better to use a similar Fragmentation Bar on each VHD file, and show file size.


Personally, I use Photoshop CS4, but I thought you might appreciate something a little better than MSPAINT.EXE to work with. :P The results came out well though.

How would the display you pictured operated if there was fragmentation though,

Posted Image

Next time I'll probably write a defragger code, otherwise we are stuck. ../public/style_emoticons/default/doh7.gif


What would you write it in?

#268 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 27 December 2011 - 01:48 PM

Test of BBCode to HTML converter (for VHD Director's plugin configuration).
Arial, Courier, Lucidia, Tahoma. 24pt. Normal. Red Text. Stupid Smiley
  • :)
  • :cold:
  • :loleverybody:
Indentation



Once

Once

Twice

  • Thrice
  • with
  • points

		static public void Example() {

			DownloadUnpackForm f = new DownloadUnpackForm();  

			f.DownloadName = "Contig";													  // This will be used in form names and dialog boxes as "the name" of the *thing* we are downloading

			f.DownloadUrl = "http://download.sysinternals.com/Files/Contig.zip";			// This will require ZIP procressing

			f.DownloadUrl = "http://live.sysinternals.com/Contig.exe";					  // (and easy .exe install)

			f.DownloadPage = "http://technet.microsoft.com/en-us/sysinternals/bb897428";	// This will be shown if automatic download fails

			f.DownloadDescriptionBBCode = "(this post)";

			f.Show();

		}


Who can use it?
As this parser is written in C#, it can be used in any .NET-Language like C# or VB.NET. The reason why we wrote it is that all existing BBCode-parsers for .NET seem to be very buggy and immature. Now we don't have trouble anymore.

CodeKicker

Spoiler


#269 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 27 December 2011 - 01:54 PM

I thought you might appreciate something a little better than MSPAINT.EXE to work with. :P

Yes, this might be my 1st painting experience ever - thank you! :beer:

How would the display you pictured operated if there was fragmentation though


Posted Image


It would operate like this, unless you'll deliver Drag-n-Drop feature to defrag and rearrange fragmented VHD files, then consolidate free space without fragmenting the VHDs again. :lightbulb: Fixed & Dynamic VHD marks need to be added though, since there may be no advantage in defragging dynamic VHDs except to consolidate free space.

Posted Image

Posted Image

What would you write it in?

In Assembler. :lamo: But mostly exclamations... :sos: Never underestimate your opponent though... :superstition: See PM for details.

#270 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 27 December 2011 - 05:29 PM

I have the block display already, and can easily add the "Files in this cluster" view (as seen in your favourite defragger). But there is a loading delay, so it would have to be a context menu option. Is there really any need for it in the partition view though?

There is a need, when you want to shrink a VHD, and need to figure out what may prevent max shrinking effect (like MFT at the end of one volume, promting to defrag it first). But Magnifier Glass feature itself would be open separately, hence no need for a duplicate Context Menu entry. Viewing File names inside the Glass is desirable (for a Mac fun like me) :).

GUID partitioning is a *requirement* for large disks. However, that would probably only be relevant for people using VHDs for virtualization.

And that's another thing to think about... :dubbio:

I did develop some VHDMount based "attach/detach" code to allow VHD Director to function on XP, Vista, and Server 2003, but it's not currently in use.

I have used too many APIs that XP doesn't support (or at least, support fully) for there to be an XP version of VHD DIrector - I'd have to check.

I used before a truncated 1.5Gb WinXP VHD for service tasks, but after ThinPC 7 came along, given its 3Gb footprint I turned to it for testing due to notable advantages, and the possibility to enable Native Boot. :heh:

#271 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 28 December 2011 - 05:58 AM

This is a draft for what a plugin will look like... I was going to do it in XML, but I thought this might be a little less painful.


{

    Context = {

        VirtualDisk = {

            Disabled = NO;

            Label = Contig;

            Tooltip = "Defragment VHD file on disk";

            ProgramExecutable = "plugins/contig/contig.exe";

            ProgramArguments = "-v %VHD_FILE%";

            "ProgramWorkingDirectory" = "";

        };

    };

    Download = {

        BundleName = "com.sysinternals.live.contig";

        InstalledFileCheck = "plugins/contig/contig.exe";

        Name = Contig;

        DownloadUrl = "http://live.sysinternals.com/Contig.exe";

        ManualDownloadUrl = "http://technet.microsoft.com/en-us/sysinternals/bb897428";

        Description = "[i]Contig[/i] is a single-file defragmenter that attempts to make files contiguous on disk. Its perfect for quickly optimizing files that are continuously becoming fragmented, or that you want to ensure are in as few fragments as possible.nn[i]Contig[/i] can be used to defrag an existing file, or to create a new file of a specified size and name, optimizing its placement on disk. Contig uses standard Windows defragmentation APIs so it won't cause disk corruption, even if you terminate it while its running.";

        DownloadTo = "plugins/contig/contig.exe";

    };

}



#272 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 28 December 2011 - 06:40 AM

Another defrag tool worth consideration:

Posted Image
Posted Image

#273 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 28 December 2011 - 08:02 PM

Another defrag tool worth consideration: UltraDefrtag. Can defragment system and metafiles...

Would be interesting to look into it. :) But it seems to use the same Windows Defrag API, and has serious limitations when it comes to defragging online locked NTFS service files on non-system drives, offering Boot Time Defrag instead. Besides, it doesn't claim to leave large files in one piece while doing disk optimization, which is the only option offered to consolidate free space from UI. In addition, it installs into Windows (not Programs) directory. :dubbio:

Window Embedded & ThinPC discussion was moved to a dedicated thread.

#274 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 29 December 2011 - 02:04 AM

But it seems to use the same Windows Defrag API


Well, I got the latest source code for it (which I couldn't find for MyDefrag, got JkDebug source instead), which helped me fix my clusterview of C: (never could open drive C: for some reason). I will have to check the source code for boot time defrag - am very curious whether it "cheats" (avoid the usage of API).

since vhd is always "preboot" when not attached, might be a lesson in there.

#275 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 29 December 2011 - 03:08 AM

I wrote the code to count how many pieces a VHD was fragmented in, and I offer you this shiny icon:

Posted Image





Also tagged with one or more of these keywords: vhd, bare metal, boot, win 7, grub4dos

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users