Jump to content











Photo
- - - - -

Installing Windows 7/8 from .iso without unpacking

winpe iso ibs boot usb imdisk impossible:)

  • Please log in to reply
71 replies to this topic

#26 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 25 April 2014 - 03:54 PM

By mount everything, do you have ideas in mind? img? vmdk?

 

For a winpe environement, you may want to check this as well.

 

Regards,

Erwan



#27 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 25 April 2014 - 04:04 PM

By mount everything, do you have ideas in mind? img? vmdk?

 

For a winpe environement, you may want to check this as well.

 

Regards,

Erwan

 

To quickly recap this for you: a frontline problem now is mounting partition (all partitions, physical ones) which has hidden flag under Windows(PE). That's what the issue is now.

 

We have showdrive but it does not work without WOW64 under 64bit PE. I don't want to alter it :)


Edited by Gear54rus, 25 April 2014 - 04:05 PM.


#28 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 25 April 2014 - 04:09 PM

I dont know the showdrive command (if this part of windows or is it an external tool) but I may be able to add it to vmount.

 

See below vmount commands :

 
vmount createfixed path size(MB)
vmount createdynamic path size(MB)
vmount createchild path parent
vmount attach path
vmount detach \\.\PhysicalDriveX
vmount expand path size(MB)
vmount merge path
vmount list  -> (will list physical drives or virtual drives)
vmount mount x: \device\harddiskX\partitionX
vmount umount letter
 
I could add a vmount partitions and rename vmount list to vmount disks.
(@Wonko, I may have hastily again introduced a confusion between disks/drives/partitions/volumes :) )
 
Regards,
Erwan


#29 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13689 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 25 April 2014 - 04:39 PM

 @Gear54rus

What you started as a bold new exploration to new, strange worlds is starting to reveal some underlying lazyness :w00t: :ph34r:

Winbuilder (the traditional or "classic" one, not the new one) was called in previous incarnation "Openbuilder", but before that, more simply "Batcher", it is nothing but a script processor and if you open a .script in *any* text editor (and replace commas with spaces ;)) it is hardly of difficult understanding, being very similar to basic or batch, and at it's core, *any* Winbuilder .script taken out of a project does almost exclusively two things:

  1. copy a file from a source to a destination
  2. change some settings in the destination (be these settings a .ini file, an entry in the Registry or something else)

in other words, it is relatively easy to understand what exactly it does, and particularly someone that wanted to disassemble a 32 bit program, create from the disassembly a valid source then convert this source to 64 bit and then re-compile the tool, it should be easy-peasy.

 

Some of Wimb's projects (that use NOT Winbuilder) also create PE's and PE's with the WoW64 and our friend erwan.l also uses very simple batches to make his own QuickPE's:

http://reboot.pro/topic/18744-quickpe/

http://reboot.pro/fi...le/340-quickpe/

 

Now, maybe, and if you are nice enough, erwan.l might consider to create a "Not-So-QuickPE" :w00t: project including WoW64 :whistling:

 

(@Wonko, I may have hastily again introduced a confusion between disks/drives/partitions/volumes :) )
 

Naah, don't worry. :)

 

The fault is entirely to blame on the good MS guys and their confusing naming. (and to the people that perpetuate that ;))

 

Still on the several times referred to thread:

http://reboot.pro/to...ssible/?p=88825

the SAME thing can be mounted BOTH as  \Device\HarddiskVolumex and as  \Device\Harddiskm\Partitionn

an be commonly referred to as \\.\LogicalDrive while the *whatever* is the Harddisk in both the above "Paths" is very often \\.\PhysicalDriven (while still being a disk), we will never have this fully right, the only important thing is that we understand each other.

 

:duff:

Wonko



#30 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 25 April 2014 - 06:17 PM

To quickly recap this for you: a frontline problem now is mounting partition (all partitions, physical ones) which has hidden flag under Windows(PE). That's what the issue is now.

 

We have showdrive but it does not work without WOW64 under 64bit PE. I don't want to alter it :)

 

Latest vmount (0.3) will list disks or partitions.

Command line :

vmount disks

vmount partitions



#31 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 26 April 2014 - 12:57 PM

 @Gear54rus

What you started as a bold new exploration to new, strange worlds is starting to reveal some underlying lazyness :w00t: :ph34r:

Winbuilder (the traditional or "classic" one, not the new one) was called in previous incarnation "Openbuilder", but before that, more simply "Batcher", it is nothing but a script processor and if you open a .script in *any* text editor (and replace commas with spaces ;)) it is hardly of difficult understanding, being very similar to basic or batch, and at it's core, *any* Winbuilder .script taken out of a project does almost exclusively two things:

  1. copy a file from a source to a destination
  2. change some settings in the destination (be these settings a .ini file, an entry in the Registry or something else)

in other words, it is relatively easy to understand what exactly it does, and particularly someone that wanted to disassemble a 32 bit program, create from the disassembly a valid source then convert this source to 64 bit and then re-compile the tool, it should be easy-peasy.

 

Some of Wimb's projects (that use NOT Winbuilder) also create PE's and PE's with the WoW64 and our friend erwan.l also uses very simple batches to make his own QuickPE's:

http://reboot.pro/topic/18744-quickpe/

http://reboot.pro/fi...le/340-quickpe/

 

Now, maybe, and if you are nice enough, erwan.l might consider to create a "Not-So-QuickPE" :w00t: project including WoW64 :whistling:

 

Naah, don't worry. :)

 

The fault is entirely to blame on the good MS guys and their confusing naming. (and to the people that perpetuate that ;))

 

Still on the several times referred to thread:

http://reboot.pro/to...ssible/?p=88825

the SAME thing can be mounted BOTH as  \Device\HarddiskVolumex and as  \Device\Harddiskm\Partitionn

an be commonly referred to as \\.\LogicalDrive while the *whatever* is the Harddisk in both the above "Paths" is very often \\.\PhysicalDriven (while still being a disk), we will never have this fully right, the only important thing is that we understand each other.

 

:duff:

Wonko

 

Well I'm, sorry if I did not meet expectations but I really don't want to re-build everything from scratch for one little detail. It just seems inherently wrong on so many levels. IDK, maybe it's just me :crazyrocker: .

 

Appreciate the information.

 

Latest vmount (0.3) will list disks or partitions.

Command line :

vmount disks

vmount partitions

 

Thanks again, without you linking this program this would be a nearly complete stall.

 

Since this program (vmount) does same thing as mnt.exe, I have made a bat script (I recalled again why I love bash so much :)) to upgrade it to showdrive.exe (to not require any parameters). Mine will only take 1 parameter - partition number to mount on all drives. It's not pretty but it gets the job done.

 

So I have a question here: for a tutorial, for 32-bit version PE, I'm gonna advise using showdrive instead of vmount so is there any connection between PE being 32 or 64bit and Windows distributions it installs being 32 or 64 bit. 

 

It seems that there is no connection, so if it's true then is there easy way to determine if WinPE is 32 or 64 bit?


Edited by Gear54rus, 26 April 2014 - 12:58 PM.


#32 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 26 April 2014 - 01:01 PM

Checking the registry or the SET comamnd line variable should help you determine if you are on a X86 or X64 platform.

Have a look at PROCESSOR_ARCHITECTURE system variable.

 

Not that I dont want to push for using vMount but since it works on both platforms (x86/x64), why not use one single batch and vmount for all cases?

Rename the 32bits version vmountx32.exe and the 64bits version vmountx64.exe.

 

Regards,

Erwan



#33 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13689 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 26 April 2014 - 03:23 PM

IMHO no real need to rename anything.

I.e. something *like*:





@ECHO OFF
SET myexe=vmount64.exe
IF %PROCESSOR_ARCHITECTURE%.==x86. SET myexe=vmount.exe

and then use %myexe% in the rest of the batch.

 

To be strict, it should be a .cmd and not a .bat.

 

As a side note, the vmount.exe is capable of doing quite a lot of things, maybe it would be useful a "minivmount" with just three options, partitions, mount and umount, though cannot say if it would help to reduce the bloat (though this is not a particular issue in this specific case, it would still be nice to have small tools that do small things).

Quick comparison (32 bit versions):

vmount.exe 439,296 bytes

showdrive.exe 18,432 bytes

mnt.exe+unmount.exe 5,632+8192=13,824

 

As a side-side note (and you may need to talk with Olof about this) an IMDISK mounted volume is actually seen in vmount partitions as:

\harddisk4294967295\partition4294967295

:w00t: :ph34r:

 

:duff:

Wonko



#34 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 26 April 2014 - 04:17 PM

Hi Wonko,

 

Indeed the exe size (but only on x64) is an issue for me for now.

I am using a new delphi version for x64 binaries and the size has massively increased :(

Any exe with Delphi XE is minimum 2 meg.

For X32 binaries (delphi 7), in console mode, should fit within 400 kb max (and with some little stress, i should be able to divide the size by 2).

 

Thus it will never beat ASM or C++ binaries...

 

I'll report the wierd (4294967295=dword ...) partition numbering to Olof.

Although : are you able to use this mount it?

 

Regards,

Erwan

 

EDIT : the 4294967295 is my fault... ImDisk seems to not support the IOCTL_STORAGE_GET_DEVICE_NUMBER which makes sense since the ImDisk partition does not have a "parent" harddisk.

 

EDIT2 : fixed... now vmount will not display \hardiskX\partitionX anymore but will display an empty string.



#35 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 26 April 2014 - 04:26 PM

Hello!

 

Looks like I am at the final stage of creating the script. Thanks for the architecture-detecting snippet - it was adapted (the dot syntax is pretty new to me).

 

Now the last (seemingly) thing here is that at boot, USB drives need some time to initialize. 

 

At the very first moment when the first line of Winpeshl.ini gets executed - all programs report only internal hard disks. USB drives need some time to initialize.

 

I am currently looking into a way to lock the script until the initialization happens. 

 

I've tried:

  • diskpart "" - hangs for some time on launch but it was determined that it waits for something else rather than USB init.
  • wmic diskdrive list - does not care at all, returns instantly, shows whatever is available at the time.

So it seems there is no elegant solution apart from making an endless loop.

 

That's what I have now:

@ECHO OFF
set partition=2
SET mnt=vmount64.exe
IF %PROCESSOR_ARCHITECTURE%.==x86. SET mnt=vmount.exe
:start
wmic diskdrive list brief | find /c /v "" > tmp
set /p drives=<tmp
set /a "drives-=3"
for /l %%G in (0,1,%drives%) do (
	%mnt% mount W: \device\Harddisk%%G\partition%partition% > NUL
	dir W: /a:d /b | find "WINSETUP"
	IF NOT ERRORLEVEL 1 (
	    echo "Found!"
		goto:end
	)
	%mnt% umount W: > NUL
)
:: place for a timer command
goto:start
:end
del tmp

Endless loop version.

 

So what I need now is either a way to lock until initialization completes somehow or use some kind of timed fuse command (sleep, wait and timeout are not available for some reason).


Edited by Gear54rus, 26 April 2014 - 04:28 PM.


#36 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 26 April 2014 - 04:29 PM

for a poor man's sleep command you can use 

ping 1.1.1.1 -n 1 -w 3000 > nul


#37 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 26 April 2014 - 04:31 PM

 

for a poor man's sleep command you can use 

ping 1.1.1.1 -n 1 -w 3000 > nul

 

Yeah I saw that hack. Will probably use it if nothing else comes along. Or even leave it empty and let it have fun  :bounce8:


Edited by Gear54rus, 26 April 2014 - 04:32 PM.


#38 steve6375

steve6375

    Platinum Member

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

Posted 26 April 2014 - 04:35 PM

It wouldn't surprise me if wmic was missing from many WinPE Setup environments... :dubbio:



#39 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 26 April 2014 - 04:36 PM

It wouldn't surprise me if wmic was missing from many WinPE Setup environments... :dubbio:

 

Aggreed.

Gear64rus : why dont you use the vmount partitions command instead of wmic ?



#40 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 26 April 2014 - 04:37 PM

It wouldn't surprise me if wmic was missing from many WinPE Setup environments... :dubbio:

 

Kinda thought that too.. So far so good. If it is missing then I'll probably have to use diskpart with standalone script.

 

Edit: or just vmount. Yeah, was kinda stupid on my part to outsource the data about partitions/volumes when it is already available in the same tool.

 

Originally, I intended the script to choose available drive letters by itself too (thats where wmic came into sight) but string splitting was a pain in the ass so I dropped that.
 

Also, ping hack does not work because IP stack does not seem to be initialized also :starwars: guess it doesn't want to give up that easily.


Edited by Gear54rus, 26 April 2014 - 04:49 PM.


#41 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1934 posts
  • Location:Nantes - France
  •  
    France

Posted 26 April 2014 - 04:51 PM

Well if you really need it i could make a sleep.exe (x32/x64) with a parameter in seconds but I am sure this has been done tons of time out there on internet .



#42 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 26 April 2014 - 04:53 PM

Yeah, I'll surely search for that. You see, it is just the matter of including additional binaries or not. 

 

Still, it is better to lock until this event specifically instead of looping but I am not sure how to Google for that... And the fact that WinSetupFromUSB is also using looping mechanism (10 sec for 1st loop and 5 for subsequent ones) further suggests that this is simply impossible.


Edited by Gear54rus, 26 April 2014 - 05:08 PM.


#43 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13689 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 26 April 2014 - 05:32 PM

Just for the record the "dot syntax" (I presume you are referring to the line).



IF %PROCESSOR_ARCHITECTURE%.==x86. SET mnt=vmount.exe

is only an "old trick of the trade", that is used to avoid, if *for any reason* the variable is not defined, an error.

The "proper way" should be:



IF DEFINED PROCESSOR_ARCHITECTURE IF %PROCESSOR_ARCHITECTURE%==x86 SET mnt=vmount.exe

the dots (but any non-crazy character would do) is to shorten a bit the line (and make the batch run a tadbit faster).

 

JFYI (waiting):
http://www.msfn.org/...-in-batch-file/

IN Vista :ph34r: and later, CHOICE is back:

http://www.robvanderwoude.com/wait.php

http://www.robvander....com/choice.php

 

I am not sure to understand the issue about USB device initializing?

I mean, I thought you were booting from the USB device, or are you waiting for the vmount to take effect? Or what else?

Can you describe your situation/procedure?

 

:duff:

Wonko



#44 ilko

ilko

    Silver Member

  • Advanced user
  • 500 posts
  •  
    Bulgaria

Posted 26 April 2014 - 06:26 PM

Hello!

 

Looks like I am at the final stage of creating the script. Thanks for the architecture-detecting snippet - it was adapted (the dot syntax is pretty new to me).

 

Now the last (seemingly) thing here is that at boot, USB drives need some time to initialize. 

 

At the very first moment when the first line of Winpeshl.ini gets executed - all programs report only internal hard disks. USB drives need some time to initialize.

1) Loop and sleep until a tag file on the USB drive in question is available, that's what I am using in WinSetupFromUSB.

 

2) http://technet.micro...2(v=ws.10).aspx

Wpeutil WaitForRemovableStorage

Not tested and not sure if available in PE2 images, nor if waits for USB fixed drives as well.

 

@Jaclaz

At that time PNP manager is still initializing devices, USB ones among them. They may or may not be available at the time when a script is executed via WinPEShl.ini, it's launched synchronously with PNP. Usually they are not available at that point, as far as I've tested.

PE2 may take up to a minute and even more to have the USB drives ready, PE3 is much faster, like 5-15 seconds at max, in PE4 they are available in a few seconds, counting from the time when a script is launched through WinPEShl.ini.



#45 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13689 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 26 April 2014 - 07:34 PM

@Ilko thanks, this explains a lot, I use the SAME stick I use for Vista to NOT touch Pe 2.x's ;):

http://www.msfn.org/...xp/#entry807225

I now understand how I never noticed an issue like that (even because I have nothing "auto-starting" in WinPEShl.ini).

 

:duff:

Wonko



#46 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 27 April 2014 - 02:35 AM

1) Loop and sleep until a tag file on the USB drive in question is available, that's what I am using in WinSetupFromUSB.

 

2) http://technet.micro...2(v=ws.10).aspx

Wpeutil WaitForRemovableStorage

Not tested and not sure if available in PE2 images, nor if waits for USB fixed drives as well.

 

Are you sure about usbdrive.tag? It's just I removed the file (and pretty much all other files except Windows iso, its bootloaders and imdisk) and utility still works for me. I know it works for me, but would it be wise to suggest deletion in the tutorial?

 

For my detection I used WINSETUP folder.



#47 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 27 April 2014 - 04:53 AM

So what's the best way to go about creating tutorial? Should I make separate thread and then link to it from Tutorials section? I could also link to it from SuperUser then.

 

Is that the right way?



#48 ilko

ilko

    Silver Member

  • Advanced user
  • 500 posts
  •  
    Bulgaria

Posted 27 April 2014 - 11:38 AM

Are you sure about usbdrive.tag? It's just I removed the file (and pretty much all other files except Windows iso, its bootloaders and imdisk) and utility still works for me. I know it works for me, but would it be wise to suggest deletion in the tutorial?

 

For my detection I used WINSETUP folder.

The tag file is the ISO file to be mounted, passed as a parameter to WinPreSetup.exe in WinPEShl.ini.



#49 Gear54rus

Gear54rus

    Member

  • Advanced user
  • 48 posts
  •  
    Russian Federation

Posted 27 April 2014 - 02:12 PM

The tag file is the ISO file to be mounted, passed as a parameter to WinPreSetup.exe in WinPEShl.ini.

 

Oh, Ok. I think I'll switch the script to this detection method too. 

 

If I make it accept argument as path to .iso, in Winpeshl.ini it would be easy to invoke it (since we have that path in a string below). Thanks.



#50 ilko

ilko

    Silver Member

  • Advanced user
  • 500 posts
  •  
    Bulgaria

Posted 27 April 2014 - 06:03 PM

I've no idea what you have came up with so far, but if you are still using WinSetupFromUSB, it would be possible with a bit of cheating to avoid most manual work, if not all.

 

Latest WinSetupFromUSB versions have an advanced option to launch Q-Dir before start of Setup.

You could rename your script to WinPreSetup.exe, use the same switches as WinPreSetup.exe in it, do your stuff to unhide and mount partitions and launch WinPreSetup.exe (Q-Dir.exe) when needed, passing the same parameters.

Next replace Q-Dir.exe with WinPreSetup.exe, the appropriate architecture and use the advanced option to add Q-Dir.

All files are in <WinSetupFromUSB>\files\winsetup\

 

Let me know if you are going this way and need details.







Also tagged with one or more of these keywords: winpe, iso, ibs, boot, usb, imdisk, impossible:)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users