
Booting from VHD in Grub4DOS
#1
Posted 10 September 2011 - 07:50 PM
Apparently, booting Static VHDs is supported in theory by Grub4DOS, while booting Dynamic is not. Is there a way for Grub4DOS developers to explain rational here, and may be add this feature in the future?
I was particularly intrigued by this: "No GRUB4DOS map when you boot direct from VHD. Just chainloader /bootmgr". Anyone tried to actually boot Windows 7 from VHD with Grub4DOS? Can you share your working G4D VHD Menu section?
- ZEE likes this
#2
Posted 11 September 2011 - 09:33 AM
A static .vhd is nothing but a RAW image with a single sector appended to it.
grub4dos DOES NOT support .vhd format, simply it supports RAW (or dd-like) ones, and a static .vhd is to all what grub4dos is concerned a RAW image.
Booting Windows7 from .vhd (only some editions allow this) is "independant" from grub4dos, it is a feature of some versions of the OS, the .vhd image is loaded by an (external) BOOTMGR+/boot/bcd, see:
http://www.msfn.org/...mazing-concept/
http://reboot.pro/6982/
So you don't need a grub4dos mapping, since the BOOTMGR and /boot/BCD are "external" and the mappping is done internally by Windows 7 files.
By using a different driver/setup you can use it also on non-enabled versions, through grub4dos mapping and a driver like firadisk or other ones, but this is not actually ".vhd booting" it is "RAW image booting", as only the "RAW" part of the .vhd (static) is used.

Wonko
- ZEE likes this
#3
Posted 11 September 2011 - 11:55 AM
With vBoot you can boot a Dynamic VHD, VDI, VMDK etc with Windows XP, Windows 7 etc.
I am not exactly aware of the technical differences between the two, but i have been using vBoot for quite a log time now to boot from VHDs.
http://www.vmlite.co...d=51&Itemid=148
- ZEE likes this
#4
Posted 11 September 2011 - 01:23 PM
Not sure about the Grub4DOS, But there is a tool called vBoot that is actually a variant of Grub2.
With vBoot you can boot a Dynamic VHD, VDI, VMDK etc with Windows XP, Windows 7 etc.
I am not exactly aware of the technical differences between the two, but i have been using vBoot for quite a log time now to boot from VHDs.
http://www.vmlite.co...d=51&Itemid=148
Besides the technical deifferences, I am aware of the economical ones.
grub4dos is freeware, vBoot is Commercial.
So, I see exactly 79 reasons to not use it:
http://www.vmlite.com/order.html

Wonko
- JonnyHotkeys likes this
#5
Posted 11 September 2011 - 01:36 PM
Yet it was not a question of this thread. No answer in the above linked threads either. The question was, how to boot VHD via Grub4DOS (even if not strictly required)? Can someone post a working Grub4DOS Menu section for booting Win 7 64-bit Ultimate from a VHD file? Make sure you tested it yourself before posting - of course you would need a PC specked high enough to support non-truncated Win 7 booting...

#6
Posted 11 September 2011 - 02:20 PM
But, AGAIN, native Windows 7 VHD booting goes through BOOTMGR and an entry dedicated to it to this effect in \boot\BCD.Yet it was not a question of this thread. No answer in the above linked threads either. The question was, how to boot VHD via Grub4DOS (even if not strictly required)? Can someone post a working Grub4DOS Menu section for booting Win 7 64-bit Ultimate from a VHD file? Make sure you tested it yourself before posting - of course you would need a PC specked high enough to support non-truncated Win 7 booting...
It is NOT about VHD booting, it is about booting WINDOWS 7 on VHD.
Normally you have:
C:\BOOTMGR
C:\boot\BCD
C:\Myl33t7.vhd
The booting sequence is as follows:
BIOS->MBR->Active partition bootsector->BOOTMGR->BCD choice mapping C:\Myl33t7.vhd
You can insert grub4dos in any point BEFORE BOOTMGR.
IF you want to have the BOOTMGR and \boot\BCD INSIDE the .vhd, as long as the .vhd is static, you just map the .vhd in grub4dos and chainload the BOOTMGR in it:
find --set-root /Myl33t7.vhd map /Myl33t7.vhd (hd31) root (hd31) chainload /BOOTMGR boot
The grub4dos mapping is only used in the initial part of the setup to aloow the loading of BOOTMGR and BCD.
The demand

