Меню Рубрики

Virtual sd card windows

About

The vsd package provides two python scripts which are helpful in automating virtual disk creation, deletion, mounting, and unmounting.

Additionally, it comes with several .bat files which can be double-clicked or executed from the command line to perform the different available commands.

Required software

  • python – versions 2.x or 3.x should both work
  • Windows Vista or above – for an up-to-date DiskPart application

Download

  • Download – zip file containing all relevant .bat and .py files

Example usage

An example of how these scripts can be used is to create a virtual SD card file ( sd.raw ) for use with Dolphin Emulator , without having to download unnecessary shareware. (see: WinImage)

To use, simply get all the required software, download and unzip the build package into a folder, and then edit the following variables in settings.bat :

  • SD_CARD_PATH
    It will usually look something similar to C:\Users\PROFILE\Documents\Dolphin Emulator\Wii\sd.raw
  • SD_CARD_MOUNT_DRIVE_LETTER
    The drive letter the file should be mounted to when editing
  • SD_CARD_SIZE
    The size (in MiB) of the virtual SD card file
  • SD_CARD_LABEL
    The desired label as it appears under “Computer” and other places

To edit SD card contents, run create.bat followed by mount.bat (for subsequent editing, only mount.bat needs to be executed.) Then place any files on the newly added disk under “Computer”. After editing is complete, run unmount.bat to allow other applications read/write access on the virtual SD card file.

Finally, to enable in Dolphin, make sure that “Insert SD Card” is enabled under “Options” -> “Configure” -> “Wii” -> “Device Settings”

Note that the same general setup can be used for other applications with a little tweaking; it’s designed to be fairly generic.

Batch files

  • settings.bat – Contains various settings which are used in all of the other .bat scripts. The section at the top should be edited as desired.
  • create.bat – Creates a new virtual disk file and formats it. If the target path already exists, the user is prompted if it should re-create the file. Additionally, a shortcut to the parent directory of the new file is created.
  • delete.bat – Deletes the virtual hard disk file, along with the shortcut to its parent directory. If the file is currently mounted, it must be unmounted before deletion will work.
  • mount.bat – Attempts to mount the virtual disk file to a volume and apply a new letter to it. Additionally creates a shortcut to the new drive letter for ease of access.
  • unmount.bat – Attempts to unmount the virtual disk file. The shortcut to the drive letter will also be deleted on a successful unmounting.

vsd.py

vsd.py is the main script used for creating, deleting, mounting, and unmounting virtual disk files. It can perform up to 4 of the commands in one execution.

Descriptions of the command line flags and commands follow. Additional info can be obtained by executing vsd.py —usage .

Commands

If multiple commands are specified, they will be executed in the order: —unmount , —delete , —create , —mount .
They are not executed in the order they appear on the command line.

  • —create – Creates a new virtual disk file
    If the file already exists, it will not be overwritten.
    Uses: —path ; Optional —size , —label , —file-system
  • —delete – Deletes a virtual disk file
    If the file is mounted, it will not be deleted.
    Uses: —path
  • —mount – Mounts a virtual disk file to a volume letter
    Uses: —path , —letter
  • —unmount – Unmounts a virtual disk file
    If —letter is specified, the disk will only unmount if it is mounted to the specified letter.
    Uses: —path ; Optional: —letter

Flags

  • —path – The path to the virtual disk file
  • —size – The virtual disk size in MiB
  • —label – The disk label used during formatting
  • —letter – The drive letter a virtual disk file should be mounted to
  • —file-system – A file system such as FAT, FAT32, NTFS, etc.
    If omitted, it will be the default option DiskPart uses (sometimes unformatted)
    See DiskPart “FILESYSTEMS” command for more info

shortcut.py

shortcut.py is responsible for creating and deleting shortcut. It is designed to be able to create file shortcuts and URI shortcuts as well. It can be used as an imported library, and as such, some of its functionality is not used by the included batch scripts.

Initially, shortcut.py was designed to use the pywin32 extensions to help create shortcuts, but it has problems creating directory shortcuts this way. The code remains in the file, but it is never used.

Command line

The general format of the command line usage is:
shortcut.py [input_arguments] output_filename.lnk target.ext [shortcut_arguments]

Once filename and target have been specified (either by —flagged or flagless arguments,) all remaining arguments are used as the arguments of the shortcut file.

Command line flags

Additional info can be obtained by executing shortcut.py —usage .

  • —icon – A path to an icon file, or a file containing icons
  • —icon-index – The index of the icon within a file, in case there are multiple icons
  • —working-directory – The working directory the shortcut should start in
  • —target – The target file or URI the shortcut should point to
  • —filename – The output filename of the shortcut
    If —target is a local file, the filename will end with .lnk .
    If —target is any other URI, the filename will end with .url .

Источник

Как получить доступ к SD-карте с виртуальной машины?

