Windows Tricks Tips
Introduction
Topics
%FOREACH{"item" in="TippsWindowsResizeRawImgFileUsingVirtualBox"}%
Following the recommendation on
http://raspberrypi.stackexchange.com/questions/4943/resize-image-file-before-writing-to-sd-card:
- e.g. to resize to 15.5GB, approx. size 15500
set VBOXMANAGE="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
IF NOT EXIST %VBOXMANAGE% (
echo %VBOXMANAGE% does not exist ... exiting)
)
ELSE (
IF EXIST input.vdi ( %VBOXMANAGE% closemedium disk input.vdi --delete)
IF EXIST output.vdi ( %VBOXMANAGE% closemedium disk output.vdi --delete)
IF EXIST output.img (%VBOXMANAGE% closemedium disk output.img)
REM use without .img
set /p INPUT_NAME="Enter input file name without .img: ";
set OUTPUT_NAME=%INPUT_NAME%_resized
set /p OUTPUT_SIZE="Enter Size (MB) (e.g. 15000): "
ECHO "========================================================================="
%VBOXMANAGE% convertfromraw %INPUT_NAME%.img input.vdi -format VDI --variant Standard
ECHO "========================================================================="
%VBOXMANAGE% createhd --filename output.vdi --size %OUTPUT_SIZE% --format VDI --variant Standard
ECHO "========================================================================="
%VBOXMANAGE% clonehd input.vdi output.vdi --existing
ECHO "========================================================================="
%VBOXMANAGE% clonehd output.vdi output.img --format RAW
copy output.img %OUTPUT_NAME%.img
%VBOXMANAGE% closemedium disk input.vdi --delete
%VBOXMANAGE% closemedium disk output.vdi --delete
%VBOXMANAGE% closemedium disk output.img
)
%NEXT{"item"}%
%FOREACH{"item" in="TipsWindowsHowToCloneASDCard"}%
<div style="text-align:right"><a style="font-size:smaller" href="/edit/Epics/TipsWindowsHowToCloneASDCard">edit</a></div>
Following the help of page
https://startingelectronics.org/articles/raspberry-PI/ten-things-raspberry-PI chapter 10.
This video
View on YouTube → shows how to clone a SD card in Windows
%NEXT{"item"}%
--
PeterZumbruch - 19 Nov 2015