If you are willing to donate suitable hardware and a valid license for it I may actually test it.


Wonko
- bluespy and ZEE like this
#7
Posted 11 September 2011 - 02:50 PM
You contributed to these forums so much over the years, it makes perfect sense to open a Donation Thread on this forum to give you a chance to upgrade your Commodore.

OK, I got it. You suggest to add a BCD entry for the Win 7 on VHD before attempting to boot OS from the VHD with Grub4DOS - is that right? Its kind of strange in two dimensions:
- booting Win 7 from images with Grub4DOS generally doesn't require adding a BCD entry for each OS inside these images, including Win 7;
- the above karionix's citation says "No GRUB4DOS mapping required when booting OS from VHD", so why did you include Map command in your Menu section? See, that's where TEST before claim clause becomes reasonable...
Unless I'm missing something...or everything...

#8
Posted 11 September 2011 - 03:09 PM
The second you said.Unless I'm missing something...or everything...
In the quoted thread Karyonix is referring to the "normal" way, with the BOOTMGR and /boot/BCD OUTSIDE the .vhd.
The mapping can only be useful AS SAID if you for any reason need to have the BOOTMGR and /boot/BCD INSIDE the .vhd (and I DID NOT "suggest" it, I gave it as a possible alternative and to explain how the grub4dos mapping is normally UNneeded)
I have no more ways to try and explain this to you unfortunately.

See if you can re-read this part of my post ONLY:
this corresponds to what Karyonix was talking about (no mapping in grub4dos needed at all)But, AGAIN, native Windows 7 VHD booting goes through BOOTMGR and an entry dedicated to it to this effect in \boot\BCD.
It is NOT about VHD booting, it is about booting WINDOWS 7 on VHD.
Normally you have:
C:\BOOTMGR
C:\boot\BCD
C:\Myl33t7.vhd
The booting sequence is as follows:
BIOS->MBR->Active partition bootsector->BOOTMGR->BCD choice mapping C:\Myl33t7.vhd
You can insert grub4dos in any point BEFORE BOOTMGR.

Wonko
#9
Posted 11 September 2011 - 03:27 PM
Are you suggesting that at OS Install or Restore from Backup to a VHD disk, BOOTMGR and boot/BCD won't be automatically added on that VHD disk, but instead will replace similar files on the main HD? If that's the case, how to add them at install or later onto VHD rather than on HD?
#10
Posted 11 September 2011 - 03:51 PM
Is it really so difficult?OK... Is adding OS on VHD entry to BCD mandatory, before booting OS from VHD with Grub4DOS? Or Grub4DOS mapping can be used INSTEAD, as usually done with OS booting from an image? It looks, you're pointing towards these 2 options.

So you don't need a grub4dos mapping, since the BOOTMGR and /boot/BCD are "external" and the mappping is done internally by Windows 7 files.
By using a different driver/setup you can use it also on non-enabled versions, through grub4dos mapping and a driver like firadisk or other ones, but this is not actually ".vhd booting" it is "RAW image booting", as only the "RAW" part of the .vhd (static) is used.
- You DO NOT need grub4dos mapping at all for native windows 7 VHD booting.
- You may use grub4dos mapping (as explained) IF you wish to use the /boot/BCD inside the .vhd and use native Windows 7 VHD booting.
- You NEED to use grub4dos mapping (and another driver, just as you need one for XP .vhd booting.) if you DO NOT WANT to use native Windows 7 VHD booting
No, I am NOT suggesting anything I am writing things in an as plain English as I can, and I evidently completely fail.Are you suggesting that at OS Install or Restore from Backup to a VHD disk, BOOTMGR and boot/BCD won't be automatically added on that VHD disk, but instead will replace similar files on the main HD? If that's the case, how to add them at install or later onto VHD rather than on HD?


Wonko
#11
Posted 11 September 2011 - 06:46 PM
Now I read it again, and it sounds clearer this time.


As to adding more entries to BCD, I don't see its beneficial for my task in any way. I want to create several Differencing VHDs after making a Base VHD, so actual booting will be done from any of these (except its prohibited from the Base). There is no point to add them all to BCD Menu. The idea was to hide them under Grub4DOS entry in BCD Menu. And Map command appears to deliver that choice.

