Open Dmg Files In Virtualbox

So you’re running Linux on your computer, maybe Ubuntu, and you have some files with the .dmg extension. In this guide, we’re going to talk about how to open, mount, extract, and otherwise get your files from these pesky DMG images. You could always just extract the files on a Mac, then transfer them back to your Linux machine. But if you really want to do this on Linux, without having to rely on Mac, here’s how to do it.

What are DMG image files?

Simply put, it’s a kind of image file. But not an image like a jpeg is an image. DMG is Apple’s proprietary disk image format, native to Mac OS X. There are actually a whole bunch of different types, format and options within this format. There are options for encryption, compression, and different kinds of partition schemes, among others. Unfortunately, this can make things pretty confusing when we’re trying to gain access to the data contained in one of these images.

DMG images are typically a kind of Universal Disk Image Format (UDIF), although there are others, namely NDIF and SPARSE. Although the .dmg file extension is usually used, they can also sometimes have an .img extension, or in some cases no extension at all. Their MIME type is application/x-apple-diskimage.

Virtualbox Not Seeing Iso Img Or Dmg Files Free; Oct 06, 2009 This is a problem under VirtualBox, because VB cannot mount an IMG file like an ISO file. Fortunately, you can convert the IMG file to VirtualBox’s disk format VDI according to this post. The utility is called VBoxManage.exe which is part of your VirtualBox installation.

  • This will start the installer, which enables you to select where to install Oracle VM VirtualBox. After installation, you can find an Oracle VM VirtualBox icon in the “Applications” folder in the Finder. Save the DMG file, which is needed to uninstall Virtual Box. UN-INSTALLING VIRTUALBOX. Open the disk image dmg file and double-click on.
  • The utility is called VBoxManage.exe which is part of your VirtualBox installation. Open up a command prompt, change directory to VirtualBox and type the command to convert the image. Cd ' Program Files Sun VirtualBox' VBoxManage.exe convertfromraw -format VDI f: Images ubuntu-9.04-netbook-remix-i386.img f: Images ubuntu-9.04-netbook-remix-i386.vdi.

The HFS/HFS+ (Mac OS Extended/Journaled) file system is typically used in DMGs. However, this isn’t always the case. You may also sometimes find FAT and ExFAT files systems, as well as variations on HFS.

Does my system support DMG?

Perhaps the biggest hurdle to overcome when trying to work with DMG files is working with the HFS file system (Mac OS Extended). Linux supports HFS through the “hfs” and “hfsplus” kernel modules.

There’s an easy way to test if your system has these kernel modules. Plug in a USB drive formatted with the Mac OS Extended file system. If your particular distribution doesn’t have the appropriate modules, you will likely get an error message. On Ubuntu, you’ll get a popup window declaring “Ubuntu: Unable to mount '.

Alternatively, we can see if the kernel module files are present with find:

We want to see two files: “hfs.ko” and “hfsplus.ko”. If find doesn’t return these files, your system probably doesn’t support HFS.

You could also try “modinfo”: modinfo hfs and modinfo hfsplus should return something like:

If you get 'modinfo: ERROR: Module hfsplus not found' your system doesn’t have these modules.

Not all Linux kernels and distributions support HFS. This is especially the case for certain distributions that are a few years old. If you have kernel support for HFS, great! If not, don’t worry. There are still ways to extract data from your DMG files. While it’s nice to have the option to mount the images we’re working with, this is really the only functionality we’re losing without having the hfs and hfsplus modules. The two programs we’re going to use later on (P7ZIP and dmg2img) do not require kernel support to function.

What kinds of DMG images can be opened in Linux?

This guide is about how to open, mount, and extract files from read/write, read only, and compressed DMG image files. The following partition schemes have all been tested with the techniques discussed here.

  • Apple Partition Map
  • CD/DVD (partitioned)
  • CD/DVD (partitioned) with ISO data
  • Hard disk
  • Master Boot Record Partition Map
  • No partition map

This guide does not cover how to handle sparse disk images (.sparseimage), sparse bundle disk images (.sparsebundle), or CD/DVD masters. DMG images with partition scheme types of “CD/DVD” and “GUID Partition Map” do not appear to work with the techniques described here.

Option 1: Mount the DMG

If the Linux distribution you’re on has HFS support in the kernel (Ubuntu 14.04.1 LTS supports it), it’s pretty easy to just mount the DMG image:

We’re using “sudo” because we need root privileges to mount things. The HFS+ file system type is specified with “-t hfsplus”. The “/mnt” at the end of the command specifies where we’re mounting the image.

Unmount the image with sudo umount /mnt