Я хочу отформатировать SD-карту из моей виртуальной машины Linux. У меня есть встроенный SD-карты читатель в моем ноутбуке. Я попытался использовать строки и VMware Player и установил Ubuntu 10.04 гость. Ни один из них не показывает устройство чтения SD-карт в качестве устройства. Я могу получить доступ к SD-карте с узла Windows.

меня не интересуют решения, использующие общие папки, поскольку я хочу получить доступ к SD-карте в качестве оборудования (она должна отображаться в /dev ).

Я в основном хочу настроить SD-карту для файл, но я не хочу устанавливать физический Ubuntu на моем компьютере.

9 ответов

на новых MacBook Pro слот для SD-карты больше не отображается как USB-устройство. Из-за этого необработанное устройство необходимо подключить к виртуальной машине, чтобы получить необработанный доступ ко всей карте. Полная документация находится в Расширенная Конфигурация Хранилища раздел документации VirtualBox.

как четко указано в документах:

предупреждение — Raw доступ к жесткому диску только для опытных пользователей. Неправильное использование или использование устаревшая конфигурация может привести к полной потере данных на физический диск. Самое главное, не пытайтесь загрузить раздел с работающей в данный момент операционной системой на виртуальной машине. Это приведет к серьезному повреждению данных.

в качестве краткого руководства это шаги для подключения устройства к виртуальной машине linux:

определить сырой диск блочного устройства на хост-системе

    вставьте SD-карту в слот

откройте терминал и введите «mount». Вы увидите вывод, идентифицирующий подключенный том с вашей SD-карты. На моей системе я получаю следующее

в моем случае том «no NAME» — это SD-карта, поэтому я принимаю к сведению /dev/disk2s1 часть. В данном конкретном случае s1 часть представляет собой раздел (срез) на необработанном устройстве, поэтому часть, которую мы будем использовать позже, — это просто /dev/disk2 часть.

теперь мы создали VirtualBox, чтобы быть в курсе сырого устройства со следующей командой в терминале.

    отметим, что /path/to/file.vmdk можно положить везде, хотя хорошая идея хранить это внутри папка гостевой виртуальной машины, например

отметим, что -rawdisk мы используем не ссылается на раздел (срез), но только блочное устройство в целом.

