Jump to content











Photo
- - - - -

Booting Win7PE from iso with grub4dos fails, lost mounted iso

grub4dos win7pe iso usb boot imdisk firadisk

  • Please log in to reply
22 replies to this topic

#1 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 19 September 2012 - 11:04 AM

Hello,

I've build a bootable Win7PE (64 bit) based on Win7PE_SE that is working very well on dvd.
Now I'm trying to boot the working iso-image from my usb boot stick using grub4dos.

The problem is: I can boot into Win7PE but it fails to recognize the Win7PE DVD with programs on it (which should be the mounted win7pe iso file). So I can only see programs in win7pe that are loaded into ram and the startmenu is nearly empty.

I was trying to use firadisk or imdisk before booting the image as I'm doing successfully with WinXP and Win7 installer images but with win7pe I'm failing.

My menu.lst contains the following title using imdisk to load the win7pe iso image.

title Win7PE
find --set-root /ImDisk/myiso.cmd
dd if=()/ImDisk/au.xml of=()/AutoUnattend.xml
dd if=()/ImDisk/cr.txt of=()/ImDisk/myiso.cmd
write ()/ImDIsk/myiso.cmd SET MYISO=/iso/win7pe_x64.iso\r\n
map /iso/win7pe_x64.iso (0xff)
#map (hd0) (hd1)
#map (hd1) (hd0)
map --hook
chainloader (0xff)


Just loading the image without firadisk/imdisk like

title Win7PE
find --set-root /iso/win7pe_x64.iso
map /iso/win7pe_x64.iso (0xff)
map --hook
chainloader (0xff)

causes the same result. Win7PE boots, but loses its mounted iso and so most programs are not accessible. I am wondering if firadisk or imdisk are not working for win7pe?

Do I have to change the firadisk or imdisk parameters? Do I have to add any special script to my winbuilder?

#2 paraglider

paraglider

    Gold Member

  • .script developer
  • 1743 posts
  • Location:NC,USA
  •  
    United States

Posted 19 September 2012 - 12:08 PM

Note the ram drive loaded by grub4dos is only available in real mode so is not available to the os booted from the wim. You have to reload the iso into a win7 version of firadisk / imdisk once your PE is running if you want to access anything not in the wim file i.e. other content of the iso file.

Its also a fairly common problem that the OS looses the connection to the USB drive during the boot from the iso - I see this problem all the time with loading win7 install isos into a ram drive. You have to unplug and reinsert the USB drive, and wait for the drive to come available before you attempt to load the iso into the PE ram drive.

#3 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 19 September 2012 - 12:36 PM

Yea, I know the problems with losing the grub4dos ram drive when starting windows. That's why there is firadisk and imdisk. It's working for me to load a new ramdisk using imdisk when loading a win7 install iso to ram drive. But the same imdisk parameters (see above) are not working for me for win7pe iso. I'd like to know if somebody has success and can share his configuration.

#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 19 September 2012 - 12:47 PM

If you have followed the tutorial #43 from my site, then when WinPE loads it should detect the autounattend.xml file which then tells it to run a .cmd file - so you should see this cmd file run in a (blue?) command shell - do you see this?
What happens if, once you boot to PE, you run the imdiskmyiso.cmd file? The iso should be loaded into RAM as a virtual drive - then you might be able to re-run the PE script that looks for the PE programs?

#5 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 19 September 2012 - 01:30 PM

No, there is no blue command shell while booting win7pe. I can see it when installing win7 and using firadisk or imdisk but not when booting into win7pe.
I'm using your archive Tut43_FiraIso.zip and followed your tutorial. There is your AutoUnattend.xml on the USB that should detect and load the iso file again. Maybe it is not executed? Any idea why?

For booting win7pe with firadisk I'm using your adapted menu.lst entry:

