原文网址: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. thead、tbody、tfoot与顺序无关

    今天发现一个问题,thead.tbody.tfoot等标签的内容排版与顺序无关,做了一个小的实验:

  2. cocos2d-x CCAction:动作(转)

    透明度变化的功能挺不错.   瞬时动作 瞬时动作不需要时间,立即完成 [cpp]   //放置,=setPosition()   pRole->runAction(CCPlace::create ...

  3. 多表关联查询(ORACLE版)

    前言:这几天学习oracle,把自己对于关联查询的理解,记录下.如有错误请指正! 交叉连接: 交欢连接又称为“笛卡儿积连接”,是两个或多个表之间的无条件连接.一个表中所有的记录与其它表的所有的记录进行 ...

  4. 通过模拟器和ida搭建Android动态调试环境的问题

    这几天在学Android的native层逆向.在按照教程用ida搭建动态调试环境时,第一步是把android_server 放到手机里执行,但是在手机里可以,在genymotion模拟器上就提示 no ...

  5. Java基础知识强化86:BigInteger类之BigInteger概述和构造方法

    1. BigInteger类概述   可以让超过Integer范围内的数据进行运算 2. 构造方法: public BigInteger(String val) 3. 代码示例: package cn ...

  6. RPM包校验和提取

    一.RPM包校验 [root@localhost Packages]# rpm -V 已安装的包名 #选项: #    -V    校验指定RPM包中的文件(verify) [root@localho ...

  7. dp 斯特林数 HDU2512一卡通大冒险

    这道题其实就是斯特林数,找不同的集合,一共有多少中组法,递推式就是dp[n][k] = dp[n - 1][k - 1] + k * dp[n - 1][k]; 这个式子可以这么解释,dp[n][k] ...

  8. ZOJ3161

    朴素动态规划 ZOJ3161 题意:(严重标题党)老板不想让客人走,客人不想留,客人按顺序排好,老板抽8g(书上翻译成八卦,神翻译),抽到的 如果相邻,其中一个人由客人决定离开,求最后黑心的老板最多能 ...

  9. java执行命令行

    List<String> command = new ArrayList<String>(); command.add("ping"); ProcessBu ...

  10. Centos 5.2安装配置DNS服务器

    BIND安装配置(主从)我的系统环境:centos 5.2 作者:哈密瓜 主:我采用的是yum安装[root@linux src]#yum -y install bind* 生成rndc控制命令的ke ...