Далее мы прикрепляем необработанный диск к гостевой виртуальной машине в VirtualBox UI

  1. убедитесь, что гостевая виртуальная машина не запущена.
  2. Открыть параметры оценки ВМ
  3. нажмите на «Storage» в панель инструментов
  4. рядом с контроллером нажмите на иконку «Добавить жесткий диск»
  5. выберите «выбрать существующий диск»
  6. перейти к /path/to/file.vmdk вы использовали в шаге 3 и выберите
  7. теперь вы должны быть возвращены на вкладку хранения и увидеть свой file.vmdk в списке.
  • запустить ВМ
  • в зависимости от того, есть ли у вас графический интерфейс или нет SD-карта может или не может автоматически монтировать. Если вам нужно установить вручную это просто выставляется как другое стандартное блочное устройство, поэтому на моем ГОСТе это было выставлено как / dev / sdb.
  • обновление

    похоже, у некоторых людей могут возникнуть проблемы с доступом к raw-устройству на шаге 3.2 или 4.6. Попытки запуска некоторых команд с sudo не помогут, так как VirtualBox будет работать как ваш зарегистрированный пользователь и все равно не сможет получить доступ к правильному сырому устройству или сгенерированному файлу vmdk.

    следующий шаги должны помочь, хотя я их не тестировал.

      проверьте, что учетная запись, которую вы используете на OSX, имеет права администратора в разделе «Системные настройки/Пользователи». Существует хороший шанс, что он также должен быть основной учетной записью в системе для доступа к raw-устройству для работы.

    Проверьте raw разрешения диска

    эти разрешения должны соответствовать вашей текущей учетной записи пользователя:

    разрешения для устройства следует также разрешить обычную учетную запись пользователя для чтения (r) и записи (w) на это устройство. НЕ ИЗМЕНЯЙТЕ РАЗРЕШЕНИЯ НА УСТРОЙСТВЕ, ЕСЛИ ВЫ НЕ ЗНАЕТЕ, ЧТО ДЕЛАЕТЕ.

    обновление #2

    оказывается OSX Mountain Lion создал устройство с привилегиями «root: operator» и разрешениями 0640. К сожалению, пока единственный способ получить доступ к этому устройству — «sudo chown $USER» для вашего текущего пользователя каждый раз, когда вы вставляете устройство, однако это не рекомендуется, если вы действительно не понимаете, что делаете. Надеюсь, Apple или VirtualBox найдут более подходящее решение.

    Источник

    Virtual SD Card Guide

    Dolphin can store data to a virtual SD card named sd.raw. By default, it will be created with the size of 128MB.

    The virtual SD card has important use for homebrew apps on Dolphin. Project M and Mario Kart Wii custom tracks are two good examples, as some homebrew apps can only work using files stored on the SD card of the real hardware for which they were designed.

    Contents

    Creating a Virtual SD Card

    It is recommend to create one with size at least 1GB for large homebrew apps, for example, Project M, and no more than 2GB for best compatibility as there are compatibility issues with some homebrew apps trying to run under an SDHC card on the real hardware.

    Command Line and Executable Files

    Download Virtual SD Card Maker, unzip it, and open the appropriate folder for your system (Linux / OS X / Windows). The tool is run with a command like:

    1. Open the Command Prompt or Terminal then (Note: Vista fails to support drag and drop, and will require manual input.):
    2. Drag and drop mksdcard file into the command window for the full directory pointing to mkscard.
    3. Type 2048M for 2GB, or if desired, an alternate size like 512M (512MB), 1024M (1GB), etc.
    4. Drag and drop an existing sd.raw file into the command window, or use a different directory/filename to create a new one.
    5. Assuming a default Global User Directory the virtual SD card should be placed at:

    Linux:

    /.local/share/dolphin-emu/Wii/sd.raw OS X:

    /Library/Application\ Support/Dolphin/Wii/sd.raw Windows: «%userprofile%\Documents\Dolphin Emulator\Wii\sd.raw» (quotation marks are necessary when copying it to Command Prompt)

    Alternatively, a non-Mediafire download link can be found by visiting https://developer.android.com/studio/#command-tools and downloading the OS-specific zip there (mksdcard is part of the Android SDK)

    Manual macOS Command Line Creation

    This example creates a 2048 megabyte (2GB) SD card formatted as FAT32:

    Manual Linux Command Line Creation

    If the above tool does not work, one can manually create a FAT32 partition image in Linux provided dosfstools is installed. First, pull up a terminal, and then chdir into the Wii folder, which under certain configurations may be located at

    Then, we must create our raw disk image. This example create a 2048 megabyte (2GB) SD card, but one can replace the 2048 with an alternate number of megabytes.

    Finally, we format our image to FAT32.

    Editing a Virtual SD Card

    Linux

    The virtual SD card can be edited by mounting it to a virtual disk. First create a directory:

    Then mount sd.raw to it:

    When you are done, simply unmount it like this:

    macOS

    In Terminal window, type the following to mount the virtual SD card:

    The virtual SD card can then be ejected through Finder when done being edited.

    If you get an error (hdiutil: attach failed - no mountable file systems), you can use these commands instead:

    Windows

    The Windows users must use a third party software that can mount the virtual SD card. Speaking of which. ImDisk Virtual Disk Driver

    WinImage is unreliable, because oddly enough, it will cause desync and few other unforeseeable problems. ImDisk will be fine.

    Quick guide for mounting and editing the virtual SD card with the ImDisk Virtual Disk Driver:

    1. Right-click on sd.raw file then click «Mount as ImDisk Virtual Disk» from the context menu.
    2. Check box Removable media then hit «OK». The predefined drive letter and everything else will do just fine.
      • The virtual SD card will now appear as «Removable Disk» in which the native Explorer window can read and write in there.
    3. When done editing the virtual SD card, simply unmount it by right-click on the «Removable Disk» then click «Unmount ImDisk Virtual Disk» from the context menu.
      • The virtual SD card must be dismounted before using with Dolphin.

    Dolphin Setting

    Go to Options > Configure. > Wii > and enable Insert SD Card.

    Usage

    With Homebrew App

    The external files used for the homebrew app must be stored within sd.raw and the homebrew app itself (boot.elf or boot.dol) must exist outside of it for Dolphin to load. Project M, for example, will load from SD root \projectm\ and Dolphin will need to launch Project M through \apps\projectm\boot.elf, NOT in the virtual SD card. For convenience’s sake, it is ideal to have same copies paralleled between inside and outside of the virtual SD card.

    Though, it is possible to start homebrew app from virtual SD card through homebrew exploits for Wii.

    The Wii game launcher app will only work if a particular Wii game is set as the default ISO. Within the Dolphin game list, open context menu (right-click) on any Wii game and click Set as default ISO. Do this before loading a homebrew app with Dolphin.

    For Netplay

    Netplay will eventually desync if anything reads the virtual SD card that is not cloned, regardless of the same size it was created, and identical file/folder structures within its root. To prevent that, sd.raw must be copied from host’s computer to joiners’ computers before starting netplay. If the virtual SD card was used offline or online with write block disabled, the MD5 checksum will change («Date Accessed» of the files are what’s different in virtual SD card), but will not cause desync. The SD card got to be coming from elsewhere or subjected to the files modified within to be «different».

    For the Wii game launcher app, users on both ends must have the same copies of homebrew app and the game in their game list first, then set the game as default ISO, as mentioned in previous section.

    Источник

    Добавить комментарий

    Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Virtual pc windows 7 64 bit настройка
  • Virtual machine manager windows
  • Virtual machine for windows free
  • Virtual gamepad для windows 10
  • Virtual fdd windows 7