It's fairly easy - the basic idea is that you create a blank image using Disk Utility (make it big enough to at least hold your stuff - exact size doesn't matter), open that image using Finder, put your stuff in and arrange it the way you want it (use right-click and Show View Options to set things like icon size or background image). That's almost it - all that remains is to convert that r/w image into a compressed image: eject it and use Convert in Disk Utility to convert it into a compressed image. None of the existing answers really did it for me; one answer is manual, and the two other options - iDMG and node-appdmg - both involve applescripting the finder which is not ideal. The best way to do this as an automatic build step is to create a template.dmg that looks exactly how you want (following the normal instructions, eg Simon Urbanek's answer, but not doing the last step of compressing it), then in your build script:. Use hdiutil to attach the image. Use cp etc to copy the application into the mounted image.
hdiutil detach. compress the image: hdiutil convert 'in.dmg' -quiet -format UDZO -imagekey zlib-level=9 -o 'MyApp-0.3.dmg' There's a makefile at that contains these steps. You can do that with Finder:. Download and unzip (I'm the one who created and uploaded it). Resize the DMG file to the appropriate size (the appropriate size is usually its current size plus the size of your.app file).
Once you've obtained all of the necessary materials, connect the USB drive to your Mac and run the Diskmaker X app. The app will offer to make installers for OS X 10.9, 10.10, and 10.11, and it. Mac OS X’s built-in Boot Camp Assistant (BCA) is capable of creating the bootable Windows 10 installer USB drive, so you don’t need any third-party apps.
![]()
To do this, open the disk utility (if you don't know how to do this, search for disk utility in Launchpad). Then click on 'Images' in the menu bar and choose 'Resize.' You will get a window to open a file, open the empty DMG file. Double-click on the DMG file to mount it. A device on the desktop named Untitled should appear. Rename it to the name that you want (you probably want to give it the same name as your program). Open that device.
![]()
You should see something like this: If everything is white except the shortcut to the Applications folder, press Cmd+ J and a window will be opened. On the bottom of that window, there is a square with the label 'Drag image here'.
Click on that square and an Open dialog will open. In that dialog, press Cmd+ Shift+ G and type /Volumes/ (whatever you called the device in step 3)/.image and select image.png. Everything here except the shortcut to the Applications folder is just a background image. You might want to change the background image (which contains the background color and the arrow). To do so, open the file /Volumes/ (whatever you called the device in step 3)/.image/image.png in an image editor and edit it to whatever you want.
After you've done this, you might need to unmount the device and remount it by opening the DMG file to see the changes. Depending on what you put in the image, you might also need to move the shortcut to the Applications folder around to fit the new background image. Drag your.app file to the beginning of the arrow in the window where the device from the DMG file is opened so that it looks like this: You might get an error saying that there isn't enough free space. If that's the case, go back to step 2 and resize the DMG file to a larger size.
Unmount the device by clicking on the arrow next to the device name in Finder:. Convert the DMG file to read only.
To do this, open the terminal and type this (replace /path/to/dmg/file by the path to the DMG file and nameOfDmgFile.dmg by the name of the DMG file): cd /path/to/dmg/file hdiutil convert -format UDZO -o newNameOfDmgFile.dmg nameOfDmgFile.dmg This will create a new DMG file called newNameOfDmgFile.dmg (or whatever other name you used above), which is the file that you want.
Back in the day when we bought OS X on discs, as long as you kept that disc, you always had a bootable installer just in case. Modern, downloadable versions of OS X create a on your drive, but it's always a smart idea to make your own bootable installer drive too. I recommend making one for Yosemite, on an external hard drive or USB thumb drive, for many of the same reasons I recommend: If you want to install Yosemite on multiple Macs, using a bootable installer drive can be more convenient than downloading or copying the entire installer to each computer. If you want to erase the drive on a Mac before installing Yosemite, or start over at any time, you can use a dedicated installer drive to boot that Mac, erase its drive, and then install the OS clean and restore whatever data you need from a backup. And if your Mac is experiencing problems, a bootable installer drive makes a handy emergency disk. Macworld also has bootable-install-drive instructions for,. As with previous versions of OS X, it’s not difficult to create a bootable installer drive from the Yosemite installer, though the processes have changed slightly since Mavericks.
I show you how, below. Keep the installer from being deleted Like all recent versions of OS X, Yosemite is distributed through the Mac App Store., if you leave the Yosemite beta installer in its default location (in the main Applications folder) when you install OS X 10.10, the installer will delete itself after the installation finishes. If you plan to use that installer on other Macs, or—in this case—to create a bootable drive, be sure to copy the installer to another drive, or at least move it out of the Applications folder, before you install. If you don't, you'll have to redownload the installer from the Mac App Store before you can create a bootable installer drive. Create the Yosemite install drive: The options I’ve come up with three ways you can create a bootable OS X install drive for the Yosemite: using the installer’s built-in createinstallmedia tool; using Disk Utility; or performing the Disk Utility procedure using Terminal. The createinstallmedia method is the easiest; if you’re at all comfortable using Terminal, it’s the approach that I recommend you try first. (Note that the createinstallmedia tool doesn’t work under OS X 10.6 Snow Leopard—it requires OS X 10.7 Lion or later.) The Disk Utility method is the way to go for people who are more comfortable in the Finder (though it does require a couple Terminal commands), and it works under Snow Leopard, Lion, Mountain Lion, Mavericks, and Yosemite.
The Disk Utility-via-Terminal approach is for the shell junkies out there. Whichever method you use, you need a Mac-formatted drive (a hard drive, solid-state drive, thumb drive, or USB stick) that’s big enough to hold the installer and all its data—I recommend at least an 8GB flash drive. That drive must also be formatted with a GUID Partition Table.
(Follow to properly format the drive.) Your OS X user account must also have administrator privileges. Option 1: Use createinstallmedia Starting with Mavericks, hidden inside the OS X installer is a Unix program called, provided by Apple specifically for creating a bootable installer drive. If you’re comfortable using Terminal, createinstallmedia is a relatively simple tool to use. As mentioned above, the createinstallmedia tool works only in Lion, Mountain Lion, Mavericks, or Yosemite—you can’t create an installer drive this way while booted into Snow Leopard. If you need to create a Yosemite beta install drive while booted into Snow Leopard, you should use the Disk Utility instructions, below. Using the createinstallmedia command in Terminal Here are the required steps:. Connect to your Mac a properly formatted 8GB (or larger) drive, and rename the drive Untitled.
(The Terminal command used here assumes the drive is named Untitled.) Also, make sure the Yosemite installer, called Install OS X Yosemite.app, is in its default location in your main Applications folder (/Applications). This means that if you moved it before installing Yosemite, you need to move it back before making your installer disk.
Select the text of this Terminal command and copy it: sudo /Applications/Install OS X Yosemite.app/Contents/Resources/createinstallmedia -volume /Volumes/Untitled -applicationpath /Applications/Install OS X Yosemite.app -nointeraction. Launch Terminal (in /Applications/Utilities). Warning: This step will erase the destination drive or partition, so make sure that it doesn’t contain any valuable data. Paste the copied command into Terminal and press Return.
Type your admin-level account password when prompted, and then press Return. The Terminal window displays the progress of the process, in a very Terminal sort of way, by displaying a textual representation of a progress bar: Erasing Disk: 0%. 10 percent.20 percent.
The program then tells you it’s copying the installer files, making the disk bootable, and copying boot files. Wait until you see the text Copy Complete. (see the screenshot above), which could take as long as 20 or 30 minutes, depending on how fast your Mac can copy data to your destination drive. You now have a bootable Yosemite install drive. If you like, you can rename the drive from its default name of Install OS X Yosemite, though I think it’s kind of a catchy name. Option 2: Use Disk Utility You’ll find Disk Utility, a handy app that ships with OS X, in /Applications/Utilities.
Here are the steps for using it to create your installer drive. The procedure is a bit more involved with Yosemite than it was for Mavericks (which was itself a bit more involved than under Mountain Lion and Lion). Right-click (or Control+click) the Yosemite installer to view its contents. Once you’ve downloaded Yosemite, find the installer on your Mac. It’s called Install OS X Yosemite.app and it should have been downloaded to your main Applications folder (/Applications).
Right-click (or Control+click) the installer, and choose Show Package Contents from the resulting contextual menu. In the folder that appears, open Contents, then open Shared Support; you’ll see a disk image file called InstallESD.dmg. Double-click InstallESD.dmg in the Finder to mount its volume. That volume will appear in the Finder as OS X Install ESD; open it to view its contents. Several of the files you’ll need to work with are hidden in the Finder, and you need to make them visible. Open the Terminal app (in /Application/Utilities), then type (or copy and paste) the following command, and then press Return: defaults write com.apple.finder AppleShowAllFiles 1 && killall Finder (This tells the Finder to show hidden files—we’ll re-hide such files later.).
Launch Disk Utility (in /Applications/Utilities) and then drag BaseSystem.dmg (in the OS X Install ESD volume) into Disk Utility’s left-hand sidebar. Select BaseSystem.dmg in Disk Utility’s sidebar, and then click the Restore button in the main part of the window. Drag the BaseSystem.dmg icon into the Source field on the right (if it isn’t already there). Connect to your Mac the properly formatted hard drive or flash drive you want to use for your bootable Yosemite installer. In Disk Utility, find this destination drive in the left sidebar. You may see a couple partitions under the drive: one named EFI and another with the name you see for the drive in the Finder.
Drag the latter—the one with the drive name—into the Destination field on the right. (If the destination drive has additional partitions, just drag the partition you want to use as your bootable installer volume.). Warning: This step will erase the destination drive or partition, so make sure that it doesn’t contain any valuable data. Click Restore, and then click Erase in the dialog box that appears; if prompted, enter an admin-level username and password. Wait for the restore procedure to finish, which should take just a few minutes. Open the destination drive—the one you’re using for your bootable installer drive, which has been renamed OS X Base System.
Inside that drive, open the System folder, and then open the Installation folder. You’ll see an alias called Packages. Delete that alias. Open the mounted OS X Install ESD volume, and you’ll see a folder called Packages.
Drag that folder into the Installation folder on your destination drive. (You're replacing the deleted Packages alias with this Packages folder.) The folder is about 4.6GB in size, so the copy will take a bit of time, especially if you’re copying to a slow thumb drive. Also in the mounted OS X Install ESD volume, you’ll find files named BaseSystem.chunklist and BaseSystem.dmg.
Copy these files to the root (top) level of your install drive (OS X Base System, not into the System or Installation folder). Eject the OS X Install ESD volume.
You’ll likely want to re-hide invisible files in the Finder. Open the Terminal app, type (or copy and paste) the following command, and then press Return: defaults write com.apple.finder AppleShowAllFiles 0 && killall Finder You now have a bootable Yosemite install drive. If you like, you can rename the drive from OS X Base System to something more descriptive, such as Yosemite Installer. You can use Disk Utility's Restore screen to create a bootable Yosemite installer drive.
Option 3: Use Terminal If you're a Terminal jockey, you likely know that most of Disk Utility's features can be accessed using shell commands—which means that you can perform the Disk Utility procedure using a few commands in Terminal. Download the Yosemite installer from the Mac App Store and make sure it’s in your main Applications folder (/Applications)—it’s called Install OS X Yosemite.app. Connect to your Mac a properly formatted 8GB (or larger) drive. Rename the drive to Untitled. (The Terminal commands I provide here assume the drive is named Untitled.).
Open Terminal and type (or copy and paste) the following commands, one by one, pressing return after each to run it. Make sure each command finishes—in other words, you see a command prompt—before running the next command. Enter your admin-level account password when prompted. Sudo hdiutil attach /Applications/Install OS X Yosemite.app/Contents/SharedSupport/InstallESD.dmg sudo asr restore -source /Volumes/OS X Install ESD/BaseSystem.dmg -target /Volumes/Untitled -erase -format HFS+ (During this step, you’ll be prompted to confirm that you want to erase the contents of Untitled. Type y and press Return.) sudo rm /Volumes/OS X Base System/System/Installation/Packages sudo cp -a /Volumes/OS X Install ESD/Packages /Volumes/OS X Base System/System/Installation/Packages sudo cp -a /Volumes/OS X Install ESD/BaseSystem.chunklist /Volumes/OS X Base System sudo cp -a /Volumes/OS X Install ESD/BaseSystem.dmg /Volumes/OS X Base System hdiutil detach /Volumes/OS X Install ESD You now have a bootable Yosemite install drive. If you like, you can rename the drive from its default name of OS X Base System to something more descriptive, such as Yosemite Installer. You can perform the Disk Utility procedure entirely in Terminal.
Booting from the installer drive Whichever of the above processes you've used, you can now boot any Yosemite-compatible Mac from the resulting drive: Just connect the drive to your Mac and either (if your Mac is already booted into OS X) choose the install drive in the Startup Disk pane of System Preferences or (if your Mac is currently shut down) hold down the Option key at startup and choose the install drive when OS X’s Startup Manager appears. When your Mac is booted from your installer drive, you can, of course, install the OS, but you can also use any of the OS X installer’s special. Depending on how you made your installer drive, when you boot from that drive, you may even see the same OS X Utilities screen you get when you boot into OS X Recovery (recovery mode). However, unlike with recovery mode, your bootable installer includes the entire installer.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |