Epics@GSI Webhome

Windows Tricks Tips

Introduction

Topics

Resize Raw Img File Using VirtualBox

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 
)

-- WikiGuest - 1970-01-01

Windows: How To Clone A SD Card

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

-- WikiGuest - 1970-01-01


-- PeterZumbruch - 19 Nov 2015
-- PeterZumbruch - 2015-11-19
Topic revision: r2 - 2015-11-19, PeterZumbruch
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)