Difference between revisions of "SD Card on Linux from Windows using VirtualBox"

From RHS Wiki
Jump to navigation Jump to search
(Created page with "* Get The SD Card device id <nowiki>C:\Users\Mnemo>wmic diskdrive list brief Caption DeviceID Model Partitions Size HGST HTS54...")
(No difference)

Revision as of 08:13, 24 January 2018

  • Get The SD Card device id
C:\Users\Mnemo>wmic diskdrive list brief
Caption                  DeviceID            Model                    Partitions  Size
HGST HTS541010A9E680     \\.\PHYSICALDRIVE0  HGST HTS541010A9E680     2           1000202273280
KINGSTON SMSM151S3128GD  \\.\PHYSICALDRIVE1  KINGSTON SMSM151S3128GD  4           128034708480
SDHC Card                \\.\PHYSICALDRIVE2  SDHC Card                4           7805790720
  • Create VMDK File
C:\Users\rizwan>"C:\Program Files\Oracle\VirtualBox\VBoxManage" internalcommands createrawvmdk -filename "c:/Hard Disks/sdcard.vmdk" -rawdisk "\\.\PHYSICALDRIVE1"
  • Attach RAW Disk to VM
    1. Ensure the Guest VM is not running.
    2. Ensure VirtualBox is not running
    3. Start VirtualBox by right-clicking on it and choosing “Run as administrator”
    4. Open the settings area for the guest VM
    5. Click on “Storage” in the toolbar
    6. Next to the controller click on the icon to “Add Hard Disk”
    7. Select “Choose existing disk”
    8. Navigate to the c:/Hard Disks/sdcard.vmdk and select it
    9. You should now be returned to the Storage tab and see your sdcard.vmdk in the list.
  • Start the VM

Depending on whether you have a GUI or not the SD card may or may not automatically mount. If you need to mount is manually it is simply exposed as another standard block device, so on my guest this was exposed as /dev/sdb.