Sunday, February 9, 2014

Creating a Windows PE Boot disk



http://http://www.windowspcguy.net/?cat=11www.vistapcguy.net/?p=71

http://www.vistapcguy.net/?p=71
http://www.windowspcguy.net/?cat=38




WINDOWS PC GUY

LOOKING THROUGH THE GLASS

HOMEABOUT

Creating a Windows PE Boot disk

Posted by kyle on August 14th, 2007 filed in Vista Deployment, Vista Tips 'n TricksI have a USB stick (just upgraded to a 4Gb version) that I carry with me – it is a Windows PE boot disk with a Windows Vista Image on it (amongst other useful bits and pieces). Why? so that I can quickly and easily demonstrate the deployability of Windows Vista – yes I know.. I need to get out more!I realised the other day that I had not actually gone through the steps to create a Windows PE USB boot disk – so here it is! (the same idea goes for creating a bootable image full stop – ie creating a bootable DVD, PXE boot file, etc) Before you begin you need the ingredients: Windows Automated Install Toolkit (WAIK) A USB stick (depending on what else you want on it will depend on the size that you need – minimum of 512Mb – if you want a Windows Vista image on it then go for a minimum of 2Gb)Steps:Install the WAIK (it is delivered as an .IMG file from the download site – either burn this to a CD or mount it using a tool such as VirtualClone CD)In the Start menu – navigate to All Programs/Microsoft Windows AIK and run the Windows PE Tools command prompt as an AdministratorAt the command prompt – create a temp directory – such as MD c:\temp then run set temp=c:\temp  and set tmp=c:\temprun copype x86 c:\PEBuild (this copies the PE Source to a new directory that we will use for constructing our image- if you needed the AMD64 source then replace x86 with amd64)At the command prompt (notice you are now in the c:\PEBuild directory) run imagex /mountrw winpe.wim 1 mount (this mounts the WinPE image file in the mount directory ready for us to add into)So that we have the imagex and deployment tools available in our PE Boot disk, run xcopy "c:\Program Files\Windows AIK\Tools\x86\*.*" mount\ /sAt this point you could add other files into the image (such as Ghost tools, PMenu, etc) by copying them into the mount directory – you can also use the peimg command at this point to install other support tools such as scripting and HTA support – run peimg /list mount to see the full list and then peimg /install to install new supportOnce you are ready to seal the image up then runpeimg /prep mount - this will ensure that the WinPE image is optimised – you will need to agree to seal itAfter sealing the image you then need to unmount it –imagex /unmount mount /commitTo place the newly created custom WinPE image into the correct folder that we can then call on to create the boot disk – run copy /y winpe.wim iso\sources\boot.wimTo create a bootable ISO file that can then be used to boot into WinPE, change back to c:\Program Files\Windows AIK\Tools\PETools and then run the following command oscdimg.exe -n -b"c:\Program Files\Windows AIK\Tools\PETools\x86\boot\etfsboot.com" c:\PEbuild\iso c:\PEBuild\PE.isoSo – you now have an ISO file that you could burn to a CD or DVD but the idea of doing all this was to get a bootable USB device.. so here is the final step.. grab the USB disk – and then use the following diskpart commands (be warned – check the disk that you are going to be using is disk 1 or if not then use the correct one for your circumstance – the clean command is a clean of the disk IT WILL DESTROY THE DATA ON THE DISK THAT YOU SELECT CHECK BEFORE PROCEDING!):diskpart select disk 1 clean create partition primary size= select partition 1 active format fs=NTFS assign exitAfter completing the disk clean and creating the format – then copy the contents of c:\PEBuild\ISO directory to the USB Stick.If you are wanting to be able to do local deployments – then the final step is to add in the WIM file that you want to use (Vista, XP, 2003 etc).You are now ready to boot off your USB stick and capture or install WIM files!

56 Responses to "Creating a Windows PE Boot disk"