If you get a wrong fs type message like the one below, it means the DMG file is either of an unsupported type, or it’s compressed. Unsupported images include sparse images, sparse disk bundles, CD/DVD masters, and images with partition schemes of the CD/DVD or GUID Partition Map types.

Use “file” to learn a little more about the image file:

If you get image.dmg: x86boot sector that means it’s probably using a GUID Partition Map and isn’t supported. This isn’t good, however, it’s also not too terribly common.

What’s more common is to see something like this:

If mounting isn’t working, and this is what you’re seeing with “file image.dmg”, then you’re luck!. Our problems are being caused by compression. Linux doesn’t like to mount compressed DMG images. To get around this little obstacle, we’ll use dmg2img (see below).

Option 2: Use dmg2img for compressed images

So you have a DMG image that you can’t mount because it’s compressed. You’ve done “file compressed_image.dmg” and you got “compressed_image.dmg: bzip2 compressed data”. The fix? That’s easy: use dmg2img to convert it to an uncompressed image. Once you run the image through dmg2img you should be able to mount it no problem.

Don’t have dmg2img? It’s usually pretty easy to get using your distribution’s package management. On Ubuntu, you’d do:

Using dmg2img isn’t very difficult. Type “dmg2img” into the command line followed by the name of the DMG file you want to decompress. The Mac OS X version of Firefox is a good example of a compressed DMG file.

Now mount the resulting .img file:

Option 3: Extract DMG contents with P7ZIP

P7ZIP is awesome. It’s the Linux/BSD version of 7-Zip. Check out their SourceForge page here With it you can literally extract files from any kind of image or archive. Just kidding… It doesn’t really work with every format conceivable. However, it can handle (in alphabetical order): ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR and Z. Impressed? I certainly am!

Installing p7zip is pretty easy using your distribution’s package management system. On Ubuntu with apt-get:

In addition to being able to extract data from compressed and uncompressed images alike, P7ZIP doesn’t require the HFS kernel modules at all. In the example below, we’re going to extract all of the files from “Firefox 33.1.1.dmg”. When we’re done, we’ll have a tidy little folder called “Firefox”.

Invoke P7ZIP to extract archives and images with “7z x”.

Notice that 7z extracted three files: “0.ddm”, “1.Apple_partition_map”, and “2.hfs”. To actually get to the files, we’ll need to run 7z again on “2.hfs”.

We picked “2.hfs” because it was the biggest of the three, meaning it was probably the one with the data. Simple but effective logic. After a few moments, you should have a folder called “Firefox” with all of the files from the original DMG.

Open Dmg Files In VirtualboxSkip to end of metadataGo to start of metadata

Certain programs such as Microsoft Access and Excel Add-Ons (@Risk, StatTools, other Decision Tools) are not compatible for use on a Mac. Faculty, staff, and students who need their computer to run these types of programs for work or a class will need to install Oracle's VirtualBox onto their Mac computer. VirtualBox allows the MacOS to run a Windows system on top of their computer. This is not permanent and should only be used when the user opens the VirtualBox application to run the restricted programs. VirtualBox is a free virtual machine provided by Oracle that is available for faculty, staff, and students to use.


The following instructions are for the installation of VirtualBox on a Mac:

Prior to installing, make sure you have:

  • ~30 GB of free space
  • ~45 minutes for complete installation


First, install VirtualBox application:

Open Dmg Files In Virtualbox

  1. Go to https://www.virtualbox.org/wiki/Downloads
  2. Under 'VirtualBox platform packages', click 'OS hosts'.
    1. This will download the base VirtualBox application
  3. Under 'VirtualBox Oracle VM Extension Pack', click 'All supported platforms'
    1. This will download the VB extension pack
  4. Locate the 2 downloaded files in your folder, and open the first file VirtualBox-6.1.10-138449-OSX.dmg
    1. It will open a drive window, click 'VirtualBox.pkg
    2. Proceed with the installation by clicking through to Agree
    3. *** If you get an error that says Installation Failed, follow these steps:
      1. Open up System Preferences
      2. Click on the Security & Privacy icon
      3. Hopefully you’ll see a message saying System software from developer “Oracle America, Inc.” was blocked from loading.
      4. If you do see the message, click the lock icon in the bottom left of the window
      5. Enter your Mac password
      6. Then click the Allow button
      7. Try the installation again
  5. Locate the second file and open Oracle_VM_VirtualBox_Extension_Pack-6.1.10.vbox-extpack
    1. Double-clicking the file will automatically open the VirtualBox application
    2. Either click 'install' or 'upgrade'
    3. Allow the extension pack to install and once you're done, it should look like this

Now that you have VirtualBox installed, you need to install the OVA file that allows Windows 10 to be run with VirtualBox:


Open Dmg Files Downloads

  1. Go to https://utexas.app.box.com/v/msb-student-vms
  2. Login with your EID and Password
  3. Click the 3 dots to the right of the Windows10-2004.ova file and click Download
  4. Once the file finishes downloading, locate the file and double-click to open. **Do not delete the OVA file from your computer
  5. Make sure these settings are selected and click Import
  6. Let the installer run and once it is done you can open VirtualBox


Next, we want to change some settings so we can view the window in full screen:

  1. Open VirtualBox from your Launchpad or list of applications
  2. Select Windows2004 from the left side
  3. Click the green Start arrow
  4. Windows will power up
  5. Navigate to the toolbar at the top of the screen and select Device
  6. Click Insert Guest Additions CD Image...
  7. Open file explorer from the taskbar at the bottom > This PC
  8. Double-click CD Drive (D:) VirtualBox Guest Additions
  9. Click Next>and follow through with the installation
  10. Select to Reboot Now at the end of the installer
  11. Once the Windows system reboots, navigate to the toolbar at the top of the screen
  12. Click View > Full-Screen Mode


Open Dmg Files In Virtualbox Windows 10

Next, we will create shared folders. This will allow you to share the same folder such as 'Downloads' between the Mac side and Windows side. This will allow you to download files into your MacOS in a folder and access it from the Windows VirtualBox and vice versa.

  1. Navigate to the toolbar at the top of the screen, click Devices > Shared Folders > Shared Folder Settings
  2. Click the Folder with a plus sign on the right
  3. Click the drop-down arrow next to Folder Path and click Other
  4. Choose the folder from your Mac that you would like to share
  5. Once the folder is chosen, check the boxes Auto-Mount and Make Permanent
  6. Click Ok
  7. To access the shared folder, go to File Explorer > This PC and the shared folder will be a Z or Y drive


The following steps are to install Microsoft Office onto the Windows interface:

  1. Open Microsoft Edge
  2. Go to office365.austin.utexas.edu
  3. Select Office 365 Portal
  4. Sign in with your EID and Password. Authenticate with DUO if asked to.
  5. Once logged on, click Install Office > Office 365 Apps

  6. Click Run when asked to download file and wait for Office to install

If you need Decision Tools to run these following Excel Add-ons (@Risk, StatTools, PrecisionTree, TopRank, etc.) follow these steps:

  1. In VirtualBox, open Microsoft Edge
  2. Go to https://utexas.box.com/v/dtsinstaller
  3. Login with your EID and password
  4. Click Download and allow the file to Run
  5. Open DTS_Installer.exe
  6. Click Install and allow the installation to run
  7. The installer will suddenly close when the progress bar is close to the end. Wait a few moments and a second installer will pop up
  8. Click OK and select Next through the installation without changing any settings to finish the installation
  9. The Decision Tools icons will now show up on your desktop or you can find them by looking in the Start Menu under Palisade Decision Tools
  10. Double-click the program you are looking for and Excel will automatically open. The add-on will be available at the top. *Make sure to not have excel open already


Open Dmg Files In Windows

When you are done using VirtualBox, make sure to always shut it down completely. Navigate cursor to top left corner to hit the red close button and select Power Off Machine. Click Ok.



FREQUENTLY ASKED QUESTIONS:

  • Can I use the Windows VirtualBox to install video games or other Windows-specific programs?
    • You can at your discretion, but it is highly not recommended. It will be slow and almost impossible to use.
  • Why is it so slow?
    • VirtualBox is a free program from Oracle, therefore it is not the fastest machine to use-- especially if you are on a MacBook Air or something that has a lower RAM. It is recommended that when you are using the Windows side that you don't switch back and forth between viewing the Mac system and the Windows system (even to answer iMessages). This can cause it to move slower.
  • Can I uninstall VirtualBox when I'm done using it for a class?
    • Yes, you can uninstall from your computer by following these steps:
      • Open the VirtualBox program
      • Right-click on Windows2004 on the left side
      • Click Remove > Delete all files
      • Allow VirtualBox to finish deleting the file
      • Once that's removed, go to your Applications folder (Cmd+Shift+A while on the Desktop)
      • Drag and drop VirtualBox to the trashcan
  • Are there any other options to use @Risk, PrecisionTree, or other Windows specific programs if I don't want to install this big program?
    • The computers in the MOD Lab and NRG all have these applications available for use.


Open Dmg Files Mac

Open

If you have any other questions or need help with the installation, please contact the McCombs Service Desk at 512-232-6616 or submit a help ticket at https://www.mccombs.utexas.edu/tech

Comments are closed.