Installing Dmg On From Terminal

Bought a new Raspberry Pi? And that's awesome! However, you can not do anything with the micro computer if no OS was installed on it. For all Raspberry Pi devices, Pi OS (previously Raspbian OS) is the operating system designed for them. As a Mac user, you may want to know how to install Pi OS to SD Card with this new microcomputer

The download file is named 'cotvnc-20b4.dmg'. Here are the steps needed to install it remotely from the command line. Note: this technique can be used from a local Terminal window or a remote SSH connection. Mount the disk image. The first step is to mount (or attach) the disk image. From the command line, use: hdiutil mount cotvnc-20b4.dmg. All I have is an ssh access. Since a DMG is a disk image, I tried to mount it, but mount does not seem to recognize its format. File says my dmg f. I would like to install the dmg java package in my MAC OS through the terminal I tried using this command: sudo installer -package jdk-7u51-macos-x64.dmg -target / But I receive this error: ins.

Well, the idea is great but you must have detailed knowledge about the process and the necessary tools required for the task. During the installation of Raspberry Pi OS to SD Card, you will need one Mac computer, SD Card, Ethernet Cable, and Micro USB Power supply. If you have all this equipment, then be ready to perform the task by following the methods listed below.

Preparation

Before the installation gets started, there are a couple of things you should prepare for. This makes sure you won't waste any time in next stage. And the whole list in shown in below.

Raspberry Pi OS Download: You have to download Pi OS by your as no one is preparing this for you. Please go to Raspberry Pi OS Download page and pick up the one that suits for your board. The download file is archived in a Zip format and you should unzip the file using tools like Unarchiver app on Mac in order to get the .img file for Pi OS installation. After that, you can burn the .img file to SD Card.

SD Card Requirement: Not all SD Cards are eligible to run Pi OS. According to Raspberry official document, the SD Card should be Class 10 with more than 8GB capacity. The recommended card size is 16GB.

SD Card Reader for Mac: In default, there is no SD Card slot on modern Mac computers. So you have to use an SD Card reader on Mac instead. You can purchase one from Amazon or Apple.

SD Card Formatting: Any SD Card larger than 32GB should be formatted to FAT file system that Raspberry Pi supports. The default format is SDXC for 32GB+ SD Card. You can format the SD Card on Mac using Disk Utility app with the Erase option.

Once you have everything prepared, it is time to get started. Please follow the steps in below parts to begin installing Raspberry Pi OS to an SD Card on Mac.

Install Raspberry Pi OS to SD Card on Mac with DMG Editor

We will introduce three different tactics in this article and we come with the easiest one first. The tool we are going to use in this section is called UUByte DMG Editor, one of the best tools for flashing .img file to SoC like Raspberry Pi. It is very effective and easy to use utility for OS installation. Moreover, the interface is so smooth that even a mere novice can do the job at his/her own. Now, go through the process listed below to install Raspberry Pi OS to SD Card on Mac

Step 1: Software Installation and Plug SD Card to Mac

Download and Install UUByte DMG Editor on your Mac. The direct download link is given above. After completing the installation process, launch the application and insert the SD Card on Mac.

Step 2: Import Raspberry Pi OS .Img File

Now, click on the 'Burn' button and it will direct you to another window. Click on the 'Browse' button and then upload the image file of Raspberry Pi OS or you can use NOOBS files in a raw mode, which means no need to extract the folder. Make sure to check the target location of the SD Card that is located on the home page of UUByte DMG Editor.

Step 3: Write Raspberry Pi OS File to SD Card

Once the file is loaded, click on the 'Burn' button. Thereafter the process will get started and within a few minutes, the task will be done.

Step 4: Boot Pi OS from SD Card

Now, close UUByte DMG Editor and eject SD Card from Mac. Insert SD Card on your Raspberry Pi and boot from it. That's it; your job is done.

UUByte DMG Editor is a great application that performs multiple tasks in no time. The features are outstanding that helps the users to access the application smoothly. The performance level of the application is quite high and when you will use it, you will feel the same.

Install Raspberry Pi OS to SD Card on Mac Using Terminal

Terminal is a stock app on Mac when the users want to complete tasks from text command. It is totally free and you have to type a few commands combined in order to install Raspberry Pi OS to SD Card on Mac. It does the same as UUByte DMG Editor but without a visual interface. Also, you will have to format the SD Card to FAT first and then install Raspberry Pi OS. For the detailed procedure, follow the steps provided below.

