Moka5
Moka5


How to identify changes and sizes in a LivePC image update   « Go Back

Summary

This article is intended for Moka5 administrators only, and describes an advanced method to identify changes and sizes in a LivePC image update. An administrator may want to use this method to troubleshoot why an image update seems unexpectedly large.

Prerequisites

Moka5 Creator 3.16 or later
An existing layered LivePC image uploaded to the server

Note: This procedure does not apply to non-layered LivePC images.

Steps

(These steps are to be performed on the Moka5 Creator workstation, which is a dedicated admin laptop or desktop used for building and updating LivePC images.)

Let’s assume you’ve already uploaded image version #1 to the server.
  • Launch Moka5 Creator
  • Start the LivePC
  • Now update your image. You can add some files on the desktop, install apps, or install patches.
  • Shutdown the LivePC.
  • Upload a shallow copy of LivePC on server. (This becomes image version #2.)
  • Wait for the upload to finish.
  • Leave Moka5 Creator open, but do not relaunch the LivePC.
  • Open a command prompt (Start > cmd.exe).
  • Run this command:

"C:\Program Files (x86)\mokafive\Engine\bin\m5shim.exe" /wait ntfssector.exe C:\Users\'your_user'\AppData\Local\mokafive-creator\livepcs\'name_of_your_lpc'\original\system.cdski:2 > c:\ntfsfiles.csv 2>nul < C:\Users\'your user'\AppData\Local\mokafive-creator\livepcs\'name_of_your_lpc'\activation\diffs\system_version_x-y.diff

TIP: Don’t forget to substitute your actual values for these variables:
  • ‘your_user’
  • ‘name_of_your_lpc’
  • system* - system is the name of the .tdsk disk file in the original folder where, cdski is the disk format and :1 indicates partition 1, :2 indicates partition 2.
  • If the LivePC is Windows XP use the syntax - system.cdski:1
  • If the LivePC is Windows 7 use the syntax - system.cdski:2
Based on the folder structure below for a Windows 7 LivePC, system.tdsk,0 would be replaced in the command line with system.cdski:2
  • system_version_x-y.diff - indicates the file name of the latest upload contained within the 'diff' folder.
Based on the folder structure below for a Windows 7 LivePC the system_version_x-y.diff would be replaced in the command line by system-ver-13-ver14.2.diff.
Running this command can take anywhere between 20 minutes to 2 hours, depending on your overall image size, and the number of changes in your update.
A fully populated example is below:

"C:\Program Files (x86)\mokafive\Engine\bin\m5shim.exe" /wait ntfssector.exe C:\Users\administrator\AppData\Local\mokafive-creator\livepcs\win7x86lpc\original\system.cdski:2 > c:\ntfsfiles.csv 2>nul < C:\Users\administrator\AppData\Local\mokafive-creator\livepcs\win7x86lpc\activation\diffs\system-ver-13-ver-14.2.diff
  • administrator - name of current logged in user
  • Win7x86lpc - name of the LivePC within creator
  • system.cdski:2 - system is the name of the disk file. tdsk replaced with cdski, :2 for partition 2 (windows 7 LivePC)
  • system-ver-13-v-14.2.diff - is the name of the latest diff file in the directory or the name of the diff you want to analyze. If you are analyzing a previous version, you need to configure creator to be set on that version.
The script below can be edited and run as a .bat file. Simply set the LPC, LPCDIFF and Partition variables to run the script.
REM enter the name below for the LivePC, the DIFF file and also the Windows install partition. If the DIFF file ends in a .1 or .2 that usually means partition 2 should be used.

SET LPC=win7x86lpc-316-548d8c87d01b4d6fb8dac5dd992517f3
SET LPCDIFF=system-ver-7-ver-8.2.diff
SET PARTITION=2

"C:\Program Files (x86)\mokafive\Engine\bin\m5shim.exe" /wait ntfssector.exe %USERPROFILE%\AppData\Local\mokafive-creator\livepcs\%LPC%\original\system.cdski:%PARTITION%>c:\ntfsfiles.csv 2>nul<%USERPROFILE%\AppData\Local\mokafive-creator\livepcs\%LPC%\activation\diffs\%LPCDIFF%

Results

When the tool is finished, the results file (ntfsfiles.csv) will contain 3 columns:
  • Path and name of the file that has been modified in this update
  • Size (in bytes) of the file difference in this update
  • Size percentage compared to the total size of the update.