原文网址:http://www.sandyscott.net/2013/08/14/virtualbox-direct-drive-access/

I’ve trying to get my Raspberry Pi working with a touchscreen (eGalax Touch).

This blog post has been an incredible help, but I stumbled at the very last hurdle – modifying the contents of the SD card.

You see, my compile system (Ubuntu 13.04) was in a virtual machine (VM) – VirtualBox running on Windows 7.

Windows 7 doesn’t know how to read the various linux filesystems, so they’re invisible, which means I needed to access to the whole, raw disk directly from the VM.

Here’s a step-by-step guide to directly mounting raw SD card in your virtual machine, so you can edit it.

    1. Get the DeviceID for you SD Card reader

Open a command window as an administrator. (Press Start, type cmd, right click on cmd.exe in the list, and choose “Run as administrator”)

type

wmic diskdrive list brief

and if your system is anything like mine you’ll get something like this:

C:\Users\Sandy Scott>wmic diskdrive list brief
Caption DeviceID Model Partitions Size
WDC WD7500BPKT-75PK4T0 \\.\PHYSICALDRIVE0 WDC WD7500BPKT-75PK4T0 3 750153761280
O2Micro SD SCSI Disk Device \\.\PHYSICALDRIVE1 O2Micro SD SCSI Disk Device 1 3964584960

The top item is the main hard drive, the lower one is the SD card.

The bit we’re interested in is the DeviceID, in this case\\.\PHYSICALDRIVE1

    1. Navigate to the VirtualBox directory

Next thing you’ll need to find is the installation directory for VirtualBox. This is usually C:\Program Files\Oracle\VirtualBox\. You’ll know it’s the right one if it has lots of files starting with VBox in it.

Go there by entering this command

cd C:\Program Files\Oracle\VirtualBox
    1. Create the link file to the SD card
VBoxManage internalcommands createrawvmdk -filename "%USERPROFILE%/Desktop/sdcard.vmdk" -rawdisk "\\.\PHYSICALDRIVE1"

The file you’ve just created (sdcard.vmdk, on your Desktop) is a special link that lets a virtual machine access the SD card.

    1. Connect the VM to the SD card using the link

Now, open VirtualBox as administrator, and open the Settings for your virtual machine. Go to Storage -> Controller: SATA -> (right click) Add Hard Disk -> Choose Existing Disk and open the file you just created.

Fire up the VM and you should be able to access the SD card if all it’s glory!

【转】VirtualBox direct access to SD Card in Windows--不错的更多相关文章

  1. [OrangePi] Installation on SD Card

    Download any of the available images (xz archive) from Mega or GoogleDrive Download scriptbin_kernel ...

  2. SD card技术了解并WINCE下SDHC驱动开发(updated)

    Suumary: 简单介绍了一下SD卡的历史和发展,同时结合MX31 ADS上的WINCE 下SDHC驱动更深入的了解该硬件的一些行为特点. 了解SD card SD是Secure Digital C ...

  3. OpenRisc-35-基于orpsoc,eCos的sd card controller的测试实验

    引言 之前,曾经在orpsoc的平台上,测试验证过其sd card controller的linux的驱动,但是并不是很完美,经过努力,终于在eCos下完成了其全部功能的验证,包括驱动层验证,文件系统 ...

  4. [OrangePi] Backup internal EMMC to SD Card

    Boot your Orange PI board from EMMC without SD Card inserted login insert your SD Card Run: sudo ins ...

  5. I.MX6 uSDHC SD card register

    /**************************************************************************** * I.MX6 uSDHC SD card ...

  6. Python Kivy writes / read the file on the SD card

    Path to SD card from jnius import autoclass # SDcard Android # Get path to SD card Android try: Envi ...

  7. Using Android Phone to recover SD card formatted with DD command under linux

    Using Android Phone to recover SD card formatted with DD command under linux 1. Formatted a sd card ...

  8. raspi-config Expand root partition to fill SD card 原理

    /********************************************************************************** * raspi-config E ...

  9. PatentTips - Resource partitioning and direct access utilizing hardware support for virtualization

    BACKGROUND The present disclosure relates to the resource management of virtual machine(s) using har ...

随机推荐

  1. Java程序员可能犯的3个常见SQL错误

    概述:Java程序员不仅要具备扎实的Java编程能力,在日常的工作当中往往还要涉及到其他语言的基础知识,尤其是SQL.那么哪些常见的SQL错误是程序员们容易犯的呢?让我们一起来看看吧! 你可能看到Ja ...

  2. Android布局属性详解剖析

    View的布局显示方式有下面几种: 线性布局(LinearLayout) 相对布局(RelativeLayout) 表格布局(TableLayout) 网格视图(GridView) 标签布局(TabL ...

  3. [Angular 2] A Simple Form in Angular 2

    When you create a Form in Angular 2, you can easily get all the values from the Form using ControlGr ...

  4. VS2008 动态库和静态库的生成和加载

    第一:动态库和静态库的生成: 1) 新建一个生成dll工程: 文件->新建->项目->Win32->Win32控制台应用程序 输入项目名称:dllTest ,项目路径:D:\V ...

  5. 基于 Java 2 运行时安全模型的线程协作--转

    在 Java 2 之前的版本,运行时的安全模型使用非常严格受限的沙箱模型(Sandbox).读者应该熟悉,Java 不受信的 Applet 代码就是基于这个严格受限的沙箱模型来提供运行时的安全检查.沙 ...

  6. 自定义绘制View

    Paint(画笔)   Canvas(画布)         The Canvas class holds the "draw" calls.          To draw s ...

  7. HDU 5144 NPY and shot(三分法)

    当时做这道题时一直想退出物理公式来,但是后来推到导数那一部分,由于数学不好,没有推出来那个关于Θ的最值,后来直接暴力了,很明显超时了,忘了三分法的应用,这道题又是典型的三分求最值,是个单峰曲线,下面是 ...

  8. Centos6 安装vnc

    Centos6 安装vnc 1. 安装 使用yum方式安装 yum install tigervnc-server tigervnc #启动 vncserver #重启动 /etc/init.d/vn ...

  9. 解决ajax请求cors跨域问题

    ”已阻止跨源请求:同源策略禁止读取位于 ***** 的远程资源.(原因:CORS 头缺少 'Access-Control-Allow-Origin').“ ”已阻止跨源请求:同源策略禁止读取位于 ** ...

  10. CSS3 2D转换

    CSS3 转换 通过CSS3转换,我们能够对元素进行移动.缩放.转动.拉长或拉伸. 它如何工作? 转换是是元素改变形状.尺寸和位置的一种效果. 你可以使用2D或3D转换你的元素. 浏览器支持 属性 浏 ...