0

I've installed Ubuntu on my Mac (as dual boot). In the process I made a mistake and now I have an unallocated partition. I want to resize my Mac partition to use the unallocated space. Sometimes the disk util on my Mac crashes. So I have a problem here.

I tried to do it with gparted, but am new to that tool and not very confident using it.

enter image description here

What I want is to allocate the 59.19 GiB (unallocated) partition to the /dev/sda2 (Macintosh HD) partition.

enter image description here

1 Answer 1

1

You can't (easily) just combined sections of the disk when they are not contiguous (meaning: right next to each other). So, first you would have to move the Recovery HD (currently /dev/sda3) to the end of that chunk of disk space.

I haven't really researched (recently) just how safe some of these partition-manipulating activities have become over the years, and I suspect that (in some cases) the answer might vary based on the filesystem type.

You do have some other options:

#1 : Allocating a new partition:
Just allocate the 59.19 GB of space as a new partition. At first glance, that would mean having five partitions, which is technically possible but violates a common standard of 4 partitions max. A solution could be to simply change the partition type of the Recovery HD to unallocated, on the assumption that you won't need to use that frequently. This could be done with the right software, but may require significant care to make sure you're specifying locations precisely. Then again, you do have an "EFI System Partition", indicating a high likelihood that you're using GPT. If you rely on GPT, then you really shouldn't need to worry about the older 4-partition-limit that was imposed by common MBR implementations.

Simply turning this into a 5th partition is probably the safest approach (other than option #4). Unlike some of the other options, this option doesn't involve resizing partitions and/or moving partitions. With some of those other options, I would recommend not doing them until you have a conveniently-available backup of any irreplaceable data. (Not just a backup: You should, in theory, always have that. I specifically mean a conveniently-available backup.) With this option, I have enough confidence that I wouldn't worry too much about how conveniently-available by backup is, if I was using software that I was very familiar with (trusting that I would do everything correctly... or, if not optimally, at least safely).

You can mount that partition within the filesystem hierarchy. In other words, after making this into another partition, it just ends up looking like a directory located within your filesystem. Well, that's true with Ubuntu (using mount points). Even Microsoft Windows seems to have that capability these days (using junctions). I'm assuming it is with OS X, based on what I know of OSX, although I would suggest verifying that before relying on that. (You can simply try; there shouldn't be any major downsides if that doesn't work, as long as you find out soon before dumping tons of data on the space.)

Another option is to use that partition to install a third operating system. (Fun, fun.)

#2 : Grow Ext4:
Grow /dev/sda5 (the Ext4 partition). Changing the location of the start of the partition might affect a boot process that relies on data near the start of that partition. Changes may need to be made regarding the boot loader. Also, changes may need to be made for a boot manager. Both types of changes are very fast fixes (because they typically involves updating only a very small amount of space on the disk), although figuring out how can take a while.

Making some slight assumptions, I would think that it would probably be nice to make sure your Ext4 drive (presumably Ubuntu) is accessible from your Mac OS X boot (presumably using the HFS+ drive). I haven't recently checked how easy that is... how compatible the software options are. If that can work smoothly, then there ought to be little downside to just increasing the Ext4 drive.

An alternative to this may be to just delete the Ext4 partition, and make a new Ext4 partition that covers the space. This effectively gives you the same result (a large Ext4 partition), without using data-saving partition-growing software. However, you lose all the data. Since it sounds like you just installed Ubuntu, you might be able to do that right now while costing very little time (as you may have very little data to back up first, and have very few customizations that would need to be re-performed).

#3 : Expanding the HFS+ parititon
Just to be clear, I'm not saying that your original plan has a problem. You could do that too. I already discussed this further in my opening paragraphs. I'm not throwing out all these options to try to convince you to do something other than your original plan. That plan could work out just fine. I'm just mentioning the alternatives to point out some options.

#4 : Delay Decisions

You could just leave the space unallocated. OpenBSD FAQ: Additional Thoughts about Partitioning is not being very "operating system"-specific when they note, "You do not have to allocate all space when you set the system up. If you outgrow a partition, you can" do something then. Instead of thinking of this space as wasted, and having that bother you, you can think of it as non-committed. This means you can make decisions down the road, when you actually figure out what partition you've actually placed a bunch of data onto, and when you actually have a need. Then you can perform actions then, when you actually have a need, instead of now, when you are making guesses, trying to foresee where your need will be then (down the road).

If you think of things in that positive way, that may be far less bothering than feeling like you're wasting a valuable resource. Sometimes, some situations can be better off being "fixed" later (when you're likely to have more information).

Sometimes the disk util on my Mac crashes. So I have a problem here.

To me, this sounds tragic.

Only because of this comment, I would do look at that before trying to make changes to the disk. Research to see if that's common. If this isn't a known problem with the Mac software, then start by backing up your data. Then, perform some hardware testing. I'm operating off of very little information, so the issue might be a significant problem that is related to just the Mac disk util. Or, the issue might be something rather peculiar to your specific disk, possibly due to prior activity you've done (including using a disk util that has crashed before). Or, it might be that data gets corrupted while the disk util is doing something, possibly due to bad hardware (most likely culprit may be bad RAM).

I suggest exploring that last possibility before doing more with the disk, but even if you somehow completed all your partition-manipulating activities before doing the hardware testing, I would suggest running a memory check anyway. Bad memory can often start out by causing problems that are often invisible to start with, and can lead to annoying incidents like systems rebooting, and painful situations like losing data that is treasured, or important (for some reason(s) other than just being sentimental).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .