Jump to content

Running MMC within WinPE


Michael.Patten

Recommended Posts

Ok so you do need a ramdisk to accomplish this still. Thats where I got confused cause I thought you could do it with read only media now. Atleast thats the feeling I got from earlier posts in this thread. Now Im a bit better armed to continu.

Link to comment
Share on other sites


@TWiST

You don't need a RAM Drive to get explorer working. I added one because I added some custom programs that require it, as well, I added Internet Explorer and didn't want it to store it's cache files on the C: drive and opted that they be stored on a RAM drive instead.

BTW, if you are planning on getting a RAM drive working, I suggest you do it now as opposed to later because then you can utilize it now for features like I suggest above. :)

The folder structure I posted above I orginally had on my CD. If you have a copy of Ghost 9.0, you'll see they have the same structure on their CD. It does not need to be on a RAM disk.

Link to comment
Share on other sites

Yah I have ghost 9 I think I see what your talking about but kinda off subject my ghost 9 disc booted fine but none of the progs on it ran, Also while were talking about ghost 9, am I the only one upset by the fact that there is no ghost 9 but drive image 8 ? what happened to ghost32.exe etc etc. its now drive image thats branded symantec its very dissapointing. But thats all for another thread, time to get down with this PE madness. :w00t:

Link to comment
Share on other sites

So Metzen X: is the cdrom (like normal) and Z: is ur ramdrive ?

Yes. The RAM disk driver I recieved was direct from Microsoft (oem.microsoft.com and browse and ask in their forums for it) and it automatically set the RAM Disk to be drive Z:.

Link to comment
Share on other sites

Hiya fellas,

A little off topic, but I can't seem to get a workign ramdisk... i tried using the one that comes with bartpe and doing the setuphiv registry hack, but no luck... Metzen, any chance you could post a link to you Microsoft supplied driver, or at least give me a pointer on how I can get a ramdisk happening (even if it's only 32Mb using the bartpe one?)

CHeers

Link to comment
Share on other sites

Hiya fellas,

A little off topic, but I can't seem to get a workign ramdisk... i tried using the one that comes with bartpe and doing the setuphiv registry hack, but no luck... Metzen, any chance you could post a link to you Microsoft supplied driver, or at least give me a pointer on how I can get a ramdisk happening (even if it's only 32Mb using the bartpe one?)

CHeers

Sure, I'll have to get you the info tomorrow though. I do not have it on me at my home computer (which I really should considering I seem to need it alot) :blushing:

Link to comment
Share on other sites

Cheers m8 :)

Here is what I have attempted so far:

1) Build WinPE using XP SP2 or 2003 Server

2) Install RAMDisk using Christiaan Ghijselinck RAMDisk.sys (version 5.2.10.2) and Windows 2000 reference .inf file (from here) on a clean XP SP2 / 2003 Server virtual machine, setting ramdisk to be 64Mb via .inf file. Ramdisk works in windows.

3) Export HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\RAMDisk key as RAMDisk.reg.

4) Extract setupreg.hiv from WindowsPE image using UltraISO. Open up regedit and load the hive as "SetupRegHiv".

5) Modify RAMDisk.reg - search and replace HKEY_LOCAL_MACHINE\SYSTEM with HKEY_LOCAL_MACHINE\SetupRegHiv.

6) Import modifed RAMDISK.reg into registry. Check that the RAMDisk key is created correctly.

7) Unload SetupRegHiv.

8) Replace Setupreg.hiv on WinPE image with modified setupreg.hiv

9) Add RAMDisk.sys to \I386\System32\Drivers directory of WinPE image.

10) Add RAMDisk.inf to I386\INF directory

11) Save WinPE image

...and then boot into WinPE using Virtual PC, and the RAMDIsk doesnt appear - it should be there as Drive Z. I check regedit from within WinPE, and the entries look correct.