#12
Posted 12 September 2011 - 05:48 PM
#13
Posted 12 September 2011 - 06:12 PM
Since a Differencing VHD is expandable, i.e. dynamic in that sense, is it possible to boot it with G4D?
Any difficult part in:
re-bolded for your convenience.grub4dos DOES NOT support .vhd format, simply it supports RAW (or dd-like) ones, and a static .vhd is to all what grub4dos is concerned a RAW image.

Let's see in a FAQ/FGA form:
Q1. Can grub4dos map/access a .vhd image?
A1. Yes, but ONLY if it is a "static" .vhd, as grub4dos DOES NOT suport the .vhd format, for a mere coincidence the static .vhd format is a RAW image with a single sector appended (which is ignored by grub4dos)
Q2. So can grub4dos map/access a "dynamic" .vhd image?
A2. NO, see above.
Q3. So can grub4dos map/access a "differencing" .vhd image?
A3. NO, see above.
Q4. So can grub4dos map/access any kind of .vhd one but the "static" one?
A4. NO, see above.
Q5 So, can grub4dos map .vhd images?
A5. Loop to Q1.
I don't see how in ANY wayIf not, can this thread's approach of manipulating bootmgr and BCD in RAM to boot any Differencing VHD via Grub4DOS - BCD chain would do (its generic enough, not only for booting wims)? In this scenario, actual physical system volume BCD would remain clean, and wouldn't contain any VHD records.

http://reboot.pro/8043/
could of any use in a .vhd using context.
Maybe you could expand on your line of thought, like it is I simply cannot understand (besides the use of RAM patching BOOTMGR) what the heck are you trying to say.

If possible post an example of what you would like to accomplish, with as much description as you can.

Wonko
#14
Posted 12 September 2011 - 08:37 PM
Guess what: I'm tolerant enough today to deal with you.

What I mean in the above post, BCD supports booting differencing VHDs. But there is no need to modify BCD on permanent basis (in my case) by adding to it several dif. VHD entries. What if we can modify BCD dynamically in RAM by selecting an appropriate Menu entry in Grub4DOS, in which instructions are given to temp modify BCD in RAM by adding a certain differencing VHD entry to it, and then switch control to that modded BCD in RAM to boot the diff. VHD. Similar to what Steve did for booting various .wim versions in the above thread, as I understand. This would allow to keep BCD store untouched on physical disk, while booting via Grub4DOS to any VHD type.
OR, even after adding all diff. VHDs to the BCD (these options can be hidden on BCD Boot Menu), how to trick BCD to boot any of them from G4D? Anyone can give an example of G4D Menu section for that?
Now, when you try to criticize others who simply look for a solution, re-cone for a moment how much coding you actually done yourself (!?)... I know, its an old story, but we'll have to go back to it, if you insist.

#15
Posted 13 September 2011 - 08:57 AM
Yes, but the actual post you referenced was about doing minor patches to the BOOTMGR.What I mean in the above post, BCD supports booting differencing VHDs. But there is no need to modify BCD on permanent basis (in my case) by adding to it several dif. VHD entries. What if we can modify BCD dynamically in RAM by selecting an appropriate Menu entry in Grub4DOS, in which instructions are given to temp modify BCD in RAM by adding a certain differencing VHD entry to it, and then switch control to that modded BCD in RAM to boot the diff. VHD. Similar to what Steve did for booting various .wim versions in the above thread, as I understand. This would allow to keep BCD store untouched on physical disk, while booting via Grub4DOS to any VHD type.
OR, even after adding all diff. VHDs to the BCD (these options can be hidden on BCD Boot Menu), how to trick BCD to boot any of them from G4D? Anyone can give an example of G4D Menu section for that?
Editing the /boot/BCD is entirely different (and more complex thing).
The BCD is a Registry hive, and though of course someone could write a grub4dos program to read and map it, it would probably be a lot of work.
Binary editing a BCD to add entries seems to me not feasible.
But if all you want is a "hidden" or "separate" BCD of some kind (or a set of different BCD's), as posted there there is an easy solution by using a BOOTMGR/BCD floppy image.
Look, first thing I am using a ZX81 and NOT a Commodore.See, everything is dynamically expending in life, including software features, like Grub4DOS. But may be you're frozen in time a bit - it happens with age... While you type on your Commodore "it can't be done", REAL developers are busy adding these features. Look no further then Vboot...
Second thing nothing is impossible, what I am pointing out to you is that TODAY grub4dos has some features that do not include what you wish.
Vboot seemingly has them

It is very possible that in FUTURE grub4dos (or an entirely new tool or Syslinux/Memdisk/Etc.) are enhanced to add the features you would like to have, but this has not happened today. (no more, no less).

Wonko
#16
Posted 13 September 2011 - 12:02 PM
Anyone can offer G4D Menu sequence for that?
Talking about using Floppy images with different BCD & bootmgr versions, what exactly should be included on such an image? Can you link a sample floppy image for that?
#17
Posted 13 September 2011 - 02:51 PM
.wim's are supported by BOOTMGR.But in the above referenced thread they reported success in about the same task of modding BCD / BOOTMGR in RAM depending on the .wim image (or linked to it BCD version) selected to boot in G4D - did they? How booting differencing VHDs is different from booting wims that way?
Anyone can offer G4D Menu sequence for that?
.vhd's are supported ONLY on some versions of Windows 7 (Native .vhd booting)
No .wim nor .vhd is mapped in grub4dos in the mentioned thread.
EVERYTHING in the mentioned thread is connected to features connected to Windows "internal" functionalities, that are tweaked by using grub4dos, but that do NOT use any grub4dos mapping for the .vhd or .wim.
There is NO "grub4dos" sequence, as in that thread grub4dos is not actually used in booting if not to chainload the "ordinary" BOOTMGR, the actual use suggested is that as a replacement for "previously" hexediting/patching the BOOTMGR.
In other words in that thread grub4dos is used as a command line hex-ediitor "on the fly".
And still that thread has nothing connected to .vhd booting.
I can do better than this, point you to where the idea is explained in detail:Talking about using Floppy images with different BCD & bootmgr versions, what exactly should be included on such an image? Can you link a sample floppy image for that?
http://www.multiboot....uk/floppy.html

Wonko
#18
Posted 14 September 2011 - 12:31 AM

As to using Floppy images instead of finicky looking G4D menu sections - yes, this seems to be better suited for non-programmers. But it remains to be seen, if its possible to use exactly same technique to boot VHDs - will try anyway. Btw, what these Unicode characters in G4D menu are used for - how they alter the booting outcome?
title Bootmgr on floppy map --mem /myfloppy.ima (fd0) map --hook root (fd0) chainloader /bootmgr
Also, is it only BCD store that needs to change depending on boot sequence, or Bootmgr file should also be altered for each VHD in such approach?
#19
Posted 14 September 2011 - 07:06 AM
Hmmm.Btw, what these Unicode characters in G4D menu are used for - how they alter the booting outcome?
title Bootmgr on floppy map --mem /myfloppy.ima (fd0) map --hook root (fd0) chainloader /bootmgr


http://reboot.pro/15275/

(and they are NOT UNICODE, they are HTML codes)
If you are using the several floppy approach only the BCD, obviously.Also, is it only BCD store that needs to change depending on boot sequence, or Bootmgr file should also be altered for each VHD in such approach?
The alternatives are:
- a number of floppy images, each with it's own "standard" BOOTMGR + "custom" \boot\BCD
- a number of modified (and renamed) BOOTMGR's each with it's own "custom" (and renamed) BCD

Wonko
#20
Posted 14 September 2011 - 11:55 AM
title Bootmgr on floppy
map --mem /myfloppy.ima (fd0)
map --hook
root (fd0)
chainloader /bootmgr
Once you settle on a particular BCD Boot Menu list on a Multiboot System, and before copying BCD Store from the system partition where Grub4DOS starts from to the floppy image, the BCD Store should be edited with EasyBCD or bcdedit.exe to make the selected Dif VHD a default boot partition (with all other partitions records possibly deleted from it), and switch off Boot Menu display. So, each VHD's Floppy image would have a different BCD version. Once all Floppies are added to Grub4DOS Menu, the original BCD version can be restored on the physical boot partition, and doesn't have to contain any VHD records, so that BCD Boot Menu looks short and clean. It does need to contain one Grub4DOS boot record instead.
#21
Posted 08 November 2011 - 04:18 AM
This might work for a Win 7 VHD (with some more effort), but hardly enough for a VHD with Win XP on it.IF you want to have the BOOTMGR and bootBCD INSIDE the .vhd, as long as the .vhd is static, you just map the .vhd in grub4dos and chainload the BOOTMGR in it.
The grub4dos mapping is only used in the initial part of the setup to allow the loading of BOOTMGR and BCD.
find --set-root /Myl33t7.vhd map /Myl33t7.vhd (hd31) root (hd31) chainload /BOOTMGR boot
What would it take to boot with Grub4DOS a static Win XP VHD?
It doesn't have to be universal and bootable everywhere, it just needs to boot on the same PC from a USB HD to begin with. Will adding WinVBlock suffice - why and how exactly?


#22
Posted 08 November 2011 - 10:33 AM
This might work for a Win 7 VHD (with some more effort), but hardly enough for a VHD with Win XP on it.
What would it take to boot with Grub4DOS a static Win XP VHD?
It doesn't have to be universal and bootable everywhere, it just needs to boot on the same PC from a USB HD to begin with. Will adding WinVBlock suffice - why and how exactly?A basic carpenter's level pls - with straight nails?
Why don't you forget (temporarily) the idea of the VHD and just have it running from a RAW image?
For all it is concerned in a "XP environment" it is THE SAME thing.
Once you have it working as RAW, you can convert it to VHD and it will continue to work allright.

Check the tool by wimb:
http://reboot.pro/9830/
Try using the tool exactly as per instructions.
IF there is anything that is not clear, please review the thread by sara - pmedia:
http://reboot.pro/13731/
AND (IF still you are having a 0x0000007b) the thread by doodo:
http://reboot.pro/14130/
Unfortunately there isn't a basic level carpenter course that teaches how to build a whole house from scratch, there are medium/intermediate ones (see above linked theads).
Since you want something more then connecting two pieces of wood, you will need to learn to use, besides basic tools like the hammer and nails, also drills, screwdrivers, and saws.

Wonko
#23
Posted 08 November 2011 - 12:07 PM

I know, wimb is a very dedicated guy, and keeps polishing his tool endlessly.


BUT... Wonko (THE SANE) presumably knows (or should have known), why such a tool might be handy? What are the exact problems with my pure Win XP VHD that require using such a powerful tool instead of plain vanilla booting it with Grub4DOS?

#24
Posted 08 November 2011 - 01:12 PM
Lack of knowledge? (Actually lack of time and will to learn, and probably a basically wrong attitude...BUT... Wonko (THE SANE) presumably knows (or should have known), why such a tool might be handy? What are the exact problems with my pure Win XP VHD that require using such a powerful tool instead of plain vanilla booting it with Grub4DOS?

The tool is nothing but an easy way to achieve a goal and it is a nice and automated way to reach it.
It includes all the tricks and checks and mods you might need and even a few more than the ones really indispensable.
If you prefer the tool is a collection of info, which you can replicate manually allright, once you will take the time to study how it was created and what it does, and again the easiest way to learn that it is, besides reading the given threads, to run the tool and see what it does.
Compare with:
http://www.msfn.org/...or-xp-from-usb/
The answer to the question:
Is simply:Q.What would it take to boot with Grub4DOS a static Win XP VHD?
A.Nothing but a suitable virtual disk driver (such as Firadisk or Winvblock) capable of "hooking" the RAW or VHD (they are THE SAME thing to all practical effects) previously mapped by grub4dos.
Of course the above presumes that you already know:
- how to make a hard disk image
- hw to install a XP to it (or install the XP to a small partition and then make an image of the partition, adding to it the hidden sectors and changing the few addresses that need to be fixed or ....)
- how to mapthe image in grub4dos and boot it
- and probably a few more "basic" things that I forgot to mention :blushing:
http://reboot.pro/forum/94/
and learn from there how to do the things manually.
Doing to problems with my crystal ball I have obviously NO way to know HOW your "pure Win XP VHD" was made WHAT it contains, IF it has been made "properly", etc. etc.
As always if you start a new dedicated thread, describing WHAT you did and HOW, and WHAT specific problems you are expereincing, someone may be able to give you some advice to fix them problems or workaround them.

Wonko
#25
Posted 08 November 2011 - 04:08 PM
I Iike that...a basically wrong attitude...

So, why my pure Win XP VHD requires an extra driver for G4D to boot it?

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users