Is there any way to unhide partitions that have been hidden by a third party partitioning tool on a Mac using nothing more than Terminal via a Mac OS X Boot CD or USB stick?


These partitions have not been hidden via any Mac OS X mounting options. They have simply had their partition identifier changed via software like Partition Magic, GPartd or some other similar tool.

I have already taken a look at the command line options provided by diskutil and can not find anything to make the equivalent changes under Mac OS X.

  • Ouch - if the partition identifier is changed, then the partitions are gone as far as mac is concerned. You'll need a hex editor or be really good with dd to fix that from the command line. – bmike May 12 '11 at 0:29
  • Mac OS X sees the partitions just fine but is definitely listing them as hidden (as per the partition identifier). I'll post more details when I get a chance but using GPartd, or any other partitioning tools, is something I would like to avoid if it can be natively done in Mac OS X. – Asinine Monkey May 12 '11 at 10:58

Often "hiding a partition" is simply setting them to not mount at boot. Have you looked in /etc/fstab for a noauto line that prevents one of the Volume UUID from mounting in the default manner?

You should be able to read all the partition, volume and filesystem information in terminal or Disk Utility (both of which are in the Utility menu of the install app)

diskutil list, diskutil info disk0, and diskutil info disk0s2 should get you started. diskutil will list all the commands if you just run it without any commands listed.

Of course, if the utility is using non-standard drivers or encrypting/obfuscating things you will have a harder time getting into the drive without more detailed information on how that specific utility did it's work. If diskutil can't see the partition then it's not actually hidden but gone. Tools like that run the risk of you using the space that is marked as free unless they do a good job of modifying the size of the device and hacking the partition table data.

In response to your edit - if the partition tables are changed to be non-standard you can undo the damage by being very good with writing hex values using dd - if you get the it right, you can reverse the changes that were made to alter the file system definition data. Using gparted or another tool that is built for the task would sure be safer and probably easier.

  • The use of dd would be acceptable. I'll experiment and consider accepting your answer if successful. – Asinine Monkey May 12 '11 at 11:00

A linux live CD (like Ubuntu) should be able to view and modify partition information using command line tools:

  • fdisk
  • cfdisk

I'm not sure why you are needing a command line only solution, so just to be complete, you can get into the full disk utility from a Mac OS X install CD.

Also, that same linux live CD would give you access to gparted, which is a very good partition editor for linux.

  • The requirement is part of a build process I am working on. I have no wish to add another partitioning tool to the mix and unfortunately Disk Utility via the GUI or otherwise does not do what I need it to do, hence the question. – Asinine Monkey May 12 '11 at 11:02

You must log in to answer this question.

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