title Win7PE firadisk
find --set-root /iso/win7pe_x64.iso
find --set-root /firadisk/loadiso.cmd
map --mem (md)0x800+4 (99)
dd if=()/firadisk/au.xml of=()/AutoUnattend.xml
dd if=()/firadisk/spaces.txt of=()/firadisk/ISONAME.CMD
write ()/firadisk/ISONAME.CMD SET MYISO=/iso/win7pe_x64.isorn
find --set-root /iso/win7pe_x64.iso
# run the grub4dos map command and specify the iso file we want to load
map /iso/win7pe_x64.iso(0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
# Specify the same iso file for when firadisk runs in winpe
find --set-root /firadisk/loadiso.cmd
write (99) [FiraDisk]nStartOptions=cdrom,vmem=find:/iso/win7pe_x64.iso;n0
chainloader (0xff)/BOOTMGR || chainloader (0xff)

After booting into win7pe I can access the usb stick and start the loadiso.cmd file. It is mounting the win7pe iso file but also warning "sourcesinstall.wim not found!" and asking for trying to repair windows. I can break it while win7pe is still mounted but this is too late for the boot process.

There is only a ia64 but no amd64 or x64 directory in the path for firadisk. I don't know what is devcon64.exe for but maybe yet it is not supported for amd64 architectures and that is the reason it is not working?


BTW: thanks a lot for gathering all these usefull informations on your site, steve6375!!!

#6 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 19 September 2012 - 02:49 PM

Hm, for some more tests I was going back to the default configuration of Win7PE_SE (http://reboot.pro/in...showtopic=12427) and build a Win7PE_SE 32bit and a 64bit version with default settings. Both images using firadisk (see menu.lst above) do not load and mount the iso while booting.
Firadisk is not working for Win7PE_SE... any hints?

#7 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 19 September 2012 - 04:51 PM

Booting from an ISO is not the same as booting from a CD/DVD.
When booting from a CD/DVD, once the OS is booted, all the files can be seen as a 'flat file' filesystem on the CD/DVD.
If you boot from an ISO file (from USB) then once the OS boots, all the OS can see is a USB drive with an ISO file on it - it cannot see any of the files inside the ISO.
Ramdrive utilities like FiraDisk, ImDisk and WinVBlock work by mounting an ISO as a virtual drive.
The entries in the menu.lst for firadisk and imdisk do NOT load the ISO as a virtual drive, they merely tell FiraDisk and ImDisk the name of the ISO that they should load - if and when the OS runs the FiraDisk/ImDisk driver/service.
So, unless Win7PE_SE actually has registry entries (or an embedded script) to load FiraDisk or ImDisk then nothing will happen when the OS boots.

For FiraDisk, when (IF) the driver is loaded by the OS, it will search memory for the special string ([FiraDisk]nStartOptions) and search for and load the iso file specified by the rest of the string.
For ImDisk, IF the ImDisk driver is loaded via a script, the script can search for and run the file /firadisk./isoname.cmd which will set the name of the ISO file as an environment variable. Then the rest of the special ImDisk script can load that correct ISO file as a virtual drive.
The other mechanism you seem to have is AutoUnattend.xml - when WinPE v2/v3 loads, it should search for the file /AutoUnattend.xml on a removable drive such as a CD or USB Flash drive (NOT a hard disk) and then parse any xml content. In tutorial #43, there is an example of this - this mechanism is used to run a loadiso.cmd script which will then load FiraDisk and if this is not successful it will run ImDIsk.


So, for mechanism 1 (Firadisk) and 2 (ImDisk), the Win7PE_SE needs to have the drivers or some script inserted into the OS during the preparation of the ISO (before the OS boots). For mechanism 3 (AutoUnattend.xml) you need a Removable drive to be present which has an AutoUnattend.xml file which has an entry to direct WInPE to run a script which will load the ISO file as a virtual drive.

So unless Win7PE_SE has one or more of these features, I don't see how running it from an ISO file will work...???

If you have the AutoUnattend.xml on a removable drive, and the entries inside it are correct, it should run the cmd file specified. As the cmd file is written for an install CD, you will have to modify it so it does not try to look for those files inside the ISO and does not give an error. However, the main problem is that you need to load your ISO before the OS fully boots.

I hope this makes sense to you.
cheers
Steve
  • pscEx likes this

#8 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 784 posts
  •  
    France

Posted 20 September 2012 - 12:14 AM

I have something in preparation (finished but not yet published) on the direct .ISO Boot subject.
It use Imdisk to mount (attach) the ISO on (virtual) drive Y: at startup, with files, shortcuts Accessible.

I'll send you a PM tomorrow.

:cheers:

#9 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 20 September 2012 - 01:35 PM

I just had success for integrating firadisk into Win7PE manually and booting it with the appropriate parameters (see "title Win7PE firadisk" above). Now my test-Win7PE is running from iso file. Mybe I can try to build a script for integrating firadisk automatically....

I'm also excited for testing your imdisk script....

#10 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 784 posts
  •  
    France

Posted 20 September 2012 - 01:54 PM

pending for a script, It would be nice to know how ;)
I just sent you a message with the mini-package and instructions.

#11 laddanator

laddanator

    Frequent Member

  • Advanced user
  • 337 posts
  • Location:Virginia
  • Interests:Writing code and getting stuff to work when no one else can! Wrote a Windows Vista, 7, and 8 legal activation tool in VBscript and compiled it to exe. First project of this undertaking. Working on an AIO legal activation tool that includes XP.
  •  
    United States

Posted 30 September 2012 - 03:31 AM

Send one as well please, ChrisR. Thanks

#12 doberman

doberman

    Newbie

  • Members
  • 23 posts
  •  
    Russian Federation

Posted 30 September 2012 - 05:17 AM

I was able to download Win7PEx86, as "iso" with WinVblock.

To do this I had to add winpeshl.ini WinVblock.cmd:

sc create WinVBlock binPath = x: windows system32 drivers wvblk32.sys type = kernel start = boot group = "SCSI miniport"
net start WinVBlock
exit

Win7PEx64 but does not work.

#13 vigipirate

vigipirate

    Member

  • Members
  • 99 posts
  •  
    France

Posted 30 September 2012 - 07:29 AM

hello xboot is works

http://sites.google....te/shamurxboot/

Edited by vigipirate, 30 September 2012 - 07:32 AM.


#14 doberman

doberman

    Newbie

  • Members
  • 23 posts
  •  
    Russian Federation

Posted 30 September 2012 - 10:36 AM

vigipirate

It's not.

The problem is: I can boot into Win7PE but it fails to recognize the Win7PE DVD with programs on it (which should be the mounted win7pe iso file). So I can only see programs in win7pe that are loaded into ram and the startmenu is nearly empty.

#15 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 30 September 2012 - 02:45 PM

Once WinPE boots, all it will see is the ISO file - it cannot see the contents of the ISO file as the ISO file needs to be mounted as a virtual drive using a program such as FiraDisk, ImDisk, WinVBlock, etc. - so of course WinPE cannot see the folder with the programs on it.
What you need to do is EXTRACT from the ISO, the required files and folders that WinPE will search for once it has booted.

#16 doberman

doberman

    Newbie

  • Members
  • 23 posts
  •  
    Russian Federation

Posted 30 September 2012 - 03:32 PM

steve6375

This is the easiest way.
I want to download from the ISO. :suda:

But I wrote that what are the ways to download from iso. :yess:

WinVblock - only works Win7PE_x86.iso. (In x64 - not working?). :cold:
FiraDisk -?(In x64 - not working?). :cold:

Edited by doberman, 30 September 2012 - 03:33 PM.


#17 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 30 September 2012 - 03:42 PM

You cannot use just the ISO unless you modify the contents of the ISO, which will be tricky. So why not just use both the ISO and the extracted contents (the boot and source folders will not be needed)? If you want, you can remove the program folder from the ISO and re-make the ISO to reduce it's size.

If you really want to use just the ISO, it would be best to ask the author of the project to add a startup script which looks for a file on the USB drive called (for example) GET7PEISO.CMD and then run it to get the name and path of the ISO. Then the same script could load the ISO so that when the next WinPE scripts, the program folder is found and it will all work correctly.

GET7PEISO.CMD contents:
set PEISO=\USB\FOLDER1\Win7PE_SE.ISO

#18 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 30 September 2012 - 04:48 PM

I see you are already talking to ChrisR on spam about http://theoven.org/index.php?topic=333 so I will wait to see what fix they can come up with...

#19 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 01 October 2012 - 06:38 AM

I've build a script using firadisk to boot Win7PE_SE x64 and x86. It mounts the iso image while booting and you can access the iso as dvd-rom drive while in Win7PE. Have a try!

Firadisk.script

I was successful by using the default configuration of Win7PE_SE and adding some scripts. But I still have problems loading all my customized scripts. Maybe the iso is loaded too late for some configurations?
Feel free to expand the script and integrate it in your projects when working.

#20 laddanator

laddanator

    Frequent Member

  • Advanced user
  • 337 posts
  • Location:Virginia
  • Interests:Writing code and getting stuff to work when no one else can! Wrote a Windows Vista, 7, and 8 legal activation tool in VBscript and compiled it to exe. First project of this undertaking. Working on an AIO legal activation tool that includes XP.
  •  
    United States

Posted 01 October 2012 - 12:00 PM

This topic interest me because I can get a Nod rescue disc to boot from USB fine which is built from 7 PE but I also make a boot dvd that includes XP for older machines that can't boot from USB and I have the same extracted Nod files on that DVD and use the same grub4dos command in the menu as the working USB version and I get BSOD. Love to see a working outcome here. I would even leave it in ISO format if need be to boot it.

#21 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 04 October 2012 - 02:05 PM

But I still have problems loading all my customized scripts. Maybe the iso is loaded too late for some configurations?

I only had one old script for "EASEUS ToDo Backup" that broke my configuration.

I did some more tests. My firadisk.script is working very well! Now every Win7PE-iso file I've tested is booting from USB disk.
You just need the firadisk drivers (linked in the script) and change your grub4dos menu.lst as described in the script.

Have a try!

#22 doberman

doberman

    Newbie

  • Members
  • 23 posts
  •  
    Russian Federation

Posted 04 October 2012 - 09:35 PM

Hi OrcLex

# Specify the same iso file for when firadisk runs in winpe
find --set-root /firadisk/loadiso.cmd
write (99) [FiraDisk]nStartOptions=cdrom,vmem=find:/iso/win7pe_x64.iso;n0
chainloader (0xff)/BOOTMGR || chainloader (0xff)

find --set-root /firadisk/loadiso.cmd - Which is to take ? :cold:

#23 OrcLex

OrcLex

    Newbie

  • Members
  • 12 posts
  •  
    Germany

Posted 05 October 2012 - 06:32 AM

Hi doberman,

the file loadiso.cmd loads the firadisk driver that is necessary to load the iso image. You need to extract the firadisk scripts to your USB device. You can find them here in the first posting.





Also tagged with one or more of these keywords: grub4dos, win7pe, iso, usb, boot, imdisk, firadisk

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users