Posted on 11-06-2008 01:44 PM
We are setting up images and netbooting across our network. We have the image part down no problem.
We are wanting to split up the HD into a OS partition and a data partition.
For some reason the script we are using errors out during the imaging process, however, when we run it thru target mode to a machine it works perfectly. We are imaging eMacs to 10.4.11.
The error from the jss log is as follows:
Result of running split_part.sh was: Partitioning encountered error Could not unmount disk (-10000) on disk disk0
The scripts is as follows:
#!/bin/sh
#create two partitions, one data and one for the OS
/usr/sbin/diskutil partitionDisk disk0 2 HFS+ 'Macintosh HD' 50G HFS+ data 23G
echo 'done'
any ideas?
Thanks in advanced....
Mark Hughes, Apple Technician
TIS Department, KCKPS USD500
Cell 913-449-7791
mahughe at kckps.org
Posted on 11-06-2008 01:52 PM
What
are you booted from when you perform the partitioning? Tiger or Leopard?
The following command is what I typically use.
diskutil partitionDisk disk0 3 HFS+ Macintosh HD 40G HFS+ Restore 20G
HFS+ Data 0b
Note that the command above will create a 40 GB Macintosh HD, a 20 GB
Restore (highly recommended), and the "0b" size notation translates to
all available space. Using "0b" allows you to partition any drive
without worrying about leaving unused free space on the disk.
I'm not familiar with the single quotes on a volume name. I've always
just escaped the necessary characters. Here's the command I would use
given the parameters listed in your script...
/usr/sbin/diskutil partitionDisk disk0 2 HFS+ Macintosh HD 50G HFS+ data 23G
Posted on 11-06-2008 01:52 PM
I saw this strange problem, too. Check what the disk# is when netbooted
vs. firewire. when I netboot the it is disk0 and with firewire it is
disk1
check using "diskutil list" in Terminal
-Nathaniel
Posted on 11-06-2008 02:01 PM
Also if you are netbooted you will need to make sure that you have checked "diskless" on your netboot image on the server. Otherwise it uses the local disk for "shadow" files and can't unmount it because it is in use.
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu
Posted on 11-06-2008 02:01 PM
The weird thing is guys and gals, is that I also have a simple one liner pre image script that uses diskutil to create a single partition on disk0 and name it Macintosh HD, just in case the users changed the volume name.
That script works, I used the same code in this script and it doesn't work while imaging, but if you run it manually, no problem works like a champ. Casper version 6.01
Posted on 11-07-2008 12:12 AM
This is what i use
#!/bin/sh
diskutil partitionDisk disk0 2 GPTFormat "HFS+" "Macintosh HD" "80%" "MS-DOS" "Windows" "20%"
diskutil enableJournal disk0s2
i run it as the first script before anything else,
I netinstall using caspers netinstall,
Im runinng 10.5.4 netinstall and client image
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
Posted on 11-07-2008 06:19 AM
okay...this tip got the process to split the drive how we wanted it. Though it seems as if we are in a
netboot loop. The test machine now netboots on each restart back to casper imaging.
Mark Hughes, Apple Technician
TIS Department, KCKPS USD500
Cell 913-449-7791
mahughe at kckps.org
Posted on 11-07-2008 06:31 AM
In theory the Casper Installer could get confused when you repartition the space, as to what to set the boot device too. You could perhaps add to your script after you partition the drive to 'bless' it. This way, even if Casper forgets to set the boot volume, you have already done it manually.
I'm not entirely up to speed with the bless command, but I think Bombich has some good info on it, or you could 'man bless'.
Hope it helps,
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu