I use VHDs in my E2B setup, and it works well. My approach was to make an Oracle VM Virtual Box for Win8 Enterprise into a vhd as the HDD. After its done, i used VHD_W8_Compact.exe found on this site to make it portable and only 2 gig. Then i put it in my DVD:\sources dir and modded ADF2MM.g4b and a few g4bs to autoload them using NTBOOT from the G4D systools. The only problem with this method is once you boot the wim you won't be able to install windows as NTBOOT loads from a cd img so the install won't work unless an install cd is in the drive (it says windows can't install to this partition, blah blah blah).
It looks like this in the end.
http://i41.tinypic.com/vdiiva.png
In my case, i took NTBOOT and added it to the /%grub%/APPS/ so there was the NTBOOT file and NTBOOT.MOD dir. An optional step was to replace a few files inside NTBOOT.NT6 with English ones inside the image. Then, in menu.lst i added
ls %hdd%/sources/ > nul && echo $[0113] Adding WIMs and VHDs in /sources folder...
ls %hdd%/sources/ > nul && /%grub%/ADF2MM.g4b .automenu /sources
In ADF2MM.g4b i added this so it won't find windows setup files in sources...
:.makemenu
if "%DD%"=="1" echo @MAKEMENU
setlocal
if "%DD%"=="1" echo Checking %DIR%/%1
if "%1"=="" endlocal && goto :EOF
::If is a directory ignore it
#cat --length=0 %DIR%/%1 || goto :EOF
:: if not iso file then ignore
#if "%DD%"=="1" echo MAKEMENU: checking %~x1 extension
if /i "#.exe#"=="#%~x1#" goto :eof
if /i "#.dll#"=="#%~x1#" goto :eof
if /i "#.bmp#"=="#%~x1#" goto :eof
if /i "#.dat#"=="#%~x1#" goto :eof
if /i "#.gif#"=="#%~x1#" goto :eof
if /i "#.ini#"=="#%~x1#" goto :eof
if /i "#.mof#"=="#%~x1#" goto :eof
if /i "#.nls#"=="#%~x1#" goto :eof
if /i "#.sdb#"=="#%~x1#" goto :eof
if /i "#.cer#"=="#%~x1#" goto :eof
if /i "#.inf#"=="#%~x1#" goto :eof
if /i "#.txt#"=="#%~x1#" goto :eof
if /i "#.cfg#"=="#%~x1#" goto :eof
if /i "#.ttf#"=="#%~x1#" goto :eof
if /i "#.bin#"=="#%~x1#" goto :eof
if /i "#.xml#"=="#%~x1#" goto :eof
if /i "#.xsd#"=="#%~x1#" goto :eof
if /i "#.xsl#"=="#%~x1#" goto :eof
if /i "#.cmd#"=="#%~x1#" goto :eof
if /i "#.mnu#"=="#%~x1#" goto :eof
if "#.#"=="#%~x1#" goto :eof
And in Qrun.g4b i added this to boot the wim or vhd.
:.vhd
:.wim
command /%grub%/APPS/NTBOOT NT6=%1
exit
or if you are like me and boot the odd boot.wim with multiple indexes, i use this.
:.vhd
:.vhdx
:.wim
clear
echo
echo
echo
echo
echo
echo
echo $[0113] Hit enter to boot, or "M" to go to MultiWIM menu...
echo
echo
set /u /p ask=Choose an option :
# Or...
#echo Boot the Wim?
#echo M = Boot Wim from a specific index
#echo
#set /u /p ask=Choose an option :
#pause --wait=4 && call :.wimNTBOOT %1
echo
if "%ask%"=="" call :.wimNTBOOT %1
if "%ask%"=="M" call :.wimMULTIBOOT %1
exit
:.wimNTBOOT
command /%grub%/APPS/NTBOOT NT6=%1
configfile /%grub%/menu.lst
exit
:.wimMULTIBOOT
configfile /%grub%/menuWIM.lst
exit
Also, if you notice from the picture, i have the ability to see all the HDDs displayed and what their contents are. I use this to find all the HDDs and make them variables like %dev1%, %dev2%, etc.
!BAT
#DetHDD.g4b
set n=1
set skip=0
find --devices=h > (md)0x20A+6
call :loop
clear
set dev
goto :EOF
:loop
debug off
cat --locate=\x0a --number=1 --skip=%skip% (md)0x20A+6 || exit
set /a length=%?%-%skip%
cat --skip=%skip% --length=%length% (md)0x20A+6 | set dev%n%=
set /a skip=%length%+%skip%+1
set /a n=%n%+1
goto :loop
Once you have the HDD variables, i use something like this to find the various goodies.
!BAT
#DetDev.g4b
if "%dev1%"=="" && goto :eof
if not "%dev1%"=="" && ls %dev1%/_ISO/ > nul && set isodir1=(/_ISO)
if not "%dev1%"=="" && ls %dev1%/sources/ > nul && set sources1=(/sources)
if not "%dev1%"=="" && if exist %dev1%/bootmgr && if exist %dev1%/boot/BCD && set winmgr1=(/bootmgr)
if not "%dev1%"=="" && if exist %dev1%/ntldr && set winldr1=(/ntldr)
if not "%dev1%"=="" && if exist %dev1%/Windows/explorer.exe && set windir1=(Windows)
if not "%dev1%"=="" && if exist %dev1%/boot/grub/menu.lst && set grldr1=(Grub)
if not "%dev1%"=="" && if exist %dev1%/boot/grub/g2ldr && set g2ldr1=(Grub2)
if not "%dev1%"=="" && if exist %dev1%/casper/vmlinuz && if exist %dev1%/casper/initrd.lz && set casper1=(Ubuntu)
if "%dev2%"=="" && goto :eof
if not "%dev2%"=="" && ls %dev2%/_ISO/ > nul && set isodir2=(/_ISO)
if not "%dev2%"=="" && ls %dev2%/sources/ > nul && set sources2=(/sources)
if not "%dev2%"=="" && if exist %dev2%/bootmgr && if exist %dev2%/boot/BCD && set winmgr2=(/bootmgr)
if not "%dev2%"=="" && if exist %dev2%/ntldr && set winldr2=(/ntldr)
if not "%dev2%"=="" && if exist %dev2%/Windows/explorer.exe && set windir2=(Windows)
if not "%dev2%"=="" && if exist %dev2%/boot/grub/menu.lst && set grldr2=(Grub)
if not "%dev2%"=="" && if exist %dev2%/boot/grub/g2ldr && set g2ldr2=(Grub2)
if not "%dev2%"=="" && if exist %dev2%/casper/vmlinuz && if exist %dev2%/casper/initrd.lz && set casper2=(Ubuntu)
repeat until dev9
And then this for a menu title. By changing %dev1% to %hdd% you can load things from other drives.
iftitle [if not "%dev1%"==""] ** %dev1% %isodir1%%casper1%%sources1%%winmgr1%%winldr1%%windir1%%grldr1%%g2ldr1%\n %dev1% %isodir1%%sources1%%winmgr1%%windir1%%syslinux1%%grldr1%%g2ldr1%%casper1%
set hdd=%dev1%
set FCOUNTED=
/%grub%/Countfiles.g4b
configfile /%grub%/menu2HDD.lst
And an example of menu2hdd.lst would be
iftitle [if exist %hdd%/sources && ls %hdd%/sources/ > nul] %hdd%\\sources (boot .wim)\n Run any wim in the %hdd%\\sources (boot .wim)
/%grub%/ISODir.g4b .automenu %hdd%/sources
configfile (md)0x3000+0x50
This is a short video of my E2B mod in action if you want any code for yours. Thanks for all the tricks you have taught me the last 6 months. As you can see, I have come a long way and your teachings weren't in vain.
http://tinypic.com/r/5yexzd/5