From everything I have read, I should have a RAM disk, but I don't... frustrating! OH yeh, I am using the winpe mkimg.cmd and other supporting files from Windows PE 1.2, if that makes a difference...

Link to comment
Share on other sites

Usage instructions:

1. Copy the WinPE folder from the OPKTools (WinPE) CD to a system running Windows 2000 or better. Example:

MD C:\WINPE <enter>

COPY D:\WinPE\*.* C:\WinPE\ <enter>

COPy D:\Tools\x86\factory.exe c:\WinPE <enter>

Copy D:\Tools\x86\netcfg.exe c:\WinPE <enter>

2. Add the information in winpesysinfadditions.txt to the original WINPESYS.INF.

You can configure the size, driver letter, etc by modifying the settings in the "adds" file.

3. Create a winpe image directory using the MKIMG command located in the C:\WinPE folder. Before running the command,

place the Windows XP Pro OS CD in the CDROM drive (for example D:). Example:

C:\WinPE>MKIMG D: C:\PETMP <enter>

4. After MKIMG has completed, a new directory called PETMP will contain a directory structure of the WInPE CD.

5. Add the RAMDRV.INF file to the C:\PETMP\i386\INF directory.

6. Add the RAMDRV.SYS to the C:\PETMP\i386\SYSTEM32\DRIVERS directory.

7. Make any other required changes to the C:\PETMP directory to customize the image (optional).

8. Create a bootable ISO image with the following commands:

C: <enter>

CD\WINPE <enter>

OSCDIMG -betfsboot.com -n -h c:\PETMP c:\peramdrv.iso <enter>

9. Burn the PERAMDRV.ISO file using your favorite CDROM mastering software.

When you use this CDROM to boot WinPE (and the hdd has previously been formatted as NTFS) an extra drive letter will be available (by default "Z:") which is the RAMDRIVE.

The RAMDRIVE driver will fail to load if:

a) There is no harddisk attached

B) The underlying disk filesystem fails to load (e.g. the drive has not been partitioned/formatted)

c) There is not enough memory for WInPE and the RAMDRV driver to co-exist.

WinPERamdrv.zip

Link to comment
Share on other sites

Now I hope its just the MS ramdrive that has those above listed issues cause the first 1.

a) There is no harddisk attached

Dosent make any sence at all the point of a ramdrive would be so I have a place I can read and write to files without needing a HD. That just dosetn make sence to me and I hope its only with the MS driver cause I dont use the MS one. I mean Ramdrive not working unless there is an HD ? dosent that seem lame to any1 else ?

Link to comment
Share on other sites

Metzen, u champion, thanks a million :thumbup .All working now - couldn't get 32Mb but maybe that's coz im testing on a vm that has 256mb allocated. 8mb should be fine though - better than a poke in the eye with a sharp stick :)

Yer that bit about having a formatted disk does seem very strange, especially since you would potentially be using it on a system with a new unformatted disk, or maybe a machine with a corrupted MFT. I have removable disks on one of machines so I'll give this a test when i get home. I might also try swapping that ramdriv.sys with the free Christiaan Ghijselinck one and see if it still works... can't see why it wouldn't!

It also seems wierd that you still need the .inf file, when it's not being called anywhere, and the settings in there ultimately dont matter. FOr example, in the files you have provided, the size of the ram disk is determined by the additions in WINPESYS.inf, not what is stipulated in the ramdisk.inf file!

It's of no consequence anyway - it all works following your instructions and I'm stoked!

EDIT 1 I have just tried this on a machine with NO disks and it worked fine - Metzen u da man!

EDIT 2 COuldn't get 32MB working - switched the ramdrv.sys file for the Christiaan Ghijselinck one (version 5.2.10.2), and now have 128MB - $2 well spent :)

Link to comment
Share on other sites

  • 10 months later...
:wacko:
I tried to use Metzen's approach in order to get Disk Administrator working, but have a few issues (hive permissions that I can't resolve, plus my hive would grow to 20MB). I've seen a plugin for Bart's PE (911EXP-MMC) that apparently can run MMC and Disk Administrator, and it seems to be quite compact. Has anyone been able to adapt this plugin for use with the "real" PE?

FYI, I'm running PE 2005 using W2K3SP1 as a source.
Link to comment
Share on other sites

  • 17 years later...
On 9/11/2004 at 10:58 PM, Metzen said:

Here is a directory structure to get explorer in WinPE working to it's finest:

 

 
@set USERPROFILE=Z:\Documents and Settings\Default User
@set TEMP=Z:\Documents and Settings\Default User\Local Settings\TEMP
@set TMP=Z:\Documents and Settings\Default User\Local Settings\TEMP
@mkdir "Z:\Documents and Settings\Default User\Local Settings\TEMP"
@mkdir "Z:\Documents and Settings\Default User\Application Data\Microsoft\MMC"
@mkdir "Z:\Documents and Settings\Default User\Desktop"
@mkdir "Z:\Documents and Settings\Default User\Favorites"
@mkdir "Z:\Documents and Settings\Default User\History"
@mkdir "Z:\Documents and Settings\Default User\NetHood"
@mkdir "Z:\Documents and Settings\Default User\My Documents"
@mkdir "Z:\Documents and Settings\Default User\PrintHood"
@mkdir "Z:\Documents and Settings\Default User\SendTo"
@mkdir "Z:\Documents and Settings\Default User\Start Menu\Programs\Startup"
@attrib +H "Z:\Documents and Settings\Default User\Start Menu\Programs\Startup"
@xcopy "%SYSTEMROOT%\STARTMENU\*.*" "Z:\Documents and Settings\Default User\Start Menu\Programs"
@mkdir "Z:\Documents and Settings\Default User\Templates"
@mkdir "Z:\Documents and Settings\LocalService\Local Settings\TEMP"
@mkdir "Z:\Documents and Settings\LocalService\Application Data\Microsoft\MMC"
@mkdir "Z:\Documents and Settings\LocalService\Desktop"
@mkdir "Z:\Documents and Settings\LocalService\Favorites"
@mkdir "Z:\Documents and Settings\LocalService\History"
@mkdir "Z:\Documents and Settings\LocalService\NetHood"
@mkdir "Z:\Documents and Settings\LocalService\My Documents"
@mkdir "Z:\Documents and Settings\LocalService\PrintHood"
@mkdir "Z:\Documents and Settings\LocalService\Recent"
@mkdir "Z:\Documents and Settings\LocalService\SendTo"
@mkdir "Z:\Documents and Settings\LocalService\Start Menu\Programs\Startup"
@mkdir "Z:\Documents and Settings\LocalService\Templates"
@mkdir "Z:\Documents and Settings\NetworkService\Local Settings\TEMP"
@mkdir "Z:\Documents and Settings\NetworkService\Application Data\Microsoft\MMC"
@mkdir "Z:\Documents and Settings\NetworkService\Desktop"
@mkdir "Z:\Documents and Settings\NetworkService\Favorites"
@mkdir "Z:\Documents and Settings\NetworkService\History"
@mkdir "Z:\Documents and Settings\NetworkService\NetHood"
@mkdir "Z:\Documents and Settings\NetworkService\My Documents"
@mkdir "Z:\Documents and Settings\NetworkService\PrintHood"
@mkdir "Z:\Documents and Settings\NetworkService\Recent"
@mkdir "Z:\Documents and Settings\NetworkService\SendTo"
@mkdir "Z:\Documents and Settings\NetworkService\Start Menu\Programs\Startup"
@mkdir "Z:\Documents and Settings\NetworkService\Templates"
@mkdir "Z:\Downloaded Program Files"

 

NOTE: I have installed a RAMDisk in my WinPE, and you'll need to configure your registry keys "profilesdir", etc to point to these folders, wherever you store them.

That's really great. Please keep sharing more useful information with us.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...