Posted on 02-07-2011 06:08 AM
Scenario: 1000 deployed laptops. All users are admins.
Our AUP clearly states that they are not allowed to install Boot Camp
or virtualization software. I can (and have) easily detect a Parallels
or VMWare installation, but have not yet figured out how to detect if
the user has installed Boot Camp.
I've deleted the Boot Camp Assistant from the image, but a savvy user
will just get it from elsewhere.
How can I use Casper (v 7.2.1) to detect whether a machine has been boot-camped?
Thanks,
Damien Barrett
System Technician
Montclair Kimberley Academy
Montclair, NJ 07042
973-842-2812
Posted on 02-07-2011 06:29 AM
I would recommend running a script grepping diskutil list. Something like this:
diskutil list | grep "Microsoft"
The machines that I have bootcamp on returned partitions.
Hope this helps!
Kerry
Posted on 02-07-2011 06:30 AM
I think you can do this with an extension attribute populated via a
script. You can use "diskutil list /dev/disk0" to bring up a list of the
partitions on the drive, which includes a column for type (HFS, etc.).
(I'm assuming that you don't have any fancy dual-drive laptops, so disk0
will always be the one and only internal startup disk.) I don't have any
Boot Camp partitions to check against, but I think you can then pipe the
diskutil output through sed/awk to pull out any NTFS/FAT partitions. You
could stop there and leave that as a flag for computers of interest, or
you could get fancy with some further scripting to check for the presence
of Windows OS files.
-Charlie
-------------------------------------
Charlie Smith
Desktop Engineer
Information Services Department (ISD)
MIT Lincoln Laboratory
244 Wood St. Lexington, MA 02420
Phone: 781.981.0854
E-mail: charlie.smith at ll.mit.edu
-------------------------------------
Posted on 02-07-2011 06:31 AM
When I ran a dual boot image I would use the df command to see if there were NTFS partitions on any volume. I don't have an NTFS partition handy at the moment (my office has 5 Macs in it, and not a single install of Windows on them) but I basically just ran something like this
if [[ df | grep -c "NTFS" == 1 ]]
then echo "Windows detected" else echo "Windows not detected"
fi
That syntax could be super wrong since I don't have anything to test it with. Then I used dummy receipts but now with version 8 you can do extension attributes. You can also use diskutility command line as well.
Posted on 02-07-2011 06:31 AM
echo "<result>diskutil list disk0 | grep disk0s3 | awk '{print $5}'
</result>"
if you only have 1 parition normally this will output if you have a second parition together with its name, you could change to output the type
Criss
Criss Myers
Senior IT Analyst (Mac Services)
iPhone / iPad Developer
Apple Certified Technical Coordinator v10.5
LIS Development Team
Adelphi Building AB28
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054