Alonzo smith Says: August 17th, 2007 at 2:06 pmHello,I am try to place a WinXP image "OS.wim" on a USB key. I create the USB key per the instruction, with not added plug-ins. I was not able to get dispark to see disk 1 my USB key.kyle Says: August 20th, 2007 at 4:45 pmHi AlonozoThe example of disk 1 being your USB key was just that – an example.. it maybe disk 1, 2, 3, etc.Use the select disk command to select the disk – so select disk 1, select disk 2, etc.To ensure you have the right disk – try using detail disk (after selecting) – this will then show you the details for the disk – if it not the right one then select a different one – not an exact science granted – but it does work.CheersKyleLeigh Simcox Says: August 23rd, 2007 at 6:45 amHi,I have exactly the same problem. I followed all the instructions and it worked great until I got to the diskpart bit. I plug my flash drive in, which is already NTFS formatted, and then fire up diskpart. I use the list disk command and it only lists my hard disk, which is disk 0. I tried select disk all the way up to 6 but it finds nothing.Kind regardsLeighJonathan Says: August 31st, 2007 at 10:55 amKyleI have created a bootable pe usb key, with the standard diskpart commands, then xcopied the iso folder to the usb drive. This boots fine. What I now want to do is deploy my LiteTouch image(s) created in BDD (WAIK). What do i need to do to go from standard usb boot to bootable vista deployment from usb.ThanksJonathanDavid Says: September 14th, 2007 at 10:15 amKyle,This is the most fabulous way to get WinPE onto USB. Thanks!!I could never figure out how to get the sequence quite right.Is there a way to generalize this to get any iso that would be CD-bootable to be USB bootable?I confess that I don't know enough about what is happening with oscdimg command to know whether it is only going to help with WinPE ISOs.ThanksdbDavid Says: September 14th, 2007 at 10:18 amJust one follow-up…If you want to use the whole USB drive, just leave off size=dbtom Says: September 16th, 2007 at 8:43 amWell I think I see what Alonozo is saying. I have a cruzer 2gb usb key, and it does not show up in diskpart as a selectable drive. The only drive that shows up is the harddrive. I am using xp, so maybe it's a vista thing.tom Says: September 16th, 2007 at 3:10 pmI'm gonna check it out tomorrow when I have access to a vista box, but I think the reason Alonozo and I are having problems is because we're using xp… well at least I am.I was finally able to get this USB key by doing the following. Not 100% sure that every step is needed.1- downloaded the HP usb drive format utility2- formatted usb drive 2 make it bootable3- used convert command to convert drive to ntfs(at this point it still wouldn't boot)4- used bootsect /nt52 on the USB drive(still not booting)5- renamed bootmgr to ntldr6- BAMN, boots.Now in windows PE, it does see the usb drive in diskpart as a disk. fyi.Scott Says: September 24th, 2007 at 5:22 amUpon CD bootup, only a c-prompt window is opened. I see the background, but nothing else is available to select. If I close the c-prompt window, my pc reboots. What might be the issue?I followed every step, except this command line (xcopy "c:\Program Files\Windows AIK\Tools\x86\*.*" mount\ /s) generated an error (invalid parameters), I assume though that what was needed were the contents of the x86 folder copied to the root directory of PEbuild, which I did.Scott Says: September 26th, 2007 at 1:59 pmNevermind…I discovered that's how is should be. I thought there was going to be a GUI.Chuck Says: October 8th, 2007 at 11:35 amI have teh same problem. Most of my thumb drives show up as removable media and cannot be selected as a disk. Proably because they are cheap. I dont know. Only 1 of my thumb drives shows up as a disk but its only a 128mb. Any suggestions on useing it with removable media thumb drives?Vista booting and running from a USB Disk « Musings in Code Says: October 10th, 2007 at 1:44 am[...] http://www.vistapcguy.net/?p=71 [...]Phil Says: October 25th, 2007 at 4:27 amYou can only make a usb device bootable from a machine running Vista. Diskpart in Vista is the only client OS that will see the USB device as a separate diskdavid dunger Says: October 29th, 2007 at 2:56 pmWe have the same issue, when i put in my 2Gb usb stick into any xp or windows 2003 server I am unable to see the disk # as the usb stick is not visible in diskpart as a disk. it is only visible as a volume. The USB stick is formated as fat or fat32 and can be seen and written to in both xp. windows 2003 and at command prompts, also in disk manager as disk #2. I would suppsoe that it would be seen by diskpart as disk #2.The problem is that we can't do a select disk on a disk that doesn't appear in diskpart.any help would be great.DaveKen Says: October 30th, 2007 at 1:05 pmOne quick note on diskpart. You can do a list disk to see the disks available This will show you the size of the disk as well, so it should be easier to determine which is your usb key. Then use select disk # which is the disk number of your usb key.Great article by the way. Very helpfull.I am not using the usb key way of doing this, but rather the pxe way. But creating the boot.wim is the same.ThanksKen.Ryan Says: November 26th, 2007 at 2:22 pmHey Kyle,I am stuck right where Alonozo was.Diskpart sees the USB drive as a Volume, but not as a disk. I tried to using a lot of the switches, and then doing a rescan, but it still doesn't recognize the USB key as a disk. I went to Disk Management GUI to look at the USB key. Disk Management does show the USB Drive as "Disk 1″ with drive letter "F", but Diskpart shows is as "Volume 4″ "ltr F".Do you know a trick to get this USB drive to be recognized as a disk, or can this step of the setup be done another way?The USB drive I am using is a Micro Cruzer mini 4 GB.Thanks in advance!RyanPeter Says: December 3rd, 2007 at 7:01 amI think the important bit here is the distinction between USB PEN\KEY and USB hard drives. As far as I know USB PENs are not seen by DiskPart. HP has a tool that will make a PEN drive bootable:HPUSBF.EXE is for formatting USB Devices from dos.HPUSBFW.EXE is for formatting USB Devices from Windows.Search for either on Google and you should be able to find them.Kirk Davis Says: December 3rd, 2007 at 12:14 pmThanks for a great walk-through; I have my own custom .WIM file, I take it I can just copy this to the USB drive that hosts the WinPE image? Do you have any reccomendations for creating a menu front end, or automating \ scripting the install of the WIM image?mename Says: December 14th, 2007 at 8:37 amdiskpart is unable to locate my usb stick as a disk, however it pops up fine under volumes.. also the computer I want to boot with the usb stick recognizes the stick just fine during bootup..Is there another way to add the MBR on the stick proper?Danny Zee Says: March 3rd, 2008 at 8:15 pmCan you use the usb WinPE as a rootkit discovery tool? The method posted on Microsfts site states a live cd.Danny Zee Says: March 3rd, 2008 at 8:16 pmSimple steps you can take to detect some of today's ghostware:Run "dir /s /b /ah" and "dir /s /b /a-h" inside the potentially infected OS and save the results.Boot into a clean CD, run "dir /s /b /ah" and "dir /s /b /a-h" on the same drive, and save the results.Run a clean version of WinDiff from the CD on the two sets of results to detect file-hiding ghostware (i.e., invisible inside, but visible from outside). See Hacker Defender ghostware files revealed (highlighted) for an example.Note: there will be some false positives. Also, this does not detect stealth software that hides in BIOS, Video card EEPROM, disk bad sectors, Alternate Data Streams, etc.Carlos Says: April 9th, 2008 at 1:05 amI know this artical is about USB but could you helpwith this problem. I've created a boot CD from the resulting file .iso and it sort of works. It boots into the winPE cd loads the file and the screen changes to vista background then CMD prompt opens and displaysX:\Windows\System32>Winpeinit and thats it, it never gets past this screen. I checked network traffic and it is sending out DHCP discover packets, If I run NIC boot rom it will connect to a WDS and download winpe from it so the network connection would seem to be OK, whats gone wrong.tim clark Says: April 11th, 2008 at 6:09 amSo it looks like we have the reoccurring them here of diskpart not seeing the usb device as a disk or not seeing it at allI think the issue is that xp / w2k3 dont have the right version of diskpart.exeI think from the sceen shots i see we need v6I googled to the cows come but cat find itdoes anyone know1) if there is a win2k3/xp diskpart v62) a 3rd party app that make usb device boot able with vista/win svr 2008 boot imageBarry Says: April 16th, 2008 at 3:24 amHey Kyle, worked a charm, but only in Vista.XP, as in all the other ppl's cases, diskpart wouldn't see the thumbdrive as a disk.But, also, I couldn't leave the /s switch on the copy command to get the tools to the Windows dir. It kept erroring. Took it out and hey presto it's working fine.That first part, about creating the bootable partition etc on the usbkey is fantastically handy. I think it just helped me with some other stuff! Love your work!!twindude Says: April 30th, 2008 at 6:22 pmi have the PE disk working but wondering how to add apps to it now? or maybe kick off a shell… like a windows looking sheell i use to use BartPE but booting form a USB is almost impossible.. so i going to use WinPE .. I have it booting to a command prompt and I can look under program files and see my app dirs but the exe will not run. so i'm thinkin that i have to have files in the system32 dir and all… any help would be greatLars Says: June 19th, 2008 at 10:19 pmI'm a little late to this, but I noticed a bunch of people having issues with diskpart. I personally used a GParted LiveCD (http://gparted.sourceforge.net) for that step. If you think about it in disk formatting/partition terms, all diskpart is doing is wiping out everything on the USB drive, creating a primary partition, marking it as active (aka boot), then formatting the partition. You can do the same exact thing in GParted as long as it detects your USB drive as another disk. Give it a shot & see if it works for you too, worked great for both of my USB drives (one HDD & one Flash).Just my two cents Barry Says: July 5th, 2008 at 7:15 amOh, and one thing to watch too…don't format a 4gig USB stick if you're in a hurry…this takes a while eh?? *sigh*!!kyle Says: July 6th, 2008 at 3:03 am@Barryvery true.. well.. depending on your disk's speed of course.The other alternative is to use the switch /q for a quick format.Other useful switches (Barry I figure you know these but for anyone else)/fs:ntfs (to force the format to NTFS)/c to enable compression/v:label to label the volume.CheerskyleSteven Zimmer Says: September 9th, 2008 at 3:23 amHi!I just did a windows update on my vista home premium and when I rebooted could not get back into windows as the password I use has become invalid. I cannot get into safe mode command prompt cannot repair the settings nor go back to an earlier valid version (all through F8). In other words, I am completely blocked for the moment. Have you ever seen this happen before? Is there anyway around this other than extracting the data from the hard drive and starting all over again?Thanks for any words of adviceRegardsStevenAlex Says: October 3rd, 2008 at 11:03 amHi, do anyone know how to create a winpe bootable with start menu and window explore so i can do some formating when i boot from my USB ?Jon Says: December 22nd, 2008 at 5:34 amGot stuck at 5… run xcopy "c:\Program Files\Windows AIK\Tools\x86\*.*" mount\ /sAny ideas? NewbieChris Says: January 11th, 2009 at 3:37 am@AlexWindows PE doesn't have a standard windows shell, the command prompt is what you're getting. You can however do most of what you want to from there. There are command line utilities to do everything you've listed.Not what you wanted I'm sure, but I hope it's some help.ChrisPaul Says: January 13th, 2009 at 6:01 amHad to restore a failed Dell system via Factory.wim (from D partition), this article saved me a ton of time. Cheers!Claude Says: January 25th, 2009 at 10:47 pmI have a Toshiba A300. I would like to restore an old Ghost image of this computer but when I boot with the emergency boot disk from Norton/Symantec it says it can't find any network or the D: drive which came with the Notebook. When I try to build a new emergency boot disk from this disk it says it hasn't got the drivers for my notebook. Any ideas how I can get to restore my old ghost image to my notebook?Claude Says: January 25th, 2009 at 10:49 pmSorry I forgot I an running Vista Business Ultimate on the notebookDrBob Says: March 5th, 2009 at 3:06 pmI have created a bootable CD that formats the drive and loads in my Wim. It works great when I use it in an internal cd drive on the computer. If I remove the internal drive and replace it with an external drive (so the drive letters stay the same) the CD does not work. It starts to load the WinPE shell correctly but causes the PC to reboot before the format begins.Why does the CD work correctly from an internal CDROM but doesn't work when using an external CDROM?Thanks!Paul L. Says: March 17th, 2009 at 11:22 amTHANKS, I was following Microsoft's 5105B Course instructions and they do not work for making a bootable CD.Your instructions worked perfectly!Thanks!!!Windows 7 PE Bootable DVD/CD - Windows 7 ForumsSays: May 21st, 2009 at 12:19 am[...] [...]leew Says: May 31st, 2009 at 8:19 pmFor those getting stuck on Step 6 – the xcopy command yields an error – "Invalid number of parameters" – This is most likely because you copy and paste the command from the web page. The web page uses smart quotes and the command prompt doesn't change them – the net effect is that you don't actually have the command in quotes so the it looks like there are an extra two parameters. To resolve:paste the line and delete the quotes and retype them (the LOOK the same, but they are different), or manually type the entire line.Popeye Says: June 26th, 2009 at 6:32 amI was hoping for a GUI too. Can't we have a PE boot disk with a Windows shell? I want to be able to access Windows restore points, Winrescue restore points and maybe run an antivirus scan after booting with the CD. Winrescue XP had the facility for making such a CD, but Winrescue Vista doesn't.Creating Bootable Vista / Windows 7 USB Flash Drive « Adrian Francis Weblog Says: June 27th, 2009 at 1:31 am[...] drive for a Vista and/or Windows 7 installation.  I cobbled together the following from VistaPCGuy and another source I don't remember right [...]jlexen Says: July 12th, 2009 at 2:02 pmthe clean command doesn't work. It gives this:The selected disk is neccessary to the operation of your computer, and may not be cleaned.(and yes, the programmers DID spell necessary wrong XD….)kyle Says: July 15th, 2009 at 12:03 pm@jlexcen – lucky for you – that it didn't work. The message means that you have the wrong drive selected – in fact I am looking at that and suggest you have your system drive selected.Make sure youhave your USB drive selected and the command will work.Will Says: August 19th, 2009 at 11:18 amFor all of you having issue with diskpart not seeing the thumbdrives. Only the Vista and Server 2003 diskpart.exe can see it. If you look at the walk-throughs that you see on the web of people doing it its always in vista.Creating Bootable Vista / Windows 7 USB Flash Drive « pablosu.com Says: September 23rd, 2009 at 1:33 pm[...] drive for a Vista and/or Windows 7 installation.  I cobbled together the following from VistaPCGuy and another source I don't remember right [...]Tyler Says: October 16th, 2009 at 1

No comments:

Post a Comment