Jump to content

WinPE ISO Boot (read from CD)


twalk482

Recommended Posts

I am trying to accomplish the following

Boot PE into RAM (OSLoadOptions="/noguiboot /fastdetect /minint /rdexportascd /rdpath=WINPE.ISO)

Partition Hard Disk (using A:\DiskPart.TXT)

Format Hard Disk

Copy Windows Source Files from CD

Run WINNT32.EXE

This seemed simple enough

Unfortunately, I cannot reduce my WINPE.ISO under 512MB (Which I have found out is a limitation)

So, I was wondering if there was a way to reference the physical CD-ROM drive when I have booted PE from the ISO

Here is what would be on the CD (The SBI.CAB file is what I would want to extract to the C: drive after I had booted to PE)

\I386

SBI.CAB

WINNT.SIF

WINPE.ISO

Again ... if I have the SBI.CAB on the WINPE.ISO, it is too large to boot into RAM ... I also have no network connectivity at the time of this build.

I tried this, but couldn't seem to find a reference to the Physical CD-ROM drive while in the Win PE ... so any help on the matter would be appreciated.

Link to comment
Share on other sites


I don't understand clearly.

Do you get access to CD-ROM drive at all?

Don't incldue SBI.CAB in image. Do you get a file below 500 mb?

Add \SBI.CAB to cd.

Boot PE into RAM, use a startup batch and detect cd drive.

set PEDrive=

rem ignore drive X
for %%a in (C D E F G H I J K L M N O P Q R S T U V W Y Z) do if exist %%a:\SBI.CAB set PEDrive=%%a

Link to comment
Share on other sites

I ran into this limitation as well.

When you boot WinPE into RAM it maps this RAMdrive to the X: drive and the initial CD where WinPE was booted from will be assigned a drive letter in the same fashion as when Windows boots (lowest availble drive letter is used starting with C:).

Since the CD-ROM is not the System drive (the X: drive is) you can reassign the CD-ROM's drive letter to any availible one you want (using diskpart) and pull data directly from the CD.

To use diskpart you may need to create a temporary storage space (to store the diskpart config file) if you dynamically generate this (i.e. you build the diskpart file dependent on the installed drive/contoller configuration). If this is the case I would suggest using the Microsft RAMdisk driver (RAMDriv) whic you can find reference too on this list. If you are using WinPE2005 or WinPE2004 to boot an ISO out of RAM the filesystem will be read only.

So in my case I do the following:

- boot WinPE to RAM (only WinPE at around 160MB or so) (with an additional R/W RAMdisk set to Z:)

- Reassign the CD-ROM to R: using a diskpart script (script dynamically generated to the Z: drive prior to launching diskpart)

- Partition my drives (using a dynamically generate diskpart script) (note that if you have multiple Removable Storage devices (CD/DVD/USB/Virtual) you will need to move these out of the way as well before partitioning your dirves as they will also eat up drive letters starting with C: if no hard disks are already specified)

- I then copy the OS Installation Files off the R: drive (CD-ROM) to my D: drive

- Install the OS from the D: drive to the C: Drive

You probably will want to keep the WinPE ISO as sparse as possible to maximize availble RAM and minimize WinPE ISO updates.

With WinPE 2.0 WIM files are used and a virtual scratch space is generated eliminating the need for a sperate RAMDisk. I don't know if WIM files have the same 512MB limitation for booting into RAM, but MS's boot WIMs are fairly small and the OS Image/Installation files are stored in a seperate WIM file. So booting in the above mentioned fashion will be similar to how Windows Vista installs are customized.

If you do not see your CD-ROM inside Windows PE make sure you have drivers for the controller card the CD-ROM is running off of (and or Chipset INFs). Since in WinPE's eye's it booted from RAM it does not care about the CD-ROM and there is no assurances that the CD-ROM drive will be seen bny WinPE after boot.

Hope this helps,

Richard

Link to comment
Share on other sites

No,

I don't think I have access to the CD-ROM drive

SBI.CAB is not in the image itself, it is on the root of the CD-ROM

\I386

SBI.CAB = 480MB

WINNT.SIF

WINPE.ISO = 120MB

I used similar logic to detect if there was another drive available to me in PE and there was not.

Thanks campbrs,

That is what I needed ... I thought this was the case, because I remembered seeing two drives when I first started in the PE environment. I see now that my first command in STARTNET.CMD would have re-assigned the C: drive.

Reassign the CD-ROM to R: using a diskpart script (script dynamically generated to the Z: drive prior to launching diskpart)

To save me some time ... would you be kind enough to show me how to reference the CD-ROM drive in a diskpart script?

Edited by twalk482
Link to comment
Share on other sites

I wrote some pretty involved jscripts functions to do this.

But simply put:

- run a diskpart and list all the volumes and capture the output to a text file

list volume

exit

- One way is to look for the "ROM" drive and parse out the letter (typically this is Volume 0 but this may vary if other Removable devices exist in the system)

- Another way (which I do) and if you want to insure you move all drives you may need to parse on "removable" and "fixed" disks (i.e. the system drive can't be moved and the ramdisk will not show up in diskpart). Much easier to do with Regular Expressions in jScript or VBScript, but FOR statments with TOKENS will work in Batch as well.

You can then:

- move all removable drives to letters r and above

- move all fixed drives to a range that won't be used

- partition the hard disks

Edited by campbrs
Link to comment
Share on other sites

Thanks campbrs,

I was already down that path since my test environment is Virtual Server 2005, and I was also testing 64-bit PE by mounting an ISO to a iLO card in an HP server. The ISO in the Virtual machine was Volume 0, but through the iLO card the ISO was showing up as Volume 1.

Most of the time, server builds will physical CD Rom drives, but I think the diskpart parsing will be more fail safe.

Thanks again ...

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...