Jump to content

[howto] resize a hfs+ partition using Ubuntu Live CD


zsero
 Share

13 posts in this topic

Recommended Posts

If you want to resize your already installed osx partition I found a great guide at ubuntuforums.org

As you may know there are some disk partition utilities for mac iPartition and VolumeWorks but they are using non-PC standart partition tables, so we cannot use them. On the windows side, there are very good utils too, (Acnoris, Partition Magic and many freewares) but they only show you id=af for osx drives. Ubuntu on the other hand is a linux distro which is compiled for x86 and PPC too and has read-write hfs+ (osx drive format) support.

 

the original guide is here:

http://ubuntuforums.org/showthread.php?t=89960

 

A. osx part

1. using either the install DVD's console or a working osx's console disable journalling (you can enable it after resize)

sudo diskutil disableJournal \dev\disk0s1 //replace disk0s1 with your partition

2. shut down osx

 

B. linux part

1. You need an Ubuntu live distro. There is no Ubuntu Live CD, there is only one cd for installing and for live booting. So grab the newest Ubuntu for "Desktop PC" at http://www.ubuntu.com/download . Just to prepare yourself its a 700 MB ISO file.

2. burn that iso and boot from that cd

3. it asks you 6 options, you need to select the 1. and boot ubuntu

4. after it has booted go to applications\accessories and select terminal

5. type "sudo parted /dev/sda" if your osx partition is on a SATA disk, "sudo parted /dev/hda" if you are on a PATA disk

6. type "print"

If everything goes well you get a list about your partitions on that drive. Try /dev/ sdb, sdc, hdb, hdc if you got nothing back

7. type "resize"

it will ask you for partition do you want to resize, answer the partition's number you just got from the print command

you need to answer for the beginning and the end of partition space, if you are not sure, just imagine your drive from 0 GB to x GB and partitions on that from a GB to b GB. Now that asks you for a and b.

8. wait until it completes (it was 5 minute for me but if your drive is full it might be about an hour. quit.

9. use fdisk to set your partition id to "af"

sudo fdisk /dev/sda (same as before)

type p to print partition table

type t

asks for partition number: same as before

new type: af

10. make it active:

use b to toggle partitions boot flag until only one has a flag to boot

11. write partition table:

type b

10. you are done, reboot

Link to comment
Share on other sites

  • 3 weeks later...

Hi, very nice suggestion thanks and it works if i need to resize from bigger to smaller partition!

 

...BUT

 

there is a "little" problem (what i actually need) : i cannot resize a smaller partition to a bigger partition, even if there is free space after that ! It is always giving me the problem that it exceeds the constraints of ... (it does not exceed though...)

 

Have you ever tried doing that ?

 

Can you provide me (us) a solution (if there is) for that (resizing from smaller to bigger partition) ?

 

Thanks!

Mal

Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...

I am having the same problem .. Gparted can only shrink HFS but not "grow" it.

How can i enlage my HFS Partition ? :-(

 

Would this work?:

-) "dd" it to an external storage (output as file for instance) (10 GB)

-) build a new empty HFS+ with 70 GB

-) "dd" it back from external storage to new Partition

 

I have never used "dd" so i fear i will destroy everything :-(

 

Any Ideas or Solutions?

Link to comment
Share on other sites

Well, there is no way to increase the size of HFS+ so far, thus, if you need to, clone your contents into a spare partition, then wipe and re-create the size of HFS+ intended. then clone it back. Use CloneTool. Its design for Hackint0sh too. :)

 

Hope that helps.

 

Matthew

 

Well, there is no way to increase the size of HFS+ so far, thus, if you need to, clone your contents into a spare partition, then wipe and re-create the size of HFS+ intended. then clone it back. Use CloneTool. Its design for Hackint0sh too. :)

 

Hope that helps.

 

Matthew

Link to comment
Share on other sites

I tried to use Clonetool to clone it to an external 250 GB drive ...

but after a while my finder i think crashed - the whole mashine was slow and then nothing reacted.

So I had to power off my hackintosh.

 

I think it will work to boot from an Ubuntu LIVE CD (or any other) and "dd" it to an file on my external drive.

 

Then I set up a new BIG HFS+ and "dd" it back - will this work?

Link to comment
Share on other sites

  • 2 weeks later...
I think it will work to boot from an Ubuntu LIVE CD (or any other) and "dd" it to an file on my external drive.

 

Then I set up a new BIG HFS+ and "dd" it back - will this work?

I'm pretty sure it won't work that way!

 

'dd' copies, if used properly, the source filesystem e.g. into a file on another big enough place. When you

copy it back into your now enlarged partition, you get 

your old filesystem with the same size as before which 

now sits in a too big partition. Well, maybe another utility 

could fix this situation, but 'dd' certainly not.

Sorry, I'm too new to Hackintosh to give you an advice for a proper tool.

 

 

\relax\bye %  Viktor

Link to comment
Share on other sites

  • 2 months later...

Instead of tar I use ditto to an image disk or another disk (like external), last instalation on my Dell i used it from VMware on Vista, I copy the contents of my Mac partition to an image disk, then resized the Mac partition and copied back.

Link to comment
Share on other sites

Instead of tar I use ditto to an image disk or another disk (like external), last instalation on my Dell i used it from VMware on Vista, I copy the contents of my Mac partition to an image disk, then resized the Mac partition and copied back.

 

nice, thanks ;)

Link to comment
Share on other sites

  • 1 year later...

This method did not work for me. My HFS+ partition got converted to Linux and is not bootable. I tried booting from OSX install cd and running Disk Utility. It also sees it as Linux partition. Looks like I'm gonna have to reinstall OS X. Unless there are other suggestions.

Link to comment
Share on other sites

  • 4 weeks later...
This method did not work for me. My HFS+ partition got converted to Linux and is not bootable. I tried booting from OSX install cd and running Disk Utility. It also sees it as Linux partition. Looks like I'm gonna have to reinstall OS X. Unless there are other suggestions.

 

 

It's probably too late to save you from reinstalling, but download and run TestDisk on Ubuntu. It's saved me a couple of times.

Link to comment
Share on other sites

 Share

×
×
  • Create New...