Sei sulla pagina 1di 14

17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

Search this site

Download EASY2BOOT Videos WinXPToGo Win7ToGo Win8ToGo Grub4dos Guide


Hirens Windows restore partition Fake Flash Test Remove Viruses GetWAIKTools Blog
Donate Sitemap

RMPrepUSB ­ Home Page Tutorials, How To's and Guides​
 > ​
• RMPrepUSB ­ What does it do? 81 ­ Make your own automatic
• RMPrepUSB Quick Start Guide
• RMPrepUSB User Guide & FAQs Windows restore partition (ImageX­
• RMPrepUSB FAQs based)
• RMPrepUSB ­ Version History
• RMPartUSB FAQs
• RMPartUSB Commands
• Forums (reboot.pro) Contents Note: You may also
• Bugs ­ known, current and fixed be interested in a
• Licensing of RMPrepUSB 1 Introduction CloneZilla­based
Contact Me 2 Version History Backup/Restore
3 Preparation solution for
Read and Sign my Guest Book Windows in Tutorial
4 Summary
Blog 89 which is much
5 End User Experience
Latest Site News easier to
6 Requirements implement.
Hot Tips ­ good value/performance
USB Flash memory pens 7 Method

Useful External Links (inc. Windows
8 What to do if the system does not boot at Introduction
7/8/8.1 ISOs) Step 9
Downloads 9 Making a new backup of Windows If you have to install
Download 10 Automating the restore Windows for a friend
11 Making changes who is not too
Latest RMPrepUSB versions +
12 Getting HotKeys to work computer literate and
downloads
is likely to trash his
Tutorials, How To's and Guides copy of Windows,
01 ­ How to image a Windows you may want a fast
system using a bootable WinPE USB and easy 'Auto­Restore' or 'Reset' partition.
drive and ImageX If anything happens to the OS partition, then the end user can
02 ­ How to create a USB drive that simply pick the 'Restore' option from the boot menu to restore the
will install one of many choices of original Operating System in just a few minutes and with no further
Windows OS's (Vista/Win7/Server user interaction (typical restore times are XP OS=2 minutes,
2008/XP) Windows 7 OS=10 minutes).
03 ­ How to install Windows XP from The procedure below will work on any Windows OS from Windows
a bootable USB drive 2000 or later.
You can also take a backup at any time and overwrite the existing
04 ­ How to boot directly from a USB backup.
drive using an Emulator or VM under You could adapt this method and modify the restore process to just
Windows
delete the main Windows folder and a few other folder (e.g. program
05 ­ CHROMIUMOS ­ a browser OS files, etc.) or just choose to not format the volume and apply the
on a USB Stick image over the top of the existing Windows installation ­ however
06 ­ YouTube Video Tutorials this is often unsuccessful as the system may still not boot or the
07 ­ All about 'Fake' SD cards and user may get strange problems. However, it may be useful to do
USB Flash drives this if you just want to be able to boot to Windows to retrieve
08 ­ Make a bootable USB drive for valuable files before you do a full clean install. It is up to you to
the Norton Ghost Symantec modify the restore.cmd script if you want to do this (e.g. do not run
Recovery Disk/Tool the diskpart script to format the C: drive first).
09 ­ How to make a bootable
BACKTRACK 4/5 (linux) USB drive
10 ­ Boot BITDEFENDER Rescue Traducir
CD from USB as an ISO file
http://www.rmprepusb.com/tutorials/auto_restore 1/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

11 ­ Make a free bootable image Version History
recovery USB flash drive using
FINNIX
Auto_restore.zip
12 ­ Reset a Windows User v1 2012­07­01 First version ­ menu.lst has a typo and your OS may
password
not boot!
13 ­ How to find Windows User v2 2012­07­02 The menu.lst file in the first version may cause
passwords using OPHCRACK 3.4 problems due to a typo! Please use version 2 (V.2) at the bottom of
14 ­ Crack or clear your BIOS this page.
password with PC CMOS CLEANER If you have already installed the original menu.lst and have a
(uses Parted Magic) system which will now not boot to Windows, please proceed as
15 ­ How to emulate USB booting follows:
1. Boot the target system to the grub4dos menu
using Qemu Manager 2. Type P
16 ­ How to boot to different WinPE 3. enter the password  rmprepusb  (in lower case letters)
4. Type C
versions using a single boot.wim that 5. at the command prompt type   root (hd0,0)
contains multiple images 6. Now type chainloader /ntldr if you have an XP system ­ or ­ type
 chainloader /bootmgr  if you have a Windows Vista/7/8 system
17 ­ StartOS ­ a 'Windows­like' 7. Type boot
version of linux on a stick 8. Now download the new version of menu.lst and put it on the C:\ drive and
D:\ drive.
18 ­ ISO Files ­ Burn, Extract, Mount
v3 2012­07­02 Changed restore.cmd and backup.cmd to look for
or Edit ISO files
OS.tag to get the correct partition to backup or restore, so that it
19 ­ Create your own RMPrepUSB now works if you have a boot partition and a system partition.
package using Nullsoft Scriptable v4 2012­11­13 Changed windows menu again so looks for ntldr or
Installer (NSI) bootmgr and not OS.tag (some Win7 systems have a boot partition
20 ­ Add MEMTEST86+ memory test and a system partition). Thanks to James for this feedback!
program to your grub4dos menu.lst
file
21 ­ GRUB4DOS GUIDE (with
Preparation
videos) ­ how to make a multi­boot
drive (+examples) It is assumed that you have already installed Windows XP, Vista, 7
or 8 onto a clean hard disk and that the OS has been setup
22 ­ How to boot PCLINUX (and
correctly for that system and that particular user.
most other 'difficult' linux versions)
It is assumed that there is only one large partition on the hard disk
without using a 'flat­file' structure
which is the OS partition. If you have installed Windows 7 or 8, you
23 ­ How to fix a 'corrupt' USB drive may have a small partition at the beginning of the disk followed by
that causes Windows or the larger OS partition.
RMPrepUSB to stop responding It is obviously easier if you can pre­partition the target system's
24 ­ Boot the Ultimate Boot CD for hard disk to leave room for a backup partition at the end, however
Windows (UBCD4WIN/XP) or BartPE the instructions below show you how to shrink the last partition in
from a USB drive (includes ISO boot) case you have not left any spare unallocated space at the end of
25 ­ Securely ERASE (wipe) your the hard disk.
hard disk of ALL data (before
disposing of it)
26 ­ Send and sniff commands Summary
to/from your USB device (and see
what your BIOS would see!)
Here is a quick summary of what we
27 ­ Diagnose how your BIOS boots will do to make this restore partition
USB drives on an existing Windows system's
28 ­ Recover files and photos from a hard disk:
corrupt SD card or any drive (free!)
29 ­ Boot Hirens Boot CD as an ISO 1.  Make a bootable version of
file from a USB drive (version 15.2) WinPE v3 (Windows 7
WinPE) using the free
30 ­ How to install XP onto a Hard
Microsoft WAIK (no Windows
Disk from an XP ISO on a bootable
7 DVD or ISO required)
USB drive
2.  Install EaSeus Home partition
31 ­ Boot and install Windows 7 or master (free) ­ only required if
Vista or Server 2008 (both 32 and 64 you have a Windows XP
bit) from ISO files from a single target system
bootable USB install drive 3.  Shrink the last partition
32 ­ Create a USB drive with multiple (usually this is the OS
Vista/Win7/Server2008 install ISO partition)
files in 3 simple steps! 4.  Create a new primary NTFS
33 ­ How to create bootable 1.44MB recovery partition at the end

http://www.rmprepusb.com/tutorials/auto_restore 2/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB
and 2.88MB (or larger) floppy disk of the hard disk
images 5.  Copy the WinPE boot files
34 ­ The ZALMAN ZM VE200 SATA made in step 1 to the new
hard disk caddy with DVD/HDD/FDD partition
emulation 6.  Install grub4dos to the MBR
35 ­ How to make a bootable of the hard disk
antivirus AVG RESCUE USB drive 7.  Hide the new WinPE recovery
partition (optional)
36 ­ Boot to Hiren's Boot CD from a
8.  Uninstall EaSeus Home
USB drive (v13/v14/v15.1/15.1DLC)
partition master  (optional) 
37 ­ Create a DOS Bootable USB 9.  Reboot to WinPE
drive (using grub4dos) suitable for 10.  Take a backup of the OS
BIOS flashing
38 ­ Create an iGel Universal
Desktop Converter (UDC) installer End User Experience
USB Flash pen
39 ­ How to repair your USB Flash
drive
40 ­ REDO, a Bare Metal Backup
and Recovery solution
41 ­ Microsoft Standalone System
Sweeper (MSSS) ANTIVIRUS Beta
Tool
42 ­ Make a mini Windows 7
bootable USB pen (using
MAKE_PE3)
43 ­ Install Windows 8, Server 2012,
Win 7, 2K8 & Vista from multiple ISO
files on the same Flash drive
44 ­ USB Boot Kaspersky 10 & 2012
Rescue Disk (AV)
45 ­ How to PXE boot grub4dos or
WinPE (from a Windows 7 PC) using
tftpd
46 ­ Ubuntu 12.04/11.04/11.10 ­ boot
from ISO
47 ­ How to install Windows
Vista/7/SVR2K8 onto a USB drive (or
any partition)
48 ­ Is your BIOS lying to you about
it's RAM memory size?
49 ­ Control your Notebook/Media
Centre PC from your main PC with
Synergy
50 ­ Prepare a bootable USB drive
using linux commands
51 ­ How to edit or make your own
Language.INI file for RMPrepUSB
52 ­ Install Windows 8 as a VHD (no
need to re­partition!)
53 ­ Windows 8/8.1 To Go (boot
Windows 8 from a USB drive!)
54 ­ How to Fix Write­Protected Each time the system boots, the end user will see a menu
Read­Only Drives and SD Cards displayed for 5 seconds:
55 ­ Boot Slax from a USB drive
56 ­ Forgotten Windows password? Boot to Windows
No problem with Kon­Boot! Restore the original Windows image
57 ­ Automatic grub4dos menus,
using hotkeys, hiding the menu and After 5 seconds (this timeout can be changed), the system will boot
silent startup to Windows if no key is pressed by the user. 
58 ­ Trinity Rescue Kit ­ boot from
If the end user selects the 2nd option by using the cursor keys, and

http://www.rmprepusb.com/tutorials/auto_restore 3/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB
USB then enters the password RESTOREME, the system will boot to
59 ­ Save or list all your current WinPE.
passwords
60 ­ Add Plop to your grub4dos
menu
61 ­ Run the OCZ SSD Firmware
update ISO from a bootable USB
Flash drive
62 ­ Chainload syslinux from
grub4dos/grub and vice versa
63 ­ Install XP and Win7 onto a
computer from one USB flash drive
containing ISO files! The user can then type D:RESTORE [or possibly E:RESTORE
64 ­ Boot Abstradrome HDD depending on your partition arrangement] (this can be automated so
Regenerator from an image on a the user does not need to type anything) and  it will automatically
USB drive wipe the original Windows installation and then re­install Windows
from the backup.
65 ­ Make a grub4dos bootable ISO
66 ­ Boot WifiWay/WiFiSlax wireless A typical basic Windows XP system can be fully restored in about 2
security OS from a USB drive minutes, a basic Windows 7 system can be restored in under 10
(persistent) minutes.
67 ­ Boot Fedora 16/17/18 with
persistence from a USB drive using
grub4dos
68 ­ WEE (wee63) and
WEEsetup.exe ­ an alternative
bootloader
69 ­ Boot over the internet with iPXE
70 ­ FbInst and other popular USB
utilities
71 ­ Grubutils ­ menuset, wenv, bios,
grub4dos utilities and batch files
72 ­ Easy2Boot ­ a grub4dos
multiboot USB drive that is easy to
maintain!
73 ­ Try Porteus with persistence
booting from an ISO using
Easy2Boot
74 ­ Boot Winternals ERD
Commander from ISO or flat file
structure The system will then automatically reboot back to the restored
75 ­ Test your memory (RAM/DIMMs) version of Windows.
76 ­ Quickly setup PXE booting to
install any Windows OS or PXE boot There are instructions at the end of this tutorial on how to automate
linux, etc. with SERVA! the process so that the end user does not need to type
D:RESTORE to start the image restore or even enter a password.
77 ­ Create a multiple partition, multi­
You can easily change the user experience by editing the script files
boot USB Flash drive under
and when you are happy that it is all working correctly, you can hide
Windows
the whole backup partition from the end user.
78 ­ Run live XBMCbuntu from a
multiboot USB drive
79 ­ Make an RM Connect CC3 Requirements
Multi­Station Build USB Flash drive
80 ­ How to retrieve files from a You will need to use a Windows system   (I will call this your
computer without booting it to an OS 'office PC')   to make a Windows 7 WinPE bootable OS. 
(via PXE)! It is far more convenient if this is not the same system as
the target system.
81 ­ Make your own automatic
Install Virtual CloneDrive or ImDisk on your office PC.
Windows restore partition (ImageX­
Download the Windows 7 WAIK (this is a LARGE download
based)
over 1GB!).
82 ­ Install XP to hard disk from ISOs Download a copy of EaSeus Home Partition master installer
using WinPE v3 onto a USB stick if your 'target system' is XP and has no
83 ­ Download ImageX, BCDBoot internet access.
http://www.rmprepusb.com/tutorials/auto_restore 4/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB
and other WAIK tools Download RMPrepUSB (full version or portable) and extract
84 ­ Switch XP to AHCI mode it onto a USB stick (copy all files and folders not just the exe
85 ­ Add the O&O DiskImage file).
Professional ISO to your USB The target system should have already been installed with
multiboot drive Windows, all drivers and software. It can have up to 3
primary partitions (or up to 2 primary partitions and any
86 ­ Dynamically change the disk
number of logical partitions).
volume label using grub4dos
87 ­ Install the Ultimate Boot CD onto
a USB drive Method
88 ­ Boot Avira Rescue from USB
89 ­ Automated Windows partition
WARNING: This is intended to be used on a test 'target' system
backup\restore boot menu using
and not on your main Windows PC. I strongly suggest you test it
CloneZilla
out on a system containing non­essential files first! Please do not
hold me responsible for any data loss if things go wrong!
90 ­ Install Windows 8 to a VHD file
on a USB drive!
1. Make a bootable version of WinPE v3 (Windows 7
91 ­ Replace Windows
XP/Vista/Win7 with Windows 8 WinPE) using the free Microsoft WAIK
without a DVD or USB drive
1.  Using your 'office' Windows XP/Windows Vista®/Windows
92 ­ BITS ­ Intel BIOS
7 PC (don't use the target system that you wish to
Implementation Test Suite
image/restore):
93 ­ Boot almost ANY linux ISO from 2.  Download the Windows 7 WAIK ISO file (e.g.
a grub4dos USB drive (e.g. Tails, KB3AIK_EN.iso 1.7GB).
BackTrack or even Ophcrack)! 3.  Download and install your ISO mount utility. (e.g.
94 ­ Boot BackBox from your USB VirtualCloneDrive or ImDisk) and use it to mount the WAIK
grub4dos multiboot drive ISO file
95 ­ Make a bootable Windows 4.  The WAIK Welcome window should launch. If not, double­
Recovery USB Flash drive from a click StartCD.exe on the new drive letter in Explorer. 
Windows 7 system You must agree to the Terms and Conditions and you should
96 ­ Add an automatic linux ISO file have the correct licenses.
menu to your grub4dos multiboot 5.  Install the .Net Framework Setup from the WAIK menu.
USB drive 6.  Install the MSXML 6 SP1 Setup from the WAIK menu.
7.  Install the Windows AIK Setup from the WAIK menu.
97 ­ Write­protect or make a CD/DVD
8.  Exit from the WAIK menu. The WAIK is now fully installed.
partition on a Flash Drive using
You can optionally install the WAIK v3.1 update files too.
SMI_UFDiskUtilities
98 ­ Add Linux Mint 14 ISO files to Follow the next steps carefully to prepare a bootable WinPE
your grub4dos multiboot USB drive OS...
99 ­ Boot Xiaopan with grub4dos
100 ­ Make and boot from a 9.  Click on Start Menu, All Programs, Microsoft Windows
Win8PE_SE ISO file AIK, Deployment Tools Command Prompt to open up an
101 ­ Patch a file using grub4dos Administrator command prompt window.
102 ­ Speed up WinToFlash XP
10.  Type copy ..\x86\imagex.exe c:\ and press Enter.
installs (+fix 'NTLDR is missing'
error)
11.  Type COPYPE x86 c:\pe86 and press Enter.
103 ­ Fix or Repair XP if it is not
booting (using the XP Recovery 12.  Type copy c:\pe86\winpe.wim
Console) c:\pe86\ISO\sources\boot.wim and press Enter.
104 ­ Boot pclinux from ISO with
persistence 13.  Type copy c:\imagex.exe c:\pe86\ISO and press Enter. 
105 ­ Clone your Windows XP Pro
system to a USB drive (using 14.  Download and unzip the files inside AUTO_RESTORE.ZIP
USBoot) and copy them to the C:\pe86\ISO folder
106 ­ Boot any Linux LiveCD ISO
from your Hard Disk 2. Install EaSeus partition master (free version)
107 ­ Quick way to make a WinPE v3
and Backup/Restore ISO (using This next step is not necessary unless you have Windows XP on
Macrium Reflect) your target system. Windows Vista/7/8 Disk Management can be
108 ­ XP Install using Rufus and add
used instead to shrink the partition.
it to your grub4dso multiboot USB
1. On your target system, download and install EaSeus partition
drive
master Home Edition
109 ­ USB Rubber Ducky Hack
http://www.rmprepusb.com/tutorials/auto_restore 5/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB
Device (Hak5) 3. Shrink the last partition (usually the OS partition)
110 ­ Run full Windows XP to Go!
from a USB drive You need to make space for a partition that we can boot to at the
111 ­ How to semi­automate end of your target system's hard disk. You need to make the size of
Windows driver installation the partition large enough to hold the backup image file.
112 ­ Virus/RootKit/Ransomware
Removal and CleanUp
1. On the target system, in Windows Explorer, select all the folders
on the C: drive but do not select any of the files in the root of the C:
113 ­ How to use Easy2Boot with
drive and then right­click and select 'Properties'.
FlashBoot (for that odd system that
won't boot properly) Windows Explorer should report the 'Size' (e.g. 6GB for a typical
114 ­ How to make an Easy2Boot XP install + drivers, etc.).
(grub4dos) USB Flash drive using
linux We will be using ImageX to make the backup and this does
115 ­ Convert a WinPE 'Flat­File' ISO compress the Windows files quite a lot (e.g. 6GB XP will produce a
to a ramdisk (boot.wim) ISO 2GB backup file), so if Windows Explorer says that the target
116 ­ Add Hirens 9.5 to your
systems disk is say 500GB and has 480GB free, then you should
grub4dos USB Multiboot drive
probably make room for a 10GB partition.
117 ­ Install Windows 98SE from an 2. Run the EaSeus partition master application and select
ISO file on an Easy2Boot USB drive 'Resize/Move partition'­ or use Vista/Win7/8 Disk Manager to
118 ­ Make bootable Clonezilla shrink the last partition.
backup/restore USB Hard Disk
119 ­ Boot HitManPro KickStart from 3. Slide the blue circle on the right­hand side of
a grub4dos multiboot USB Flash the  EaSeus partition bar so that the 'Unallocated Space After' box
drive reaches the desired partition size.
120 ­ How to add RedHat Install
4. Click on the Apply  (tick) icon at the top and follow the
ISOs to Easy2Boot
instructions to shrink the partition ­ a reboot may be required.
122 ­ Boot directly to UEFI mode
using Clover Note: although you could also partition and format the new space at
123 ­ Re­Install linux to your Asus the same time, I would recommend shrinking the partition first as
EeePC 701/90x/1000/S101 from a this is probably safer! Shrinking partitions can sometimes go wrong!
USB drive
124 ­ Cold Boot Attack! ­ dump a 4. Create a new primary NTFS recovery partition at
computer's memory to a USB drive the end of the hard disk
125 ­ Create a dual­partition USB
boot drive using YUMI Once the EaSeus partition master has successfully created some
126 ­ Boot CentOS or Fedora from space at the end of the hard disk on the target system, use the
an ISO file using grub4dos same application to partition and format the empty space as a
127 ­ How to make Dual­boot 32 &
Primary NTFS partition. You can use 'Change label' to call the
64­bit MBR & UEFI WinPE USB drive
Volume 'Backup' if you like. If you like you can use Windows Disk
Manager instead of EaSeus to create a 'Simple Volume'.
128 ­ Boot the Parted Magic ISO file
(Live) using grub4dos from a USB
drive 5. Copy the WinPE boot files to the new partition
129 ­ Windows 8.1 To Go on Fixed
Now copy and paste all the files and folders from the C:\pe86\ISO
or Removable­type USB drives
folder prepared in Step 1 above, to the new NTFS (D:) partition
(VHD)
which is now at the end of the hard disk (use a USB Flash drive to
130 ­ 'True Hide' partitions using transfer the files).
grub4dos
131 ­ Boot to a TrueCrypted Win 8.1 6. Install grub4dos to the MBR of the hard disk
hard disk via USB
Useful Articles The easiest way to install grub4dos onto the target hard disk is to
Advanced Format (4K sector) hard use RMPrepUSB. You can either download the portable version and
disks run it from a USB stick or copy the RMPrepUSB folder from your
Fix USB 3.0 'This device can perform office PC onto the USB stick or just install RMPrepUSB onto the
faster' System Tray message! target system.
Download a whole website and view 1. Run RMPrepUSB on the target system and type CTRL+F5 once
it offline using wget! to toggle to the ALLDRIVES mode. Select the target system's hard
Getting started with the Raspberry Pi disk and click on the Install grub4dos button. Follow the prompts
(RPi) and press ENTER to allow RMPrepUSB to copy over the grldr file.
Raspberry Pi + Motorola Atrix 4G
2. Copy the menu.lst file from the new partition (e.g. D:) to the C:
http://www.rmprepusb.com/tutorials/auto_restore 6/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB
lapdock partition. Grub4dos will use the menu.lst on C: unless it is
Boot from CD/USB/Floppy to access accidentally deleted by the user. Keeping a copy of menu.lst on the
an NTFS partition D: drive acts as a backup.
Recording videos with
3. Do not delete or move the file recovery.tag from the backup
Camstudio+Movie Maker for
partition. Ensure the file recovery.tag stays on the new backup
YouTube
partition (e.g. D:\)
XP Setup CD/ISO Clean Installation
Reference 4. IMPORTANT: Move the file OS.tag to the root of C:\  (i.e.
Reboot.pro Tutorials C:\OS.tag) ­ ensure that the file OS.tag is NOT on the D: volume or
Donate any other volume except the Windows C: system volume. Delete it
from any other volume.
Sitemap
The Windows Vista/7/8 Boot partition should be before the added
WinPE partition on the disk (the menu assumes that it will always
before the WinPE partition on the disk. You can tell where the
Windows Boot partition is by looking at the hard disk partitions
using the Windows Disk Management tool (RMPrepUSB Crtl­K will
launch this). The screenshot below shows that the System and
Boot volumes are on the same volume ­ as long as the Boot
volume is before the new WinPE volume then the current menu will
work correctly:

If however, you have a Boot partition which is AFTER the added
WinPE partition (e.g. for some reason you have placed the WinPE
files before the Boot partition), you will need to specify the
partition number of the Boot partition in the menu.lst file by
changing the Windows menu from:

title Boot to Windows\n
errorcheck off
find ­­set­root /ntldr || find ­­set­root /bootmgr
chainloader /ntldr || chainloader /bootmgr

to

title Boot to Windows\n
errorcheck off
root (hd0,1)
chainloader /ntldr || chainloader /bootmgr

where (hd0,1) is the partition that is the Windows Boot partition ­
 where (hd0,0) is the first partition, (hd0,1) is the 2nd partition, etc. ­
for instance, if the Windows 'Boot' partition is actually the 2nd
partition and you have placed the WinPE files on the first partition
(which is unusual!), then change the menu entry to root (hd0,1).

5. Copy the C:\grldr file that was put there by RMPrepUSB over to
D:\grldr. This is a backup copy that can be used in case the C:
partition is destroyed.

Target Hard Disk contents:

C:\OS.tag                          ­ this marks which volume will be
backed up or restored to
C:\menu.lst                        ­ this is the main user boot menu file
C:\grldr                              ­ this is the main grub4dos program

http://www.rmprepusb.com/tutorials/auto_restore 7/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

D:\recovery.tag                   ­ this marks the volume which
contains the WinPE boot files and where the backup image will
be stored
D:\menu.lst                        ­ this is not normally used unless
there is a problem booting ­ it should always be an exact copy of
the C:\menu.lst file
D:\imagex.exe                    ­ used to make backups and
restores 
D:\backup.cmd                   ­ script to take a backup of the
volume containing the OS.tag file
D:\reboot.cmd                    ­ script to reboot the system
D:\restore.cmd                   ­ script to restore the volume that
currently contains the OS.tag file
D:\auto\startnet.cmd           ­ not actually used and can be
deleted
D:\auto\Autorestore.cmd     ­ not actually used and can be
deleted
D:\bootmgr                         ­ the main boot loader file for WinPE
D:\grldr                              ­ the main grub4dos program ­ only
used if the C:\grldr file is missing
D:\boot folder                     
D:\Sources folder             ­ these contain the boot files for
WinPE
D:\OS.tag  <<<< MUST NOT BE PRESENT!!!!!

7. Hide the new WinPE recovery partition

1. First make sure that on the target system's C:\ (root) folder you
have

grldr
menu.lst
OS.tag

2. Now use EaSeus partition master to hide the new restore
partition using the 'Hide Partition' menu item. (You can do this later
if you prefer, once you have tested that everything is working ­ it
does not have to be done now and will not affect the backup
image). Hiding the partition prevents the user from deleting the
WinPE OS or the backup image!

An alternative is to use the Windows Disk Management MMC to
remove the drive letter from the backup partition, however the end
use could easily assign a new drive letter in the same way.

Another alternative is, if you have Vista or Windows 7/8 (or if you
boot to the WinPE partition), you can use diskpart to hide the
backup partition at any time, as follows:

Open a Command Console with Administrator rights
type DISKPART
type LIS VOL and not the drive letter of the new partition
(e.g. D:)
type SEL VOL X    (where X is the new drive letter
type SET ID=27
type EXIT

Note: To unhide the partition, set the ID as type 07 for NTFS. You
can find the partition that you want to unhide by using the
DISKPART commands SEL DIS 0, LIS PAR and then SEL PAR
N  (where N is the partition number that you want to unhide) and
then type SET ID=07 and EXIT.

3. Right­click on the C:\menu.lst  file and choose 'Properties' and
click on the 'Hidden' and 'Read­only' tick boxes and then click on
'OK'

http://www.rmprepusb.com/tutorials/auto_restore 8/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

4. Right­click on the C:\OS.tag    file and choose 'Properties' and
click on the 'Hidden' and 'Read­only' tick boxes and then click on
'OK'

5.  Right­click on the  C:\grldr     file  and choose 'Properties' and
click on the 'Hidden' and 'Read­only' tick boxes and then click on
'OK'.

8. (optional) uninstall EaSeus Home partition master

Now prepare the system for imaging by uninstalling EaSeus
partition master and RMPrepUSB and any other applications or files
that you do not wish the user to see when he/she restores
Windows.

Run the disk cleanup tool and delete all IE browser history, cookies,
etc. alternatively run CCleaner or a similar cleanup application. 
Imagex will not backup the page file or hibernation file so we don't
need to worry about these.

9. Reboot to WinPE

1. Now reboot the target system. You should see the grub4dos
menu appear for 5 seconds as the system boots:

2. Select the 2nd menu entry (as shown above) and then hit the
Enter key to select the 'Restore' option ­ enter the password
RESTOREME (in uppercase letters) when prompted.

3. The target system should now reboot to WinPE and you should
see a black WinPE console window with a command prompt.

4. (optional) Check that the system will still boot to Windows by
typing D:reboot (or possibly E:reboot) at the command line and
letting the menu timeout so that the system reboots to Windows.

Note: See below if the system does not now boot correctly!

10. Take a backup of Windows

Note: If you have enabled the automated restore feature (as detailed
in the section below), then when you are prompted to perform a
restore (Y/N) ?  type the uppercase letter B to run backup.cmd.

1. We now need to make a backup, so reboot to WinPE (select the
Restore option in the grub4dos menu) and type D:backup (or
maybe E:backup) and hit the Enter key to start the backup of the
OS volume (which may be called D: when booted to WinPE). The
Windows volume that contains the file OS.tag will be backed up to
http://www.rmprepusb.com/tutorials/auto_restore 9/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

a file backup.wim on the backup volume.

2. Once it completes successfully, type D:reboot and hit the Enter
key to return to boot to Windows again.

If you don't want to hide the restore partition so that the user can
make use of the unused free space, then I suggest you set the
Hidden attributes on all the files, so that the user is unable to see
them easily and thus prevent him/her deleting them accidentally.

If you want to maximise the amount of available space on the OS
drive and reduce the size of the backup partition to the
minimum, you will need to resize the backup partition. This can be
done as follows:

Note the size of all the files (including the backup.wim file)
on the backup partition (e.g. say it is 6GB)
Copy all the files to a folder on the C: drive (e.g.
C:\TEMPBAK)
Delete the backup partition using Disk Manager or EaSeus
partition master
Resize the C: partition to expand it so that it leaves just
enough space for the backup files (allow at least 500MB
extra just to be safe!) ­ so leave 6.5GB unallocated in this
example
Create a new NTFS Primary backup partition in the
remaining space
Copy all the files from C:\TEMPBAK to the new volume
Delete the C:\TEMPBAK folder
Hide the backup volume if desired or remove it's volume
letter using Disk Manager

What to do if the system does not boot at
Step 9
Don't Panic!

If you rebooted the system at Step 9 and it did not show the menu
with the two items in it, but you have a prompt like this:
grub>
then you probably do not have a menu.lst file present. You can try
booting back to Windows by typing in the grub4dos console:

If you have Windows XP:
find ­­set­root /ntldr
chainloader /ntldr     
boot

or if you have Windows Vista or later:
find ­­set­root /bootmgr
chainloader /bootmgr
boot

The target system should then boot to Windows correctly and you
can fix the problem.

You can also get to the grub4dos command prompt by typing P and
then entering the password rmprepusb when prompted. Then type
C for the command prompt.
You can examine the hard disk contents by typing
find
and then list the directory contents of each partition by typing
ls (hd0,0)/
http://www.rmprepusb.com/tutorials/auto_restore 10/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

ls (hd0,1)/
etc.
etc.

If the system always boots to the WinPE shell, check that the
Windows Boot partition is before the added new WinPE partition. If
not see Step 4 above.

If all else fails, boot WinPE from a USB stick or a Windows
installation DVD and check the files.

Note: When testing the target hard disk boot menu and backup and
restore, always remove your USB drive from the target system as it
may contain OS.tag and Restore.tag files which will confuse the
menu system!

If you want to remove the grub4dos boot loader and just go back
to booting the hard disk straight to Windows, you can do this using
RMPrepUSB as follows: hit CTRL+F5 to show all drives ­ select
the hard disk in the disk list box ­ CTRL+B to install the standard
Windows MBR boot code. To run RMPrepUSB, you can boot from
a WinPE USB stick, Windows install DVD or if possible, from the
WinPE installed on your hard disk via the grub4dos menu, and then
run RMPrepUSB directly from a USB flash drive.

You can make a bootable WinPE USB Flash drive simply by
formatting the USB Flash drive using RMPrepUSB with the WinPE
v2/v3 [bootmgr] radio button ticked and then copy all the files from
C:\pe86\ISO over to the USB Flash drive. This should get you out
of any problems if you cannot boot your hard disk at all!

Making a new backup of Windows
If for any reason you want to make a new backup, then just boot to
the WinPE partition again and type D:backup. The old backup.wim
file will be erased and a new one created.
Note: If you have previously made the backup.wim file Read­Only
then the operation will fail.

Automating the restore
If you want to make it really simple for the user so that he/she does
not have to type d:restore when they get to the command prompt,
then you can modify the boot.wim file as follows:

1.     On the 'office' system, launch the WAIK command shell (right­
click ­ run as administrator)  window using the Start Menu. Close all
other cmd and Explorer windows.

2.     Type mkdir c:\pe86\mount  to create an empty folder

3.     Type dism /Mount­Wim
/wimfile:C:\pe86\iso\sources\boot.wim /index:1
/Mountdir:C:\pe86\mount

4.     You can now use Windows Explorer to edit the image which
you will find at C:\pe86\Mount. Note: If using Windows XP, you are
advised to hold down the SHIFT key if deleting files or folders in
the image.

5.     Copy the two files startnet.cmd and autorestore.cmd,
http://www.rmprepusb.com/tutorials/auto_restore 11/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB
which can be found in the downloaded AUTO folder, onto the
C:\pe86\mount\windows\system32 folder (this overwrites the
existing startnet.cmd file).

6.     Commit the changes to boot.wim using the command: dism
/Unmount­Wim /MountDir:C:\mount /commit

Note:  If you do not want to keep the changes,
use /discard instead of /commit.   Read the WAIK .chm help files
for more information.

7. Now replace the \sources\boot.wim on your target
system's recovery partition with the new version from your
office PC's C:\pe86\iso\sources\boot.wim (transfer it using a
USB Flash drive).

When WinPE boots, it will now find and run \restore.cmd on the
backup partition automatically. 

If you now want to run a backup and overwrite the current
backup.wim file, then type the secret key B when prompted
to answer Y or N. 
If you want to get to the command prompt, then type B again
when backup.cmd prompts you to make a backup.

If you don't want any user password for the Restore menu option,
simply comment out the password line in C:\menu.lst with a #
character as shown below:

title Restore the original Windows image\nTip: The password
is RESTOREME\nThen type RESTORE to restore the
original Windows image
# password RESTOREME
find ­­set­root /recovery.tag
chainloader /bootmgr

Making changes
Make sure that any changes you make to the menu.lst file
are also made to the copy of menu.lst on the other partition.
As this is a backup menu, it will become active if your other
partition becomes corrupt. If you have changed the partitions
around, you may find that the other menu.lst is used, so
always duplicate any changes by copying the modified
menu.lst to overwrite the 2nd copy.
The menu timeout that appears for 5 seconds is actually
derived from C:\menu.lst file. You can add a background
image and modify the menu itself. Look at Tutorial #21 for
details about grub4dos and on how to change the menu.
You can change the menu password (or remove it) by editing
the C:\menu.lst file.
The script (.cmd) files are run from the backup/recovery
partition, these files are restore.cmd and backup.cmd.
Restore.cmd will format the drive that contains OS.tag and
then apply the backup image to the same volume. You can
edit these files also, if you wish. Do NOT double­click on
them if you are running Windows!
If you have a Windows system with a boot partition and a
system partition, the end user will have to type E:RESTORE
instead of D:RESTORE ­ in this case you will need to
change the help message in the C:\menu.lst file from D: to
E: (see red text in menu below). If your target hard disk has
more partitions, you may need to type F:RESTORE or even
G:RESTORE.
Always keep a copy of C:\menu.lst on D:\ in case the C:
volume is accidentally wiped, so that you can boot to WinPE
http://www.rmprepusb.com/tutorials/auto_restore 12/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

and restore the system again. The same applies for the grldr
file too.
The .tag files must not be deleted, as these determine which
OS is booted and where the backup image is kept.
If you have used the startnet.cmd and autorestore.cmd files
to modify the \sources\boot.wim file, do not change the name
of \restore.cmd because autorestore.cmd looks for this file. If
you want to run a different file, then delete the contents of
\restore.cmd and then add in a line inside it to call your own
script or executable.
If you want to edit the C:\Menu.lst file and have set the
properties to hidden and read­only, you must unset these first
before you can change the contents. If you are at the WinPE
command console, you can do this using NotePad and then
use File ­ Open and then right­click on the C:\menu.lst file
and choose Properties, then untick the read­only checkbox.
The password rmprepusb  statement in the menu.lst file
prevents the end user from being able to edit the menu.lst file
when the menu is loaded (as grub4dos normally allows this
and the end user could see the restore password). If you
want to change the menu whilst it is running, then type P and
then enter the password  rmprepusb ­ now you can edit the
menu using E or gain access to the grub4dos console by
typing C. Note that any menu changes you make are made
to a copy in memory and so are not permanent, they are just
valid for that session and do not actually change the
contents of the c:\menu.lst file. In edit mode you can add,
delete or change any line in a menu and then hit the ESC
key to get back to the user menu and test out the
changes. See Tutorial #21 for more details.
You can encrypt the passwords in the menu.lst so that even
if the user can view the menu.lst file, he will just see
gibberish text. This is done by finding the md5 hash of your
password and using the syntax:
                               password ­­
md5  $1$6$ftCQWsyP7jK5sUt/JMHMi/

see the grub4dos tutorial here for more details.

menu.lst
write (md)0x220+1 !BAT\necho ­n ­P:0000 $[0133]      
               ­­­ BOOT MENU ­­­                                  
      \0                              
initscript (md)0x220+1

password rmprepusb

default 0
timeout 5
color white/blue 
color normal=0x0c highlight=0x1e helptext=0x0D
standard=0x02 border=0x0c

title Boot to Windows\n
errorcheck off
find ­­set­root /ntldr || find ­­set­root /bootmgr
chainloader /ntldr || chainloader /bootmgr

title Restore the original Windows image\nTip: The
password is RESTOREME\nThen type D:RESTORE
to restore the original Windows image
password RESTOREME
find ­­set­root /recovery.tag
chainloader /bootmgr

http://www.rmprepusb.com/tutorials/auto_restore 13/14
17/3/2015 81 ­ Make your own automatic Windows restore partition (ImageX­based) ­ RMPrepUSB

Getting HotKeys to work
If you want the grub4dos menu to work with hotkeys, then look at
Tutorial 57. Simply download the hotkey file from Tutorial 57 and
add it the same folder as the menu.lst file. Then add the line /hotkey
to the top of the menu and add the text ^F4 to the restore menu:
e.g.

/hotkey
write (md)0x220+1 !BAT\necho ­n ­P:0000 $[0133]                
     ­­­ BOOT MENU ­­­                                         \0            
                 
initscript (md)0x220+1

password rmprepusb

default 0
timeout 5
color white/blue 
color normal=0x0c highlight=0x1e helptext=0x0D
standard=0x02 border=0x0c

title Boot to Windows\n
errorcheck off
find ­­set­root /ntldr || find ­­set­root /bootmgr
chainloader /ntldr || chainloader /bootmgr

title ^F4 F4 Restore the original Windows image\nTip: The
password is RESTOREME\nThen type D:RESTORE to
restore the original Windows image
password RESTOREME
find ­­set­root /recovery.tag
chainloader /bootmgr

Č
ċ AUTO_RESTOR… Steve Si, 13 Nov 2012, 03:27
v.4 ď
Iniciar sesión | Actividad reciente del sitio | Informar de uso inadecuado | Imprimir página | Con la tecnología de  Google Sites

http://www.rmprepusb.com/tutorials/auto_restore 14/14

Potrebbero piacerti anche