zoukankan      html  css  js  c++  java
  • 【转】VirtualBox direct access to SD Card in Windows--不错

    原文网址: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:UsersSandy 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 FilesOracleVirtualBox. 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 FilesOracleVirtualBox
    
      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!

  • 相关阅读:
    【推荐】微服务分布式企业框架Springmvc+mybatis+shiro+Dubbo+ZooKeeper+Redis
    将WCF寄宿在托管的Windows服务中
    剑指Offer
    剑指Offer
    Entity Framework 无法对没有主键的视图映射实体的解决办法
    设置Sql Agent运行Job时的执行账户
    IE中Keep-Alive机制引起的错误
    Ajax错误 “SCRIPT7002: XMLHttpRequest: 网络错误 0x2ef3, 由于出现错误 00002ef3 而导致此项操作无法完成” 的归纳总结
    在IIS站点中Adomd.net集成认证账号问题
    出现“不能执行已释放的Script代码”错误的原因及解决办法
  • 原文地址:https://www.cnblogs.com/wi100sh/p/4502698.html
Copyright © 2011-2022 走看看