Mai 062014
 

There are cases where your operating system is not booting anymore but you really need to retrieve important/personal files.

You could boot a WinPE onto a USB key (using QuickPE and Rufus) to work locally on the faulty computer but you could also do it remotely, confortably settled from another O.S.

Here below the steps :

1-Lets make a WINPE out of  windows (7 or 8) iso/dvd (I use QuickPE) .

2-Boot onto this Winpe (I use rufus to « burn » the winpe iso onto USB).

3-Launch DevIO : from the WinPE command line, type devio -r 9000 \\physiscaldrive0 1 .
Note : the -r is for read only and physicaldrive0 for disk 0 and 1 for first partition.

quickpe2

4-Launch ImDisk : from a remote host command line, type imdisk -a -t proxy -o ip -f xxx.xxx.xxx.xxx -m X:
Note : replace xxx.xxx.xxx.xxx by the ip of your WinPE / faulty computer

recover2

5-At this stage, you should now have a new logical drive letter X: appearing on your remote host.
You can now recover your files remotely !

 Posted by at 12 h 49 min
Mai 052014
 

In a previous article, we had seen how to backup a disk (offline) with CloneDisk over the network using a windows share.
Thus, a windows share is not always handy and fast.
Lets see how to make a backup over the network easier and faster using DevIo.

Here below the different steps to backup or clone a (physical or logical) disk (hosting any operating system) using WinPE and CloneDisk + DevIO.

1.Getting tools
First, lets get the needed files and prepare our working folder :
QuickPE and unzip it to x:\quickpe.
CloneDisk and unzip it to x:\quickpe\extra

2.Preparing
Now, lets prepare our WinPE iso.
launch _RUN_ME.CMD.
If you have MS ADK or MS WAIK already installed then choose option 1 or 2.
If you dont have these (or have no idea what this is), choose option 4 or 6 if you an MS Windows ISO at hand, or 5 or 7 if you have a MS Windows DVD at hand.
Let the batch run.

quickpe2

3.Booting
At this point, you have an iso file in x:\quickpe\x86 named winxx.iso.
you can either burn it to cd/dvd (easiest path),
« burn » to a usb stick with rufus,
or (more complex) boot it thru pxe (using these guides).

4.Target
The target is the host where you will backup/dump your disk, over the network.
From a command line, launch devio 9000 c:\dump.img 0 0 .
Note that disk.img must exist and must be at least as big as the source disk : CloneDisk can do it for you (under virtual disk / make raw disk) or use the linux command : dd if=/dev/zero of=disk.img bs=268435456 count=1 (268435456 is 1024*1024*256=256MB).
Note that you can compile devio for different hosts (windows, linux, etc) or else you can also run the windows exe on ubuntu (needs wine) if you are lazy (like me).

devio2

5.Backuping
Once booted, ensure you have a correct network setup using PeNetwork : click on the info button.
Now, launch clonedisk from x:\extra\clonedisk folder, choose your source drive and lets backit up to a devio target (see step 4).

clonedisk_winpe1

devio3

devio4

Once CloneDisk has completed its backup, you should see Devio close its connection.

devio5

 Posted by at 17 h 26 min
Mai 042014
 

A few months ago I wrote an article about Olof’s Arsenal driver.

Now is time for a command line version of ImgMount GUI named ImgMountCMD.
Exe is about 50 kb and can do as much as the GUI version.
Moreover, both the GUI and the command line version have been tested in WinPE and work fine including installing the driver.

Discuss/download it here.

The syntax for the command line is the following :


ImgMountCMD file add path
ImgMountCMD file new path size(MB)
ImgMountCMD file shm name
ImgMountCMD file remove id
ImgMountCMD vm add path
ImgMountCMD vm new size(MB)
ImgMountCMD vm remove id
ImgMountCMD pm add path
ImgMountCMD pm new size(MB)
ImgMountCMD pm remove id
ImgMountCMD list
ImgMountCMD removall
ImgMountCMD driver check
ImgMountCMD driver install driver.inf
ImgMountCMD driver remove

 Posted by at 17 h 12 min
Mai 042014
 

MistyPE is an excellent WinPE generator based on Winbuilder.

It is minimalist (in a way it is easy and fast to build WinPE) but still very flexible so that one can add many extra softwares in there.

Download/Discuss it here.

How to use it? Easy :
-Launch winbuilder,
-Go to source tab,
-Select your source directory to point to your windows media installation dvd drive (E:\ for me),
-Click play,
-Retrieve your winpe iso in x:\MistyPE\MistyPE.Project.Output\.

 Posted by at 17 h 05 min
Mai 042014
 

If, like me, you often get confused with WinPE versionning, here below a quick summary :

  • WinPE 2.0 – 6.0.6000 – Vista
  • WinPE 2.1 – 6.0.6001 – Vista SP1 and possibly Server 2008
  • WinPE 3.0 – 6.1.7600 – Windows 7 and possibly Server 2008 R2
  • WinPE 3.1 – 6.1.7601 – Windows 7 SP1 and possibly Server 2008 R2 SP1
  • WinPE 4.0 – 6.2.9200 – Windows 8 and possibly Server 2012
  • WinPE 5.0 – 6.3.9600 – Windows 8.1
  • WinPE 5.1 – 6.3.9600 – Windows 8.1 Update 1

Thanks goes to Misty on reboot.pro for making this clear !

 Posted by at 16 h 58 min
Mai 042014
 

Lately I had been testing a lot Windows 8.1 and WinPE generated from Windows 8.x (i.e WinPE 4.0, 5.0, 5.1).

The Windows QEMU I had (lots of versions out there) was giving me a windows error 0x0000005d which means UNSUPPORTED_PROCESSOR .
Indeed, starting with Windows 8, you need a processor that supports NX/PAE/SSE2.
NX is not supported with older windows QEMU versions.
More details from MS here.

Googling around it appeared the solution was to use the -cpu command line parameter with QEMU.
Unfortunately, none of the QEMU versions I had was supported that parameter.

I then found the right (and latest) windows QEMU version (2.0.0) here.
I downloaded this version qemu-w32-setup-20140418.exe.
The command line : start qemu-system-i386.exe -L .-m 512-cdrom D:\WinPE5.1.iso-cpu Nehalem allowed me to boot my latest Windows 8.1 with success ! 🙂

Also, note the use of coreinfo (from sysinternals) to check your processor flags.

qemu_nx2

 Posted by at 16 h 56 min
Avr 282014
 

A cool video on youtube I have seen today around a 3D camera in XNA, well explained.
C# code source given here.

I have decided to translate to Vb.Net and to distribute the full project here.

It goes as is :
declare a camera object, a floor object and basiceffect in your mail class
initialise these variables (and add the cam to the game components)
draw the floor while passing the cam and the basiceffet as parameters

A quick video to demonstrate it (or watch the original video).

 Posted by at 20 h 10 min
Avr 262014
 

It has been a while that I wanted to do this : a X64 version of CloneDisk.

My main drive was to use it from X64 bits WinPE’s.

Well thanks to Delphi XE, I was able (after much corrections) to compile it under a X64 environement.

CloneDisk page here.
Download X64 here.
Download X32 here.

 Posted by at 19 h 01 min
Avr 262014
 

More than once did I spend (lose…) long minutes on google to find the proper syntax with windows bcdedit command line.

I came with the quick batch below that will set different entries : win7, winpe, grub4dos, etc …

You need to edit the batch to set the path to your BCD store.

Beware that the BCD is overwritten each time.

Note that this is greatly (mostly) inspired from this page.


@echo off
setlocal
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\temp\BCD

del %BCDSTORE% /F

rem create - rem if not needed
%BCDEDIT% /createstore %BCDSTORE%

rem create bootmgr entry
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20

ECHO _________________________________________
ECHO BCDEDIT Main Menu
ECHO.
ECHO Menu Choices
ECHO.
ECHO 1 Add Win7
ECHO 2 Add VHDBOOT
ECHO 3 Add Grub4Dos
ECHO 4 Add Winpe
ECHO 5 Add RamDisk
ECHO 6 Add NTLDR
echo -
ECHO 9 Exit
ECHO _________________________________________
ECHO.
SET /P userChoice=ENTER OPTION:

if %userChoice% == 1 GOTO win7
if %userChoice% == 2 GOTO vhdboot
if %userChoice% == 3 GOTO g4d
if %userChoice% == 4 GOTO winpe
if %userChoice% == 5 GOTO ramdisk
if %userChoice% == 6 GOTO ntdlr
if %userChoice% == 9 GOTO QUITMENU

:win7
rem add new windows7 entry
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% device partition=C:
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice partition=C:
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows 7"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof

:ntdlr
%BCDEDIT% /store %BCDSTORE% /create {ntldr}
%BCDEDIT% /store %BCDSTORE% /set {ntldr} device partition=C:
%BCDEDIT% /store %BCDSTORE% /set {ntldr} path \ntldr
%BCDEDIT% /store %BCDSTORE% /set {ntldr} description "Windows XP"
%BCDEDIT% /store %BCDSTORE% /displayorder {ntldr} /addlast
goto :eof

:vhdboot
rem add new vhd boot entry
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% device vhd=[C:]\disk.vhd
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice vhd=[C:]\disk.vhd
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows 7 VHDBOOT"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof

:g4d
rem add grub4dos
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% path \grldr.mbr
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Grub4dos"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof

:winpe
rem add winpe
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set %guid% device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof

:ramdisk
rem add ramdisk
%BCDEDIT% /store %BCDSTORE% /create {ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set {ramdiskoptions} ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
goto :eof

:eof
echo "this is the end..."

 Posted by at 15 h 54 min
Avr 242014
 

In the previous article, we have seen how to benefit from the new wimboot feature of MS Windows 8.1 using the DISM command.

Thanks to the free/opensource WimLib, let’s now see how we can proceed with the capture/apply phase. This WimLib method will be similar to the DISM one.

Since Wimlib 6.3, you no longer need a Windows 8.1 Update 1 source which means you can use any Winpe 3/4/5 version !

 

Here below the procedure (we assume Win8.1U1 is already installed on C drive):

1-Lets make a WINPE out of  windows (7 or 8) iso/dvd (I use QuickPE) .

2-Boot onto this Winpe (I use rufus to « burn » the winpe iso onto USB).

3-Capture the installation : wimcapture.cmd c:\ e:\install.wim --wimboot
Note : e:\ is a second partition on my hard drive.
Note : wimlib binaries are in x:\extra\wimlib if you used QuickPE.

4-Format C drive (so that we start from a fresh drive)

5-Apply our wim file (from step 3) to my C drive : wimapply.cmd e:\install.wim c:\ --wimboot

Note : before step 5, you may want to perform the following command wimlib-imagex update install.wim 1 --command="add CustomWimBootCompress.ini \Windows\System32\WimBootCompress.ini" in order to fully apply bootmgr files (and not use pointers to the wim file).
Here is the customewimbootcompress.ini.
This applies only if you have one unique boot & system partition which is nowadays rarely the case as Windows always created a hidden/reserved partition for the boot files.

And voila, you should end up with a C drive occupied by only 250 MB (before 1st boot where pagefile.sys and hyberfil.sys will be created).

 Posted by at 21 h 30 min