LiveCD/en

From DiskCryptor wiki
Jump to: navigation, search
Prior to encrypt the system partition, it is strongly recommended to create a bootable Windows CD/DVD disk (LiveCD) with DiskCryptor.
That will allow you to gain access to data in case of any emergency (being unable to boot the system), and also allows for partition encryption and decryption operations to be performed.

Contents

BartPE based LiveCD

Starting from version 0.2.6, DiskCryptor includes BartPE plugin that can integrate the program into Windows LiveCD, based either on Windows XP or Server 2003.

  1. Download PE Builder.
  2. Once done, you will need to create "plugin\dcrypt" folder in "PE Builder" directory, and to copy there the contents of "bartpe" folder located in the DiskCryptor's release archive.
  3. Then run PE Builder, point it to the location of Windows distribution files, make the LiveCD and burn it to a disk.

When booted from LiveCD, you will be able to run DiskCryptor from the BartPE menu, or to use the console version from the command prompt.

WinBuilder based LiveCD

Starting from version 0.9, DiskCryptor includes WinBuilder plugin that can integrate the program into Windows LiveCD, which can be based on Windows Vista or 7.

In the preparation of such LiveCD, you would need the following:

  • Download WinBuilder.
  • Get ready 32-bit Windows Vista/7 setup DVD (at the time of this writing, WinBuilder projects on basis of which it is proposed to build Windows Vista/7 LiveCD, do not support building from 64-bit Windows Vista/7 setup DVD; the system itself where the building process is to be performed, can be 64-bit).
  • Download and install Windows Automated Installation Kit (AIK) for Windows 7. This package (WAIK) also supports Windows Vista (SP1 and later), and it does not require your Windows Vista installation DVD to have any service packs integrated into it.

Building on basis of Windows Vista

  1. Launch WinBuilder software, add checkbox to "vistape.winbuilder.net" project, and start the download.
    Note: If you will start the download of full project, without modifying selection of individual components according to your needs, then it is possible, that the project would already contain DiskCryptor inside it (true at the time of this writing). If you want to take control into your hands and be sure of what is to be included into LiveCD (as it is not possible, immediately, to check the presence of valid digital signature on DiskCryptor files distributed with the project, as they are encoded inside a single file that also contains instructions for LiveCD integration), then use the instructions below.
  2. When download is completed, exit the program and copy files from "bartpe" folder inside DiskCryptor distribution, into "Projects\VistaPE-CAPI\dcrypt" project folder (you would need to create "dcrypt" folder; you can also use a deeper path if you downloaded the full project, which would then already have the following structure — "Projects\VistaPE-CAPI\Apps\Security", but this is not required).
  3. Launch WinBuilder:
    • Press "Source" button, and specify the path to Windows setup DVD or a folder with its files/folders — "Source directory".
    • Press "Play" button.
  4. When operations are completed, there will be ready to be burned "VistaPE-Core.iso" file inside "ISO" folder.

Building on basis of Windows 7

  1. Launch WinBuilder software, add checkbox to "rescue.w07.net/Projects" project, and start the download.
    Note: If you will start the download of full project, without modifying selection of individual components according to your needs, then it is possible, that the project would already contain DiskCryptor inside it (not true at the time of this writing). If you want to take control into your hands and be sure of what is to be included into LiveCD (as it is not possible, immediately, to check the presence of valid digital signature on DiskCryptor files distributed with the project, as they are encoded inside a single file that also contains instructions for LiveCD integration), then use the instructions below.
  2. When download is completed, exit the program and copy files from "bartpe" folder inside DiskCryptor distribution, into "Projects\Win7RescuePE\dcrypt" project folder (you would need to create "dcrypt" folder; you can also use a deeper path if you downloaded the full project, which would then already have the following structure — "Projects\Win7RescuePE\Apps\Security", but this is not required).
  3. Launch WinBuilder:
    • Press "Source" button, and specify the path to Windows setup DVD or a folder with its files/folders — "Source directory".
    • Press "Script" at the top, then expand "Build" menu (to the left), click on "PreConfig" and press "Get Info".
    • Press "Play" button.
  4. When operations are completed, there will be ready to be burned "Win7RescuePE.iso" file inside "ISO" folder.

Windows Vista/7 setup DVD

It is also possible to integrate DiskCryptor directly into Windows Vista/7 installation DVD. By doing this, you would be able to run DiskCryptor from command prompt that is accessible from "Repair your computer" menu. When installing Windows from this modified setup disk, no changes made to it would make it into actual Windows installation.

To begin with, you would need to get ready your Windows Vista or 7 setup DVD, and also you would need to download and install Windows Automated Installation Kit (AIK) for Windows 7. This package (WAIK) also supports Windows Vista (SP1 and later), and it does not require your Windows Vista installation DVD to have any service packs integrated into it.

When WAIK is installed, you would need to perform the following operations (with administrative privileges):

  1. Copy the contents of Windows Vista/7 DVD into "C:\WinSetupDVD" folder.
  2. Create "C:\WinSetupDVD-Servicing" folder.
  3. Launch command-line interface (cmd.exe), and execute the command below that will mount Windows boot image:
    • "C:\Program Files\Windows AIK\Tools\x86\Servicing\Dism.exe" /Mount-Wim /WimFile:C:\WinSetupDVD\sources\boot.wim /index:2 /MountDir:C:\WinSetupDVD-Servicing
  4. Copy DiskCryptor files into mounted image:
    • dcapi.dll, dccon.exe, dcrypt.exe → C:\WinSetupDVD-Servicing\Program Files\dcrypt\
    • dc_fsf.sys, dcrypt.sys → C:\WinSetupDVD-Servicing\Windows\System32\drivers\
Warning: file dc_fsf.sys and related registry hive (see below) are not required for DiskCryptor ver 1.0 and above.
  1. Now we enter data into Windows Vista/7 setup DVD registry, which is necessary for DiskCryptor to function:
    • Launch registry editor (regedit.exe), and click on the "HKEY_LOCAL_MACHINE" hive. Go to "File" → "Load Hive..." and open file "C:\WinSetupDVD-Servicing\Windows\System32\config\SYSTEM"
    • In the new dialogue window enter "WinSetupDVD" (without quotation marks). Now when you expand "HKEY_LOCAL_MACHINE" hive, you could see a new entry "WinSetupDVD" that belongs to the Windows setup DVD.
    • Further, we load necessary data into registry, by copying and saving (using notepad, for example) the marked block provided below as "WinSetupDVD.reg" file, and afterwards double-clicking on that file with the mouse.
    Note: If before making changes to the registry you were to look at the "{71A27CDD-812A-11D0-BEC7-08002BE2092F}" key, you would see that value "LowerFilters" already has data "fvevol" (true for both Windows Vista and 7), which when adding registry data (from a file) that is relevant only to the DiskCryptor, would be overwritten. Therefore the registry data provided below also includes original data for the said value.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\WinSetupDVD\ControlSet001\Services\dcrypt]
"Type"=dword:00000001
"Start"=dword:00000000
"ErrorControl"=dword:00000003
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,\
  72,00,69,00,76,00,65,00,72,00,73,00,5c,00,64,00,63,00,72,00,79,00,70,00,74,\
  00,2e,00,73,00,79,00,73,00,00,00
"Group"="Filter"

[HKEY_LOCAL_MACHINE\WinSetupDVD\ControlSet001\Services\dcrypt\config]
"Flags"=dword:00000082
"Hotkeys"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"sysBuild"=dword:00000000

[HKEY_LOCAL_MACHINE\WinSetupDVD\ControlSet001\Services\dc_fsf]
"Type"=dword:00000002
"Start"=dword:00000000
"ErrorControl"=dword:00000003
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,\
  72,00,69,00,76,00,65,00,72,00,73,00,5c,00,64,00,63,00,5f,00,66,00,73,00,66,\
  00,2e,00,73,00,79,00,73,00,00,00
"Group"="Filter"

[HKEY_LOCAL_MACHINE\WinSetupDVD\ControlSet001\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}]
"UpperFilters"=hex(7):64,00,63,00,72,00,79,00,70,00,74,00,00,00,00,00

[HKEY_LOCAL_MACHINE\WinSetupDVD\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}]
"LowerFilters"=hex(7):64,00,63,00,72,00,79,00,70,00,74,00,00,00,66,00,76,00,65,\
  00,76,00,6f,00,6c,00,00,00,00,00
  1. Afterwars, while in registry editor, click on the "WinSetupDVD" entry and go to "File" → "Unload Hive..." and exit from the registry editor.
  2. With the following command, we now commit the changes we made and unmount the image:
    • "C:\Program Files\Windows AIK\Tools\x86\Servicing\Dism.exe" /Unmount-Wim /MountDir:C:\WinSetupDVD-Servicing /commit
    Note: In order for the image to be successfully unmounted, do not forget to exit from the registry editor and the program you used to copy DiskCryptor files, so no processes would remain attached to "C:\WinSetupDVD-Servicing" folder.
  3. The final operation will create a new Windows Vista/7 setup DVD with integrated DiskCryptor (when completed, ready to be burned "WinSetupDVD-custom.iso" file will be created in root folder of drive C:):
    • "C:\Program Files\Windows AIK\Tools\x86\oscdimg.exe" -n -m -bC:\WinSetupDVD\boot\etfsboot.com "C:\WinSetupDVD" "C:\WinSetupDVD-custom.iso"

Creating bootable Windows Vista/7 USB flash drive

The instructions given here, will aid you in creating a bootable Windows Vista/7 USB flash drive on a basis of Windows ISO image created using either WinBuilder or integrating DiskCryptor into Windows installation DVD.

  1. Launch command-line interface (cmd.exe) with administrative privileges.
  2. Type diskpart and press Enter button.
    • Then run the list disk command.
    • Run select disk #, where "#" is the corresponding number of your USB flash drive.
    • Run clean.
      Warning: This will remove partition/volume formatting from the disk by zeroing sectors, and all data on the drive will be destroyed.
    • Run create partition primary.
    • Run active.
    • Run format fs=fat32 quick.
    • Run assign.
    • Type exit to leave DiskPart tool and then quit from the command-line interface.
  3. Now copy everything from an ISO file to your USB flash drive. You can do it, for example, by opening and extracting ISO file with 7-Zip archiver.
  4. When contents of ISO file have been copied, your USB flash drive is ready to be used, and you just need to set your computer to boot from USB flash drive.
Personal tools