Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

resize partition using terminal - error:

I am trying to resize my osx partition so i can implement a triple boot. I have an 80gb drive in my macbook - osx uses 43.57GB out of 60GB and xp 20GB GB. I attempted to use this code in terminal:

diskutil resizeVolume disk0s2 56G "Linux" "Linux" 14G
then it says:
verifying

Resizing encountered error The underlying task reported failure on exit (-9972) on disk0s2 Macintosh HD

how should i attempt this? is my code correct?

10.4.9

Posted on Feb 27, 2008 10:19 PM

Reply
12 replies

Feb 28, 2008 11:57 AM in response to cornelius

I tried with disk util off the tigerDVD but it didnt appear to have any repartitioning features that wont erase whats there.
but i am curious about that terminal command. The command doesnt give a command error, it seems to give it a go but there is something else wrong.

Drive genius wont work for me as i already have a windows part. I know ipartition should do what i want - can anyone name any others? is there a shell command?

Message was edited by: kindkind1

Feb 28, 2008 12:22 PM in response to kindkind1

alright, i am repairing with DG now.
so if this repair should allow the terminal to complete my command, is it a good idea to run while sitting there in the osx volume i plan to repartition? or should i do it from my saved clone boot drive i made with Superduper! would it be the same command - disk0s2 in the terminal?

thanks evermore

Message was edited by: kindkind1

Feb 28, 2008 1:38 PM in response to cornelius

thanks for volume works Cornelius but after my super duper purchase and my drivegenius purchase i am hoping to use the diskutil if possible. I have heard that it works, but perhaps on on leopard machines. The code i was given:
*diskutil resizeVolume disk0s2 56G "Linux" "Linux" 4G*

if this is a valid command for tiger, should i run it from a different bootdisk and if so would the command still be disk0s2?

I have been looking around a while now and i see references to using the sudo command but im not sure how i should do it.
i typed man diskutil into terminal and didnt see anything about "resize" so i just may be out of luck but i want to know for sure, Thanks

Feb 28, 2008 1:57 PM in response to kindkind1

i took a look, and i believe that the program behind diskutil is hdiutil.
please correct me if im wrong.

in the terminal i typed
man hdiutil

and found resize as a command there:
*resize size_spec image*
Given a read/write partitioned UDIF, if the last partition is
Apple_HFS, attempt to resize the partition to the end of the
image, or to the last used block in the embedded HFS/HFS+
filesystem (depending on size_spec). resize is often used when
a device image needs to be shrunken so that the HFS/HFS+ par-
tition can be converted to CD-R/DVD-R format and still be
burned. Note that gaps cannot be reclaimed as resize does not
move data. -fsargs can sometimes be used to minimize filesys-
tem-generated gaps. resize can also be used to grow a
filesystem and image without bound.

hdiutil burn does not burn Apple_Free partitions at the end of
the devices, so an image with a resized filesystem can be
burned to create a CD-R/DVD-R master that contains only the
actual data in the hosted filesystem (assuming minimal data
fragmentation).

Common options: -encryption, -stdinpass, -srcimagekey, -shadow
with friends, and -plist.

Size specifiers:
-size ??b|??k|??m|??g|??t??p|??e
-sectors sector_count | min | max
Specify the number of 512 byte sectors to
which the partition should be resized. If
this falls outside the min/max values, an
error will be returned and the partition will
not be resized. min automatically determines
the smallest size the partition can be
resized to and uses that value. max automat-
ically determines the largest size to which
the partition can be grown and then uses that
value.

Other options:
-imageonly only resize the image file, not the parti-
tion(s) inside of it. This is the default
for UDIF images (more partitions can then be
added in the new free space).
-partitiononly only resize the partition(s) in the image
(including their embedded filesystems). This
is the default for NDIF images. For a newly-
created SPUD where the partition fills the
image, the partition can only be shrunk. If
there is an Apple_Free partition after an
existing partition, that partition can be
expanded into the space marked by the
Apple_Free. Shrinking a partition results in
a larger Apple_Free partition.
-partitionNumber partitionNumber
specifies which partition to resize (UDIF
only -- see HISTORY below). partitionNumber
is 0-based, but, per hdiutil pmap, partition
0 is the partition map itself.

-growonly only allow the image to grow
-shrinkonly only allow the image to shrink
-nofinalgap allow resize to entirely eliminate the trail-
ing free partition. Such an image restored
to a hard drive will not boot OS 9 nor will
it allow OS X to boot on old-world (beige)
machines.

-limits Displays the minimum, current, and maximum
sizes (in 512 byte sectors) that could be
passed given possible -imageonly or
-partitiononly flags. Does not modify the
image.
-oldlimits behaves like -limits except that it reports
the stretch sizes that OS X version 10.3
would have reported (useful if an image needs
to be used with asr(8) on an older system).

segment


++++++++++++++++++++
I still dont know what exactly to enter but now i feel like this could actually work using terminal. any help is appreciated

Feb 28, 2008 4:32 PM in response to kindkind1

if you enter diskutil resizeVolume in the Terminal w/o any arguments, you'll see a brief manual-type description of function and usage; that is you will on OS X versions that include it. I understand it's how bootcamp manages to create a new partition w/o a complete erase of the disk, so was introduced when bootcamp beta came out.



Disk Utility Tool
Usage: diskutil resizeVolume [Mount Point|Disk Identifier|Device Node] size
<part1Format part1Name part1Size> <part2Format part2Name part2Size> ...
Non-destructively resize a disk. You may increase or decrease its size.
When decreasing size, you may optionally supply a list of new partitions to create.
Ownership of the affected disk is required.
Valid partition sizes are in the format of <number><size>.
Valid sizes are B(ytes), K(ilobytes), M(egabytes), G(igabytes), T(erabytes)
Example: 10G (10 gigabytes), 4.23T (4.23 terabytes), 5M (5 megabytes)
resizeVolume is only supported on GPT media with a Journaled HFS+ filesystem.
A size of "limits" will print the range of valid values for the current filesystem.
Example: diskutil resizeVolume disk1s3 10G
JHFS+ HDX1 5G MS-DOS HDX2 5G
Valid filesystems: "Case-sensitive HFS+" "Journaled HFS+" "Case-sensitive Journaled HFS+" "HFS+" "HFS" "MS-DOS FAT32" "MS-DOS FAT16" "MS-DOS" "MS-DOS FAT12" "UFS" "Linux" "Swap"


Message was edited by: andyBall_uk

resize partition using terminal - error:

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.