Step 1: Insert the SD Card into a card reader and then attach it on your Mac.

Step 2: On your Mac, open Launchpad and search 'Terminal'. Click the app name from result page.

Step 3: In the terminal box, you need to enter a few commands to erase the data on the SD Card and you must these commands in a sequence manner one by one.

Step 4: First, you need to type 'diskutil list' in the terminal box to view the list of drives. Now, you will have to locate your SD Card and it will be presented in the form '/dev/disk2'. Here, disk2 is the name of inserted SD Card.

Step 5: Now, unmount the SD Card through the command listed below:

How to install dmg using terminal

diskutil unmountDisk /dev/disk2

Step 6: Write Raspberry Pi OS image file using this command:

sudo dd bs=1m if=raspbian-jessie-lite.img of=/dev/disk2

Note: Here, disk2 is given as an example and you must enter the disk name of your SD Card.

Step 7: The image writing process is started and it will take some time and once it is completed, you need to eject the SD Card from Mac using the command given below:

sudo diskutil eject /dev/rdisk2

Step 8: Now, remove the card reader from Mac and then remove the SD Card from the card reader and further insert the same on your Raspberry Pi.

Step 9: Thereafter, plug your Raspberry with the Ethernet and make sure to use the same network connection that you use for your Mac. Also, ensure to provide the power supply to Raspberry Pi using micro USB Power Cable. Soon, you will find the Raspberry Pi logo on Raspberry and this shows that your job is done.

Installing

Install Raspberry Pi OS to SD Card on Mac via NOOBS

This method is for the beginners as NOOBS (New Out of Box Software) offer the Raspberry Pi imager that will help the user to perform the setup task on Raspberry smoothly. To perform the task, follow the steps listed below.

Step 1: First, you need to format the SD Card, so do the task using the Terminal of Mac.

Step 2: Now, open the browser on Safari and then grab the latest version of NOOBS from the raspberry site.

Step 3: In the download page, you will get NOOBS and NOOBS Lite, download the one as per your convenience. The downloaded file is in zip format, so you will have to unzip the same.

Step 4: Now, locate the extracted NOOBS folder, open it, and then drag all the files and drop it on the SD Card. Make sure to drag and drop the files only, not the folder.

Step 5: After completing the above process, remove the SD Card from the card reader that is inserted on Mac. Now, insert the SD Card on Raspberry Pi and connect all the peripherals associated with the device. Soon, you will get the Raspberry Pi Logo on your Raspberry device, it means your job is done.

This method is simple and easy to use, but if you miss any file amid dragging and dropping process, then you will fail to get the result. In short, you will have to perform the task manually, starting from erasing the SD Card to write the image file of Raspberry Pi OS.

Conclusion

Terminal and NOOBS are good for installing Raspberry Pi OS to SD Card on Mac, but UUByte is much better. You don't have to tech-savvy and no need to read and input any command. Moreover, in the NOOBS process, you will have to perform additional steps to accomplish the task, but UUByte DMG Editor is completed automatic and you don't have to give much effort and time.

Scroll down to “Update and Solution” to see how to get this to work.

Apple recently released new installers for Mac OS X/OS X/mac OS to deal with expired certificates:

Three of the six are links to the Mac App Store:

The other three are URLs to download DMGs:

  • macOS Sierra – InstallOS.dmg
  • OS X El Capitan – InstallMacOSX.dmg
  • OS X Yosemite – InstallMacOSX.dmg

Today I tried (and failed) to create a new Virtual Machine in either Parallels or VMware Fusion using one of these DMGs, specifically, the El Capitan one.

I will explain what I did, and where I got stuck, in the hopes that someone else might figure out what I did wrong and point me in the right direction.

Download the DMG

Apple has created three DMGs for Yosemite, El Capitan, and Sierra, but couldn’t be bothered to give them useful names, so Yosemite and El Capitan are called ‘InstallMacOSX.dmg’ and Sierra is ‘InstallOS.dmg’.

How to install dmg using terminal

Likewise the DMGs aren’t named usefully when you mount them either, so make sure you name the DMGs well when you download them to avoid confusion. Here’s how to download it and rename it at the same time

