How to distribute and install more than one boot image on a client

A disk can be partitioned into single, dual or triple boot partitions. Single and dual are already preconfigured in Deploy Studio; triple boot requires a custom configuration. The size and partitioning scheme can be modified so that it is customized for the specific desired partition mappings. Partitioning of the disk is necessary since current Mac lab machines contain only one image.

Creating the Needed Workflows

Creating the Workflow to Repartition a Disk, and Install Images

This step will concentrate on deploying a dual boot system with the Mac OS X image and Windows image created using the previous workflow. It will include a description of many of the relevant workflow objects including: partition the disk, restore images, bind to Active Directory, bind to Open Directory, install packages, run scripts, reconfigure the system, set the firmware password and shutdown the system when finished. The many steps to create this workflow are as follows:

  1. Launch DeployStudio Admin.
  2. Select WORKFLOWS.
  3. Click the “+” button at the bottom of the window.
  4. Double click the newly created workflow and rename it “!MultiBoot Restoration and Customization”.
  5. Next to where it says “Drop tasks here”, select the “+” button.
  6. Before imaging a volume it must be partitioned. There are a number of partition options, some of which are important to understand with multi-boot deployments. Drag the “Partition a disk” icon to the “Drop tasks here” location and customize the settings as follows:
    1. Specify the “Targetdisk:” volume name (i.e., “Macintosh HD”). Note: “Partition the first disk available” may be chosen but this could be problematic on Mac Pros with multiple internal drives or external USB or FireWire drives connected to the system. The first drive available is the drive that spins up the fastest. Note: Choosing the available drives from the drop down “Target disk:” menu will only show drives visible to the running DeployStudio Admin system and may not reflect the drives that will be deployed to, when an actual deployment occurs. Other partition names may be specified.
    2. From the “Apply layout template” drop down, choose “MacOSX+Windows” (if dual booting mac OS and Windows) Note: When adding more than three partitions, because of the EFI plug-in used on Mac hardware, the Windows partition must always be the last partition created. It is important to note that Macs use a hidden EFI partition, which will be visible using the “diskutil list” command in Terminal. In an example where the machine will be set up using a Mac partition, a FAT32 partition and a Windows partition, the Windows partition will technically be the fourth partition. In an example where Linux, Mac OS X, Windows and a shared partition are deployed, DeployStudio recognizes the first EFI partition and properly places Windows as the third partition when partitioning the drive. Mac OS X will be the fourth (technically fifth) partition, as DeployStudio does not actually display the EFI partition in the list.
    3. Rename the volumes accordingly (i.e., Macintosh HD and BOOTCAMP). To do this, mouse over the partition name and click the pencil icon in the upper right corner. To complete the partition rename click the check mark icon, which now appears after clicking on the pencil icon. Note: These partitions will be renamed when the image is deployed, based on the name of the master image(s). The name will be important and used in the next step where the “Restore a disk image” task must have the correct name of the partition to restore to.
    4. Adjust the size of the partitions by adjusting the slider bar(s) to the desired partition size or click the pencil icon (when mousing over the partition). Then set the percentage accordingly. Linux partitions must be set to a GB value manually.
    5. Leave “Write random data to the disk before partitioning (takes a lot of time)” unchecked. Use this function only if you need the existing data on the drive to be overwritten in a secure manner. This process could take several hours depending on the size of the drive and speed of the machine.
    6. Check Automate.
  7. Restoring a Mac image is straightforward but does offer a number of useful options. Drag the “Restore a disk image” to the right of the “Partition task” and customize the settings as follows:
    1. Specify the“Target volume:” as “Macintosh HD” or whatever name the partition was given in the Partition task step.
    2. Choose “HFS” from the “Image:” drop down menu.
    3. From the drop down, select the Mac .dmg created by the previous Dual Boot Master Image Creation Workflow.
    4. Uncheck “Restore image on the first drive available”.
    5. Leave “Rename volume to:” blank unless another name is required.
    6. Check “Donʼt check restoration (faster)”.
    7. Check “Erase target for block copy restoration (faster)”.
    8. Check “Rename By Host prefs”.
    9. Check “Cleanup machine dependent files and caches”.
    10. Uncheck “Enable multicast restoration”.
    11. Uncheck “Expand restored NTFS volume”.
    12. Check “Set as default startup volume”.
    13. Check “Automate”.
  8. Deploying a second Restore task for the Windows image is similar to deploying the Mac image, albeit with a few settings differences. Drag the “Restore a disk image” again to the right of the “Restore task” and customize the settings as follows:
    1. Specify the “Target volume:” as “BOOTCAMP” or whatever name the partition was given in the Partition task step.
    2. Choose “NTFS” from the “Image:” drop down menu.
    3. From the drop down, select the Windows ntfs.gz created by the previous DualBoot Master Image Creation Workflow.
    4. Leave “Rename volume to:” blank unless another name is required.
    5. Check “Donʼt check restoration (faster)”.
    6. Check “Erase target for block copy restoration (faster)”.
    7. Uncheck “Rename By Host prefs”. Note:This setting is irrelevant to Windows images, but will not effect the deployed image if checked.
    8. Uncheck “Cleanup machine dependent files and caches” .Note: This setting is irrelevant to Windows images, but will not effect the deployed image if checked.
    9. Uncheck “Enable multicast restoration”. Note: Multicast deployments are not possible for Windows images.
    10. Check “Expand restored NTFS volume”. IMPORTANT: Be sure to check this option so the Windows image will utilize the full Windows partition. Unchecking this option can result in unusable space on the Windows partition.
    11. Uncheck “Set as default startup volume”. IMPORTANT: Mac OS X has several tasks to run at start up, as well to finalize the deployment of the image. Note: Whichever volume is “Set as the default startup volume” last in the Workflow will be the default start up volume.
    12. Check “Automate”.

Other tasks can be performed on each partition.

Creating a Workflow to Update Three Partitions

TBD - this is what we're now doing for the labs (that have 1TB drives) and ISG - Still a WIP We are using the Apple server - mutsu.student.cs.uwaterloo.ca as the main repository for imaging of the undergrad labs. This server is running the current version of DeployStudio. Which means that the Net Boot Sets (.nbi) must also be at the current release. Please see "creating a NetBootSet" with DeployStudio. The NetBootSet must be created on the current architecture and OS to be used in the labs (necessary because of possible differences in system libraries - especially .kext files).

Before we progress further it is necessary to know the size of the partitions to be used in the workflow. This can be accomplished by the command "diskutil list" which as an example shows:

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            499.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

The example has an EFI (boot management) partition of 209.7MB, an Apple OS partition of 499.4GB and an Apple recovery partition of 650.0MB. We are interested in the size of the OS and recovery partitions. So a machine that has 3 versions of the Apple OS will have 7 partitions. Windows and linux will need more partitions.

How to Switch Between Mounted Volumes (different mounted volumes OS's)

you can read this item on how to change the startup disk

or you can just run these 2 lines in bash on the client machine (just remember to change the volume name). You can also send the script to machines via ARD or SSH

sudo bless -mount "/Volumes/Macintosh HD" -setBoot
sudo shutdown -r now

Problems

-- EdwardChrzanowski - 2015-01-23

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2015-09-03 - EdwardChrzanowski
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback