Dual-boot deployments

jstrauss
Contributor

Are there any strategies you all use to deploy dual-boot machines? I'd like to create a Boot Camp partition with Windows SP3 and all of our software to be created during Casper Imaging.

Thanks for your continued help, everyone!

Jeffrey A. Strauss
Department of Educational Technology
Systems Administrator
Loyola High School of Los Angeles
1901 Venice Blvd.
Los Angeles, Ca 90006
(213) 381-5121 x265

? Apple Certified Support Professional
? Apple Certified Technical Coordinator

Please consider the environment before printing this e-mail.

12 REPLIES 12

milesleacy
Valued Contributor

There are some scripts for Boot Camp deployment in the resource kit.

----------
Miles A. Leacy IV

? Certified System Administrator
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com

Bukira
Contributor

Those scripts don't work ATM, I'm doing work to fix em

tlarkin
Honored Contributor

For what it is worth I did create and deploy a boot camp image on 6,000
macbooks last summer. I used two scripts that were pre-resource kit and
provided by Casper. I had some issues but in the end I was able to
reimage 6,000 laptops with a dual boot image in about 5 weeks time,
working 12 hour days every day.

On my website I have some links of what I did, and a brief description. I know Criss is having some issues but it worked fine for me, that is
all I can say.

http://tlarkin.com/tech/shell-script-post-image-machine-boot-camp-partition

I also have copies of NTFS.progs and gtprefresh if you need them I can
toss them on my webhost. let me know



Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351

Not applicable

I am using the winclone to make the bootcamp image an to deploy via a script. You can find info on the winclone website and in their PDF fir this issue
Cheers

Carmelo Lopez Portilla

Please consider the enviroment before printing this e-mail.

Bukira
Contributor

Aye, i cannot get it to work with a netinstall image,

It works fine with a Self Service policy and Casper Remote but i cannot
get it to work with Casper Imaging, i persume your restore script runs
as AFTER during the image process?

Criss

Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054

tlarkin
Honored Contributor

OK, I just pulled the script off my actual casper share, this is the
actual script we use to mass image our Macs. I image probably over 100
per a month that go in and out for repair and of course 6,000 every
summer. All I have to do is netboot and autorun data takes care of the
rest

#!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin export
PATH

## DISK PARTITIONING PARAMETERS

volume='/Volumes/Macintosh HD' mac='75%' windows='24%'

## BOOT CAMP SOURCE IMAGE PARAMETERS CasperShare="/Volumes/CasperShare" ntfs_image="$CasperShare/Scripts/BootCamp.ntfs"

# Optionally, you can set the following values explicitly root_target_disk="disk0" # e.g. "disk0" raw_target_dev="/dev/rdisk0" # e.g. "/dev/rdisk0" ntfs_slice_num="3" # e.g. "3" ntfs_dev="/dev/disk0s3" # e.g. "/dev/disk0s3"

### SCRIPT ACTION ###

# Resize the disk

/usr/sbin/diskutil resizeVolume "$volume" $mac MS-DOS windows $windows

# Determine, based on the target path passed to the script, what is the
device # number of the NTFS partition on the same drive

if [ "$root_target_disk" == "" ]; then root_target_disk=`df "$1" | awk '!/Filesystem/ {print $1}' | cut -c
6-10` fi root_target_dev=/dev/$root_target_disk echo "root_target_dev: $root_target_dev"

if [ "$raw_target_dev" == "" ]; then raw_target_dev=/dev/r$root_target_disk fi echo "raw_target_dev: $raw_target_dev"

if [ "$ntfs_slice_num" == "" ]; then ntfs_slice_num=`diskutil list $root_target_dev | awk 'BEGIN {disk "nodisk"} {sub("disk.s", "")} ($NF < 5 && /Microsoft Basic Data/) {disk
= $NF} END {print disk}'` if [ "$ntfs_slice_num" == "nodisk" ]; then echo "Failed to determine the NTFS device slice number -- try
adding it to the $0 script explicitly (target disk is
$root_target_dev)" exit 1 fi fi echo "ntfs_slice_num: $ntfs_slice_num"