Mount the DMG

Open the ‘~/Downloads/InstallElCapitan.dmg’

That will leave you with

“/Volumes/Install OS X/InstallMacOSX.pkg”

Extract the App

Don’t try to install from that .pkg file, it probably won’t work unless the Mac you’re using is capable of running El Capitan:

Instead, open it with Suspicious Package which will let you examine the contents of the .pkg file, as shown here:

Note the area in the red box. Obviously that’s not the full installer, despite the .dmg being over 6 GB. But let’s export it anyway:

Save it to /Applications/ (or wherever you prefer, but that’s where I’ll assume it is for the rest of these instructions).

Don’t eject “/Volumes/Install OS X/InstallMacOSX.pkg” yet, we still need to get the actual .dmg from it.

Get the other DMG

Download The Archive Browser if you don’t already have it (it’s free!) and use it to open “/Volumes/Install OS X/InstallMacOSX.pkg”.

It will look like this:

Installing Dmg On From Terminal 1

Click on the triangle to the left of “InstallMaxOSX.pkg” to reveal its contents, and select the “InstallESD.dmg” file from it.

Once it is selected, choose “Extract Selected” from the bottom-left. Save it to ~/Downloads/ (it won’t be staying there long).

Ok, this part could be confusing…

When The Archive Browser exports the file, it will not just export the “InstallESD.dmg” file. First it creates a folder “InstallMacOSX” and then it created “InstallMacOSX.pkg” inside that folder, and the “InstallESD.dmg” file is put inside the .pkg… but you can’t see it, because the .pkg file won’t let you open it.

That’s OK, because we’re going to use Terminal.app to move the file into place anyway.

First we need to create a directory inside the ‘Install OS X El Capitan.app’ which we previously saved to /Applications/. We’re going to use the same folder for two commands and we want to make sure we get it exactly right both times, so we’ll make it a variable:

Then use the variable with mkdir to create the folder:

and then we need to move the “InstallESD.dmg” file into that folder

Note: you probably want to trash the ‘~/Downloads/InstallMacOSX/InstallMacOSX.pkg’ (and its parent folder) now that it is empty, to avoid confusion later

Now if you look at the ‘Install OS X El Capitan.app’ in the Finder, it should show itself as 6.21 GB:

Installing Dmg From Terminal

So close, and yet…

VMWare was willing to start trying to make a virtual machine using the app, but it failed when it came to the actual installation part:

I don’t know what to try next. Parallels would not use either the ‘Install OS X El Capitan.app’ or the ‘InstallESD.dmg’ to try to create a new virtual machine.

Update and Solution

I posted a question on the VMware Fusion support forum asking how to do this, and someone came up with a very clever solution, which I will replicate here in case others are interested. The idea is simple, but I never would have thought of it.

Installing Dmg On From Terminal
  1. Create a virtual machine of any version of macOS, even the current version that you are using on your Mac.
  2. Inside the VM, download the .dmg (see below) and mount it.

  3. Launch the .pkg inside the .dmg.

  4. The .pkg seems to understand that it is inside a VM, and will install the app, which it would not do outside of the VM. Note that the Installer.app says that it will only take a few megabytes, but that is incorrect.

  5. Find the “Install OS X El Capitan.app” (or whatever the app name is) in the /Applications/ folder inside the VM. It should be over 6 GB in size.

  6. Copy the “Install….app” from the VM out to your actual Mac.

  7. Create a new VM using the “Install….app” from the /Applications/ folder on your Mac.

Step #4 is the part that I never would have guessed. The .pkg would not install the app outside of a VM, but will install it inside of a VM.

This worked perfectly with the El Capitan .dmg file, and I’m currently doing the same with Yosemite and Sierra. Then I’ll try the older versions of Mac OS X from old installers that I have from before they disappeared from Apple’s servers.

Update 2

Turns out that Rich Trouton wrote about this technique back in early 2017:

But I wasn’t working with VMs at the time, so I must not not stored that in my long-term memory.

Update 3

I had saved the older installers for Lion, Mountain Lion, and Mavericks, which are no longer available for download.

Installing Dmg On From Terminal 2

Each of them still installed as a VM. Apparently they were not signed with the certificates that expired.

How To Install Dmg Using Terminal

Older versions of Mac OS X (10.6.8 and before) are not available to virtualize.