57 lines
1.7 KiB
Bash
Executable File
57 lines
1.7 KiB
Bash
Executable File
#!/usr/local/bin/bash
|
|
|
|
# Usage: ./vdi2raw2ewf
|
|
# or
|
|
# bash vdi2raw2ewf
|
|
# Description: Convert VDI image to EWF image
|
|
# Author: Patrick Neumann (patrick@neumannsland.de)
|
|
# Platform: Apple macOS 10.13.6
|
|
# Version: 1.00
|
|
# Date: 2019-04-29
|
|
# Link: (work in progress)
|
|
# License: GPL3
|
|
# Warranty: This program is distributed WITHOUT ANY WARRANTY
|
|
|
|
#=== CONFIGURATION (user) ======================================================
|
|
PATH="/Users/neupat75/VirtualBox VMs"
|
|
DSC="LinuxMint"
|
|
VDI="${DSC}_19.1"
|
|
CASE="20190408-01"
|
|
EVI="01"
|
|
|
|
#=== CONFIGURATION (dynamic) ===================================================
|
|
RAW="${PATH}/${VDI}.raw"
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# Convert VDI to RAW image.
|
|
#-------------------------------------------------------------------------------
|
|
/usr/local/bin/vbox-img \
|
|
convert \
|
|
--srcfilename "${PATH}/${VDI}/${VDI}.vdi" \
|
|
--dstfilename "${RAW}" \
|
|
--dstformat RAW
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# Acquire RAW as EWF image.
|
|
#-------------------------------------------------------------------------------
|
|
/usr/local/bin/ewfacquire \
|
|
-c fast \
|
|
-C "${CASE}" \
|
|
-d sha1 \
|
|
-D "${DSC}" \
|
|
-e "Patrick Neumann" \
|
|
-E "${CASE}-${EVI}" \
|
|
-g 1 \
|
|
-l "${PATH}/VBoxVM-${VDI}.log" \
|
|
-N "user:u53r - with Evolution and Timeshift" \
|
|
-t "${PATH}/VBoxVM-${VDI}" \
|
|
-u \
|
|
"${RAW}"
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# Delete RAW image.
|
|
#-------------------------------------------------------------------------------
|
|
/bin/rm "${RAW}"
|
|
|
|
exit 0 |