if [ "$ntfs_dev" == "" ]; then ntfs_dev=/dev/disk0s$ntfs_slice_num fi echo "ntfs_dev: $ntfs_dev" echo ""

echo "Unmounting the target disk..." diskutil unmount $ntfs_dev

echo "Restoring disk image to target volume..." ntfsclone --restore-image --overwrite "$ntfs_dev" "$ntfs_image"

echo "Resizing target volume to partition limit..." ntfsresize -ff "$ntfs_dev"

echo "Reading file that contains MBR..." ntfscat -f "$ntfs_dev" /WINDOWS/system32/dmadmin.exe > /tmp/dmadmin.exe

echo "Harvesting MBR..." dd if=/tmp/dmadmin.exe of=/tmp/mbr skip=216616 count=446 bs=1

echo "Syncing GPT to BIOS partition table and restoring MBR..." gptrefresh -w -a $ntfs_slice_num -f -u -m /tmp/mbr $root_target_dev

echo "Updating boot.ini partition number..." ntfscat -f $ntfs_dev /boot.ini > /tmp/boot.ini perl -p -i -e "s/partition(.*)/partition($ntfs_slice_num)/g"
/tmp/boot.ini ntfscp -f $ntfs_dev /tmp/boot.ini /boot.ini

echo "Mounting the target disk..." diskutil mount "$ntfs_dev"

Maybe this ones differs from the one on my site I haven't done a side by
side comparison



Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351

Not applicable

My coworker recently returned from a week of training, and in a lab, they used DeployStudio ( http://www.deploystudio.com/Home.html ) to create triple-boot machines! I gather that DeployStudio is the spiritual successor to NetRestore, but haven't used it myself.

I'm not sure how you'd use it in conjunction with Casper Imaging.

Clinton Blackmore

dustydorey
Contributor III
Contributor III

Casper is able to deploy dual boot environments as well, my coworker here has been working on it and is currently out otherwise I’m sure he’d respond. And it doesn’t matter what imaging solution you use whether it’s Casper imaging or Deploy studio, certain things are going to be the same. You need to boot to something other than the drive your imaging so either way you’re netbooting or using a restore partition. You need to partition the drive, you need to format the partitions correctly (NTFS for the windows side I believe you use NTFSprog ) and lay down the images (configsJAMF has put together in the resource kit much of what you’ll need to do dual boot deployments, and Thomas Larkin also has some resources on his website, and knowing Thomas I’m sure he will respond to this. J

One thing we’ve encountered is that it’s not too difficult to lay down a monolithic windows image in a dual boot deployment. But when you add in needing to do things like binding to AD etc… where UID is concerned it makes things a little bit more difficult. Then you really have to start messing with Sys Prep and stuff. Again my co-worker has been doing the work on developing that here so I don’t have the intimate knowledge he has, but I do know that there are several people on this list serv that have done it and do regularly deploy dual boot with Casper, so I’d check the archives.

There has been lots of talk about deploy studio lately, and from everything I’ve seen it makes no sense to me to use it in a Casper environment. It has far less to offer and Casper can do anything it can do. With all the talk about deploy studio lately I asked a couple Apple Systems Engineers about it, and both of the Apple SE’s I asked about it in comparison to Casper Suite said not to bother with it if you have Casper available. It’s a step down. And you won’t have the great support that JAMF provides. It does make for a nice presentation and all since it is pretty, but in practice no matter what system you use to do the imaging you’re going to run into the same pitfalls that need to be overcome.

Definitely check through the archives on this, check out the resource kit and I know Thomas has some good info, maybe my co-worker Jason will weigh in if he has time as he can speak with more authority on the matter, but I’m not sure when that might be. From our conversations about how his testing and development of the process for our needs here I know he said that having to Bind to AD increased the amount of setup. But I can’t say why since I’ve been keeping my nose out of it while he worked on it.

Good luck.

Dustin Dorey

Technology Support Cluster Specialist

Independant School District 196

Rosemount-Apple Valley-Eagan Public Schools

dustin.dorey at district196.org

651|423|7971

Bukira
Contributor

I sent jeff my scripts and article so he should be able to get going

Dustin can u give mr ur coworkers email , I'd be interested on talking to him about issues I came across

Cheers
Criss

Bukira
Contributor

That's same as ur site and it don't work for me with my netinstall but I'd be interested in others experiences, I sent jeff mine so he can try both

Cheers

Criss

Not applicable

i could not get it working either while netbooting. it kept failing when it went to lay down the windows image (it partitioned fine) even though the ntfsprogs apps were all in the right locations and they were in my path. my solution was to run it once the machine was booted either by policy or casper remote but i manually mount the casper share in the script with the following lines:

mkdir /Volumes/CasperShare
mount_afp afp://login:password@your.address.here/CasperShare /Volumes/ Caspershare

this has worked fine for us. i also modified it a bit to modify the log output so it can be monitored

jorge a. najera-ordonez

Not applicable

As Dusty has mentioned below, I have been working with the dual boot deployment for the past few weeks and thanks to the JAMF resource kit, as well as Mr. Larkins help I have been able to successfully deploy some test images. I haven’t used this in large scale yet, but as far as testing a couple machines out things seem to be coming together..

However, there are a few issues I would like to point out from my own experience.. So if anyone has any ideas or suggestions to streamline this, please let me know..

The first thing that I have noticed in talking to people and looking through others scripts is that it appears most people are still deploying Windows XP. While running the unix script to split partitions and lay the image down, I believe the script is only splitting the partition into a FAT32 partition. (Correct me if I’m wrong..). In digging through the script, I do not see anything that references a convert process from FAT32 to NTFS.

But since we are trying to dual deploy Windows Vista, the Windows partition must be NTFS. The only way I have been able to do this is to run the Windows disk, and format the partition from FAT32 to NTFS.

The other issue I have not been able to resolve is the issue with updating the MBR. With XP you can update the MBR file by pulling info from the dmadmin.exe file. All the scripts I have seen utilize this.. But again, Vista is different. Vista uses the BCD, instead of the boot.ini file that was used in previous versions of Windows.. As far as I can tell, it’s not as easy (or possible?) to update the BCD file other than from within Vista..

The main problem with that is you seem to lose the ability to change your Windows partition size at deployment. If I create the image on a 30.0GB partition, it must be deployed to a 30.0GB partition. If I do this, the image will work. If you partition the Windows drive at any other size than the original, it will error out upon boot. Basically I cut the parts referencing the MBR and boot.ini file creation out of my script. (also eliminates the need for the gptrefresh.c file)

At this point, it is fairly well automated other than the ability to format the drive. From there it all depends on its usage.. If you will be using a simple Windows image not bound to AD, things will be fairly easy (since you can eliminate the need for Sysprep). In our environment we will need to bind or join our AD environment, therefore I will need to run sysprep so each machine gets a unique ID. This creates more work yet for me as Vista will have to run through a bit of automated setup during its first boot. Then we will need to manually rename each machine and join it to AD.

Basically my workflow looks something like this..

1.) Split single Mac partition into 2. (1-Mac Journaled HFS+ partition, and 1 MS-DOS FAT32 partition) – (Automated script from within Casper)

2.) Run Vista Boot disk to convert the FAT32 partition to an NTFS partition. (Manual)

3.) Run my Casper config to lay down the Mac setup, then upon reboot start to load my Vista image. (Automated with Casper)

4.) After imaging I then boot into Vista, which will run it’s setup (requiring a couple more reboots..) - (Manual)

5.) Once setup is complete I rename the computer. - (Manual)

6.) Join to AD - (Manual)

Not the ideal situation for mass deployment.. But it will work for the few machines we plan to do at the moment..

If anyone has any pointer on how to streamline this more, please let me know! I’m sure once a few dual-booted machines are out, the demand will go up.

Jason