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
Avr 222014
 

Discuss it here

Download it here

Latest change log since previous version :

added : can patch the volume serial number (in boot sector)
added : can patch the hidden sectors (in boot sector)
added : can patch heads and secpertrack (in boot sector)
fixed : writing MBR or BS would not work (ressources not saved to current directory)
added : will refresh drives when on DBT_DEVICEARRIVAL/DBT_DEVICEREMOVECOMPLETE
added : generate random serial number (to patch boot sector)
added : create disk will now offer mbr, gpt or raw
fixed : create partition was adding one sector too much
fixed : create unique partition was not wiping partitions above 1st partition.
added : partition editor (using IOCTL_DISK_GET_DRIVE_LAYOUT)
added : delete partition in partition editor
added : create partition in partition editor
added : gpt support in partition editor (using IOCTL_DISK_GET_DRIVE_LAYOUT_ex)
added : gpt support in create partition (using IOCTL_DISK_GET_DRIVE_LAYOUT_ex)
added : gpt support delete partition (using IOCTL_DISK_SET_DRIVE_LAYOUT_ex)
modified : create a GPT partition when there is no partition yet
modified : IOCTL_DISK_GET_DRIVE_LAYOUT_ex before IOCTL_DISK_SET_DRIVE_LAYOUT_ex when deleting/creating a part
added : check disk, next to format using fmifs.dll
added : change partition type
added : change partition boot indicator
added : support for wimboot (windows 8.1 update 1 option)

clonedisk_216

 Posted by at 8 h 44 min
Avr 212014
 

In the previous article, we have seen how to benefit from the new wimboot feature of MS Windows 8.1 : install, capture with wimboot (from winpe), restore with wimboot (from winpe).

CloneDisk now also support wimboot (thru wimgapi.dll) for those who prefer a GUI rather than the DISM command line.

Capturing with the wimboot flag will make it so that the wim file will use a XPRESS chunk size of 4096 (vs 32768) and the image will have the extra flag wimboot.

Some facts :

-My clean install is around 13 GB.

-My wim file is around 7 GB.

-My « wimboot » install occupies « only » 3.5 GB  on drive C. (of which near 3 gigs are taken by hyberfil.sys, pagefile.sys, swapfile.sys)

Discuss it here.

wimboot_1

 Posted by at 21 h 53 min
Avr 122014
 

In April 2014, MS has updated Windows 8.1 to Windows 8.1 Update 1. (buildlab 6.3.9600.17031 and up).

One feature which was not very much marketed was the Windows Image File Boot also named Wimboot.
You can read more here on MS Web site.

In short, here is what MS says :
Windows image file boot (WIMBoot) lets you set up a PC so that it runs directly from a compressed Windows image file (WIM file).
WIMBoot can significantly reduce the amount of space used by Windows files. This helps you provide more free space to users, and helps you manufacture Windows on PCs with smaller drives.

So lets see how we can use this new feature :

We’ll assume you have already installed your Windows 8.1 (You can download an evaluation version here).

1-Lets make a WINPE out of the Windows 8.1 update 1 iso/dvd (I use QuickPE).

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

3-Capture the installation : dism /capture-image /imagefile:e:\install.Wim /capturedir:c:\ /name:install /wimboot
Note here : e:\ is a second partition on my hard drive

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

5-Apply our wim file (from step 3) to my C drive : dism /apply-image /imagefile:e:\install.Wim /index:1 /applydir:c:\ /wimboot

Note : after step 5, I had to do a bcdboot X:\windows /s X:\ where X is the partition where you just applied your WIM file.
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 3GB (when it was about 20GB minimum before step 1).

This should work on X86 or X64 (tested), with a UEFI or MBR (tested) partition, with SSD drive or standard drive (not tested).

Here below a picture showing my final / wimboot setup.

wimboot

 Posted by at 22 h 27 min
Avr 112014
 

In a previous article, we have seen how to make a bootable image using Windows API and MS Virtual Disk.

Now, lets do the same but this time we will manipulate bytes in the Drive Master Boot Record and in the Volume Boot Sector with CloneDisk and ImDisk.

1-Create a raw disk image (here test.img=64 MB)

clonedisk_mi1

 

2-Retrieve file size in sectors (here 131072 = (64MB * 1024KB * 1024B) / 512 sectors)

clonedisk_mi2

 

3-Modify partition table : chs end/start=1023/254/63, sectors before=2048, total sectors=129023 (131072-2048-1)

clonedisk_mi3

 

4-Write NT6 mbr

clonedisk_mi31

 

5-Mount disk image (ImDisk auto detect offset=2048, size of disk=129023)

clonedisk_mi32

 

6-Format to NTFS

clonedisk_mi33

 

7-Change Hidden Sectors in Boot Sector  (since it is incorrectly set to 1)

clonedisk_mi4

8-Boot (in qemu or virtualbox)

 

 

 Posted by at 18 h 56 min
Avr 072014
 

Changes since latest changelog

added : set attributes in a wim image
added : can append datas to a wim file
added : support for dynamic VHD’s
added : detach vhd
modified : moved all virtualdisk functions to a new buttonbar
added : create differencing vhd (i.e a vhd with a parent)
added : open vhd in read only mode
added : expand vhd
added : merge vhd
added : reference file for wim capture and wim apply

2.1.0
added : G4D as bootloader next to nt5/nt6
added : manifest to run with admin rights
added : read offline hal/processor details
added : delete offline currentcontrolset\enum key
removed : dump registry (should be another software)
removed : jvdialogs unit

clonedisk210

 Posted by at 11 h 11 min
Avr 072014
 

Latest changelog

fixed : should detect if a socket is already in use
fixed : messages sent from threads would not always reach the memo box
added : will execute an executable/batch if cmd parameter is present in config.ini
fixed : httpd will handle both non keep-alive (default) and keep-alive http requests
fixed : would create crashes (under certain conditions) if the root path was incorrect
fixed : would not start tftpd if not set in config.ini
added : support for dhcp-relay (Thanks to Stefan Smet)

Discuss it here.
Download here.

tps17

 Posted by at 9 h 57 min
Mar 292014
 

Lately I had cloned a physical XP installation to run it into VirtualBox.

It went fine except for the network drivers.

Rather than looking for the right driver over internet (which can be a painful process sometimes) I decided to use DriverPacks and dpinst from Microsoft.

1-Download the proper driverpack (lan, wlan, storage, etc) for the correct O.S (nt5,nt6,x86,x64).
2-Unzip it to a folder (c:\drivers for exemple).
Note1 : I mounted my disk image offline to inject my files.
Note2 : for a physical machine, best would be to stuff it all on a USB key.
3-And run dpinst from the command line (dpinst /path c:\drivers) OR use my GUI (here) to make it easier.

And voila, all needed drivers will be installed 🙂

dpinst

 Posted by at 18 h 49 min
Mar 232014
 

This is IpTools Version 2.

Version 1 started in 1999 (initially written in VB6, then rewritten in Delphi).
The developpement was very active at first (the first 6 years).
Then life went busy and the tool did not evolve much apart from bug fixes.
Original page for version 1 is here.

I have decided to give it a second chance, first in rewritting completely the interface which was initially build around a network sniffer.
I also removed all screens which I believe were not related to network matters.
Next step is to review all components used and migrate to Delphi XE 32/64 bits.

The tool is now divided in 6 categories (for now) over 50 screens (!) :
-Scan
-Microsoft Services
-System
-Servers
-Clients
-Spoof

Here below some screenshot which should be self explanatory :

iptoolsv2_6

iptoolsv2_5

iptoolsv2_4

iptoolsv2_3

iptoolsv2_2

iptoolsv2_1

Download it here
Contact me here

 Posted by at 20 h 52 min
Mar 162014
 

I got myself a rotary potentiometer at dx.com and decided to come up with a basic article.

First, lets have a quick look at the below schematic to understand how a potentiometer works.

analogin_potentiometer

 

Now, lets plug it to our arduino and while we are it, lets use its retrieved value (thru analogread) to dim a led (thru analogwrite).

potentiemter_bb

 

Now lets have a look at the arduino sketch

 

byte potPin=0; //Analog 0 connected to the potentiometer
byte LEDPin=6; //Connected to LED on Pin 6
float potValue=0; //Value returned from the potentiometer
float v=0; //voltage (0-5v)

void setup(){
  Serial.begin(9600);
  pinMode(LEDPin, OUTPUT); //Set Pin 6 as an Output
}
 
void loop(){
  
  potValue = analogRead(potPin)/4; //Read the potentiometer, convert it to 0 - 255
  Serial.println(potValue,0);
  v=potValue*5/255; //to calculate the voltage send out on pin6
  Serial.println(v, 2);
  analogWrite(LEDPin, potValue); //Write the converted potentiometer value to LED pin
  delay(100);
}

here we go : rotate your potentiometer and see your led dim in and out

 Posted by at 16 h 53 min