You have to do that when the M volume has a drive letter. It gets set to a recovery partition which means that it won't re-assign a drive letter each time you log on. You need to do these commands right after running the diskpart prep script.
I didn't run script i did manually, i don't need 9GB for recovery. 4GB is enought. But after this i get another error message, i will ceck it and i will replay, what kind of message.
Ok I have spent the weekend playing around and working out a few things with WIMBoot on Surface RT and decided I would write a step by step tutorial for getting WIMBoot working on your Surface RT. (These steps should also work for the Surface 2) I reported the other day getting WIMBoot working on my Surface RT, which was true, but to do that all I did was copy the recovery image to my main machine, exported it as a WIMBoot and reinstalled it on the Surface RT. Problem with that is once you add all the updates to update your copy of Windows to current it adds several gigs of data outside of the WIMBoot file which is wasted space. What this tutorial should do is walk you step by step updating your Surface RT recovery image with the latest updates, recapturing that image, and replacing your standard recovery image with a WIMBoot recovery image. I apologise in advance for any errors or omissions. There are likely spelling mistakes, and a few minor errors. But it should be mostly correct. Requirements (For the way I did it) A Surface RT with a Touch or Type Keyboard Cover (Mine is a 32GB model was running Windows RT 8.1 which it had coming from the factory) A separate computer with the latest Windows 8.1u1 ADK with WIMBoot support installed. The Windows 8.1 Update 1 install files for ARM (Available elsewhere on Mydigitallife) 2x 8GB or bigger USB Flash Drives a 32GB or bigger MicroSD Flash card plugged into the Surface MicroSD port formatted with NTFS or ExFAT. Firstly DO NOT PROCEEED WITHOUT FIRST CREATING A USB RECOVERY DRIVE Secondly I TAKE NO RESPONSIBILITY IF YOU BORK YOUR SURFACE RT Thirdly DO NOT PROCEEED WITHOUT FIRST CREATING A USB RECOVERY DRIVE Fourthly This tutorial involves resetting your Surface RT back to stock. Any personal data on the Surface not backed up WILL BE LOST Lastly DO NOT PROCEEED WITHOUT FIRST CREATING A USB RECOVERY DRIVE Ok here we go Step 1 Create a Recovery Drive to keep safe Use one of the USB flash drives and CREATE A USB RECOVERY DRIVE To do this, from your start screen just type recovery to bring up the search box, and select the option "Create a Recovery Drive" Follow the instructions, then set that USB drive aside to keep safe as an emergency backup. Step 2 Create our working recovery drive Use the second USB flash drive and create another recovery drive following the instructions in step 1. This is the drive we will be doing our experimenting on. Step 3 Reset Surface back to factory Now you have the 2 recovery drives, reset the Surface RT back to factory. Swipe in from the right to bring up the Charms menu Select "Settings" then "Change PC Settings" Select "Update and recovery" Select "Recovery" Select "Remove everything and reinstall Windows" Follow the instructions to reinstall Windows back to factory Step 4 Update Windows PE/Recovery Environment to 5.1 While the Surface RT is resetting back to factory take one of the USB Flash drives and plug it into your computer. Make a temporary folder on your computer, eg C:\wimtemp Make 3 folders inside that folder c:\wimtemp\mount c:\wimtemp\arm c:\wimtemp\update Copy the boot.wim file from the sources folder on the flash drive to c:\wimtemp\arm Next copy the Windows 8.1 Update 1 files to c:\wimtemp\update Windows8.1-KB2919442-arm.msu Windows8.1-KB2919355-arm.msu Now you need to mount the WIM file. Open a CMD window using the "Deployment and Imaging Tools Environment" shortcut in the Windows ADK. Then type the command Code: Dism /Mount-Image /ImageFile:"C:\wimtemp\arm\boot.wim" /index:1 /MountDir:"C:\wimtemp\mount" Next we apply he updates to the WIM Code: Dism /Add-Package /PackagePath:c:\wimtemp\update\Windows8.1-KB2919442-arm.msu /Image:c:\wimtemp\mount Dism /Add-Package /PackagePath:c:\wimtemp\update\Windows8.1-KB2919355-arm.msu /Image:c:\wimtemp\mount Next we optimise the image to reduce its size Code: Dism /image:c:\wimtemp\mount /Cleanup-Image /StartComponentCleanup /ResetBase Lastly we unmount the WIM and commit the changes Code: Dism /Unmount-Image /MountDir:c:\wimtemp\mount /commit You now have a Windows PE/Recovery Enviroment image updated to the latest Windows 8.1 Update 1 with WIMBoot support. The updated boot.wim file should be approximately 250MB in size. (At least mine was) Now you want to copy that boot.wim file back to the Sources folder on the USB flash drive overwriting the old boot.wim. Also copy a second copy of boot.wim this time to the root of the USB Flash drive so you end up with 2 seperate copies of boot.wim on the USB flash drive. (There is a specific reason for doing this trust me) While we are at it we want to edit the 2 txt files and the 2 xml files in the Sources folder on the USB drive. I will paste here what is in my files and you can adapt as needed. If you edit the files using Notepad you must select "Save As" and use encoding of UFT-8 CreatePartitions-UEFI.txt and $PBR_Diskpart.txt Code: select disk 0 clean convert gpt create partition primary size=320 set id=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC gpt attributes=0x8000000000000001 format quick fs=ntfs label="Windows RE tools" assign letter=T create partition efi size=100 format quick fs=fat32 label="System" assign letter=S rem Next line not needed as Surface it UEFI not BIOS rem create partition msr size=128 create partition primary shrink minimum=7200 gpt attributes=0x0000000000000000 format quick fs=ntfs label="Windows" assign letter=W create partition primary set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac gpt attributes=0x8000000000000001 format quick fs=ntfs label="Windows Images" assign letter=R rescan exit ResetConfig.xml and $PBR_ResetConfig.xml Code: <?xml version="1.0" encoding="utf-8"?> <Reset> <SystemDisk> <WIMBoot>1</WIMBoot> <MinSize>25000</MinSize> <DiskpartScriptPath>CreatePartitions-UEFI.txt</DiskpartScriptPath> <OSPartition>3</OSPartition> <RestoreFromIndex>1</RestoreFromIndex> <WindowsREPartition>1</WindowsREPartition> <WindowsREPath>Recovery\WindowsRE</WindowsREPath> <RecoveryImagePartition>4</RecoveryImagePartition> <RecoveryImagePath>Windows Images</RecoveryImagePath> <RecoveryImageIndex>1</RecoveryImageIndex> </SystemDisk> </Reset> Step 5 Update Windows Hopefully by now the factory refresh has completed on your Surface RT and it will be sitting at the OOBE screen asking for initial user information. Go through the OOBE menu's, but when you get to the user part, you want to create a temporary user. When it ask's for a Microsoft account, simply put in invalid details, and it will give you the option to create a local account. Select that option and put in a temporary name and finish booting Windows. Once in Windows start Windows Update, and install the latest updates you can. This will take quite a while. It took me several hours to run all the updates from stock Windows 8.1 to current 27th April 2014 state. After you think all updates are run, reboot Windows a couple of times rerunning Windows Update each time to make sure everything is confirmed updated. (I ended up another couple of updates reappearing 2 reboots after I thought everything was done) Just for interest sake note down your free drive space. (On my Surface by this stage I had around 10.5GB free space) Next we start clean up for capturing this image to a WIMBoot image. Step 6 Clean up the Windows install and prepare for WIMBoot capture Firstly we want to remove all user information. Right click on your Start button and select "Command Prompt (Admin)" First we remove any Wireless Network profile we setup. Use these next 2 commands to first show any profiles, and then delete the profile Code: netsh wlan show profiles netsh wlan delete profile name="ProfileName" Next we want to clean up Windows of any unneeded components that have been superseded by updates. Code: Dism /Cleanup-Image /Online /StartComponentCleanup /ResetBase Lastly run Sysprep to return Windows to the OOBE state Code: C:\Windows\System32\Sysprep\sysprep /reboot /oobe Let Windows reboot to the OOBE screen. Do not put in any details but instead type CTRL+SHIFT+F3 to start Windows in Audit Mode. Once you are in Windows we just need to remove the temporary user. Firstly right click on the start button and select "Control Panel" In the search bot type in "profile" Then select the option that comes up "Configure advanced user profile properties" Select the profile of the temporary user and delete it. Once that is done go back to the control panel and in the search box type "user" Select "Add or remove user accounts" You might have to select "Manage another user account" Then select the temporary user account and then select the option to delete that account. Lastly we reset to OOBE again and shutdown Windows. Code: C:\Windows\System32\Sysprep\sysprep /shutdown /generalize /oobe Step 7 Capture Windows into a WIMBoot image Take the USB recovery drive we created earlier and plug it into your Surface RT. Also make sure the MicroSD card is plugged into your Surface RT. With the Surface turned off hold the volume -/down button and press the power button. When the Surface logo appears release the volume button and it will boot off the USB drive. When Windows PE/Recovery Environment boots off the USB drive, select your language and keyboard layout. Then select "Troubleshoot" Select "Advanced Options" Select "Command Prompt" Now open Notepad and then bring up the open file screen to double check your drive letters. I am going to assume your drive letters ended up like mine. Main Windows drive at C: USB Flash drive at D: and the MicroSD card at E: First thing create a scratch folder for DISM Code: md C:\Recycler\Scratch Next thing we want to remove the unneeded winre.wim image that is built into the System32\Recovery folder. Code: attrib -h -s c:\windows\system32\recovery\winre.wim del c:\windows\system32\recovery\winre.wim Next we capture the image to a WIMBoot file on the MicroSD card. Feel free to change the name to something you want. Code: DISM /Capture-Image /WIMBoot /ImageFile:"e:\wimboot.wim" /CaptureDir:C: /Name:"Windows RT with 8.1 Updates to 27 April 2014 WIMBoot" /ScratchDir:C:\Recycler\Scratch I also like to capture a standard non WIMBoot image just in case I want it. Code: DISM /Capture-Image /ImageFile:"e:\install.wim" /CaptureDir:C: /Name:"Windows RT with 8.1 Updates to 27 April 2014" /ScratchDir:C:\Recycler\Scratch Ok up to this point we should have 2 WIM images saved on the MicroSD card plugged into the Surface RT, one standard and one WIMBoot enabled. Step 8 Install WIMBoot image to the Surface RT Next we want to clean the main system drive and reinstall Windows as a WIMBoot install. Firstly make note of how big the captured WIMBoot image is. Code: dir e:\wimboot.wim In my case the WIMBoot file was 7,464,326,250 bytes. Divide that number by 1024, and 1024 again to get MB. I got 7,118 MB. Firstly add 50MB to that number to allow for possible WIM file expansion. You also need to take in file system overheads, so around another 40 or 50 MB. I just rounded the number to 7200MB. Next start notepad. Open the file CreatePartitions-UEFI.txt on the USB Flash drive Change the number on the line shrink minimum= to the number we worked out just above. Save the file and then open $PBR_Diskpart.txt and make the same change. You can now close notepad. Ok all our prep work is done, lets start. Do the following commands to wipe the system drive (Please note I am assuming the main system disk is disk 0 as it is on my Surface) Code: diskpart list disk select disk 0 clean rescan exit We have just wiped everything on the system drive. Now run the following command to create the required partitions. Code: diskpart /s d:\sources\CreatePartitions-UEFI.txt Please note after this step the Windows drive is no longer C: as it has been reassigned to W: for the rest of this recovery session. Create the required folders we will need Code: md "R:\Windows Images\" md "T:\Recovery\WindowsRE" md "W:\Recycler\Scratch" Next copy the all our files to their places. Code: copy E:\wimboot.wim "R:\Windows Images\install.wim" copy D:\boot.wim "T:\Recovery\WindowsRE\winre.wim" copy D:\sources\*.txt "R:\Windows Images" copy D:\sources\*.xml "R:\Windows Images" Now just quickly take note of how much free space you have on the Windows drive. Code: dir w: If everything worked correctly you should see the standard windows folders and free space should be something close to 22GB free space. (At least on my 32GB Surface RT it was) Next we apply the WIMBoot file to the Windows partition. This command should run Code: DISM /Apply-Image /ImageFile:"R:\Windows Images\install.wim" /ApplyDir:W: /Index:1 /WIMBoot /ScratchDir:W:\Recycler\Scratch Next we need to make the Windows partition bootable Code: W:\Windows\System32\bcdboot W:\Windows Lastly we register the Windows RE partition Code: W:\Windows\System32\Reagentc /SetREImage /Path T:\Recovery\WindowsRE /Target W:\Windows Now that should have Windows all setup on the surface. As a final step lets turn that USB flash drive we have used as out experiment drive into our current recovery drive with all updates. Code: del d:\sources\install.wim copy "r:\Windows Images\install.wim" d:\sources\install.wim You can now use that USB flash drive as a full recovery drive to the image we have just made. Now type exit and then select the "Shutdown" option to turn off the Surface RT. Remove the USB flash drive and turn on the Surface. It should boot into OOBE and you can put in all your normal details. Once all done you should end up with full Windows, running from WIMBoot, with about 21GB free on the main system drive, and you should have fully working recovery/refresh options, including making a new recovery drive from the recovery drive creator with our new image. (At least it worked for me.) References used for writing this tutorial would be linked here but I cannot due to under 20 post count
@vk2amv I think your WIMBoot image is a bit larger and you can make it smaller by additional cleanup. I don't have RT devices but the x64 WIMBoot image that I created before for testing took around 4~4.5GiB. What you can do more (I guess) are: 1) If you use a temporary local account for updating Windows I guess you remove all content of C:\Windows\SoftwareDistribution\Download before capturing. 2) You can also use /ResetBase for cleaning up the Windows image itself as you have booted into the target image before capturing. /ResetBase will remove the superseded component payloads permanently and reduce the store size a bit. 3) And if you don't need to add features to deployed images, running dism with "/optimize-image /WIMBoot" from PE (offline) will do some additional cleanup like removing the binary payloads of disabled features from the image, etc. But this make the offline image WIMBoot specific, so I guess you first capture a standard image, then run the command above, and finally capture a wimboot image to get both images. And the tip for creating a recovery media that restores the WIMBoot configuration is very nice Thanks
RE Point 1 I didn't give the SoftwareDistribution folder a thought to check. But I just checked now and the SoftwareDistribution folder does not exist anywhere on the image I made. Either Windows RT doesn't use it, or part of the DISM clean up commands removed it. RE Point 2 Thanks I had missed this one. In my earlier experiments I had used the /resetbase option. But for writing the tutorial I just clean forgot about it. Adding the command on top of everything else I wrote it reduced my image size from around 7GB to around 5.1GB which fits in with your image reported size when you count Windows RT also has Office 2013 integrated which is over 800MB on its own. I have edited my post and added the command in there. RE Point 3 I gave this one a try from within Windows PE/Recovery Environment and it said the command was not valid within the context I was using it for. But inside VMWare on an X64 image it worked fine. So maybe the command is not valid for Windows RT images, I don't know for sure but. Either way I am happy enough with what I have achieved size wise so I will leave it be. Thanks for your suggestions.
@vk2amv There may be differences between RT and x86/x64 which I don't know like as you said about dism command line. And I tested on x64 install and sysprep seems to remove all content of SoftwareDistribution anyway. So my comment was almost pointless and I apologize my mistakes. Thanks.
You can export the image to reduce wim size (get rid of the removed files streams) Code: Dism /Export-Image /Bootable /SourceImageFile:"C:\wimtemp\arm\boot.wim" /SourceIndex:1 /DestinationImageFile:"C:\wimtemp\arm\boot2.wim" DEL "C:\wimtemp\arm\boot.wim" REN "C:\wimtemp\arm\boot2.wim" boot.wim You can reboot to audit from sysprep directly: Code: C:\Windows\System32\Sysprep\sysprep /reboot /audit The second "standard" one must not use /WIMBoot parameter nice tutorial
can someone post a step by step walkthru. or even a video with all the steps i've tried to no avail.. im a complete newbie at this. for a laptop not surface. i have a q200e with a 16gb ssd in it. has windows 8.1 on it now only have 1.3gb of space left on the drive i use the laptop to run my vehicle diagnostic programs.
So im reading up on this little gem in windows 8.1 for those who use an SSD drive. Im starting to think I should take advantage of it on my laptop. My laptop is a HP DV6-6b47dx. AMD A8 Vision that came with Windows 7 on it but has since then been upgraded to use 8.1 Pro. I have also put a 240GB Micron SSD in it and 16GB of RAM. Basically the part that im still to this day a little confused about is how UEFI works on these model laptops. Im done some reading on uefi vs bios etc to understand the basics. I can get into the BIOS, all though there are hardly any options to change in there and definitely nothing about UEFI. However There is a HP Driver that I can download and install that will create a 2GB FAT32 UEFI partition with a name "HP_TOOLS" on my SSD/HDD that when my laptop is "POST"ing I can press I think F12 or something and have it boot to a menu where I can check the memory and or hdd for errors or something but that's basically it, no sub-menu to boot the OS in UEFI mode or anything. So my question is will my laptop be able to meet the requirement of "-A UEFI bootable system (x64 variant not ia32)"? I wanna say YES but not really sure. Does the wimboot process check for the uefi partition on the SSD or something? Thanks, ~MC
@MrChris You can check whether your system is booting in UEFI or not by seeing the system summary in msinfo32 output, etc. The WIMBoot itself seems to work on a legacy BIOS system (I confirmed it worked at least in VM) but I don't know there is any harm when it's used without UEFI support.
I don't think it's actually required to run in uefi or 64bit, but when all the technical specs require it, it seems like a bad idea not to. I've installed it on a BIOS boot system just fine, but I did notice some disk ping-ponging when using a non-ssd. It's a gamble not installing it on a system using their specs. I mean... any future patch could cause you a LOT of problems if you're not using it the way they envisioned.
Thanks for the feedback, I checked msinfo32 and did see BIOS Mode = Legacy. Yet if I press F2 during the POST I boots into the UEFI partition on my SSD into a semi cute but very basic GUI w/mouse where I can run a bunch of diagnostics on the various components on the motherboard and such and have the option to upgrade/downgrade my BIOS but but thats about it. When I originally installed Windows 8.1 I did not have the UEFI partition installed but now do. Since I do have a SSD but cant really boot via uefi mode (I guess) would it be beneficial to try to reload windows so that it boots via winboot? other than the space difference. I mean what type of space difference are we talking about freeing up roughly? ~MC
Well considering that most devices also have a recovery partition for the OSimage, I'd say it's significant reduction in used space. This wimboot image serves as both the OS files source and the OS recovery image.
Thanks murphy78, I might just image my drive as is and take a stab at wimboot in the next day or so and see what happens. My laptop did come with a recovery partition but since then was lost when I installed the new SSD. From almost everything iv read about uefi booting on other dv6 model laptops with Insyde BIOS its a very confusing subject that never really gets a straight answer even on the hp support forum. At the end of the day il never know until I try. ~MC
Is that image available as we speak. Curious to give it a try. Is there a torrent magnet link. The one below is not active. What is the ARRR site by the way?
Thank you for this post. I followed the steps to reinstall my Surface RT. I had 23.8 GB free/25.8 GB but after some updates I have only 18,6 GB free. It's nearly the same free space disk before reinstalling the Surface. PS: Sorry for my english.