How to force drop all partitions and erase disk from terminal?
Are you sure that /dev/disk2
... /dev/disk12
are partitions on your SSD? I would expect partitions to have device nodes named /dev/disk1sN
, where N
is the partition number.
I suggest using the graphical Disk Utility so that you can see what is going on. Better yet, boot to the Recovery Partition (hold ⌘R when powering on) and instead of running the Mac OS installer, launch Disk Utility from the menu. That way, you will be manipulating the partitions before anything gets mounted.
Related videos on Youtube
Ilya Rusanen
Updated on September 18, 2022Comments
-
Ilya Rusanen over 1 year
My question is in fact related to OS X, however I'm using Linux tools to resolve my problem.
I'm trying to delete all the partitions on my SSD drive and create new GUID (HFS+) partition table. Native Disk Utility is unable to eject disk to re-partition it. From the terminal, which is included in the OS X install, I've ran
diskutil
and here is the output:diskutil unmountDisk force /dev/disk0...12 also can't unmount disks.
I've started Ubuntu 12.10 from USB, tried to delete all partitions with GParted (except the recovery partition); it seems to be ok, but the disk is still unavailable for creating partitions with Apple Disk Utility. And certainly I can't create HFS+ partitions in GParted, cause I don't have
hfsprogs
installed, and there is no way to install 'cause I don't have Internet connection (Ubuntu can't work with Mac Book Retina wifi adapters).So, the main question is what are these 12 partitions and how to delete them and create one HFS+ partitions?
upad:
-
Marco about 11 yearsA simple way to delete the 12 partitions without additional tools is
dd if=/dev/zero of=/dev/<disk>
-
Ilya Rusanen about 11 years@Marco thanks, but I have 12 disks ( one of them is recovery). Should I dd all of them one by one?
-
Marco about 11 yearsI have no clue about MacOS. But from the screenshot the
/dev/diskN
entries look like disks, not partitions./dev/disk1s1
seems to be a partition. This might explain the reason you couldn't remove them. -
Ilya Rusanen about 11 years@Marco I've updated my post. used df command, it seems these partitions are some kind of mounting points of what?
-
derobert about 11 years@IlyaRusanen I'm not sure what those are, the last time I used Mac OS X it didn't have all those. But they're not partitions. I'd guess some sort of disk image... If you want to know how to destroy your data with Ubuntu, that's easy (the
dd
to /dev/disk0 or /dev/disk1 will surely do it)... Maybe Ask Different would be a better place for the Mac OS X-specific part of the question? -
derobert about 11 yearsIf I had to take a guess at what is going on, I'd guess Mac OS X is using disk images for encryption. Would make sense for the parts of the filesystem mounted like that.
-
Ilya Rusanen about 11 years@derobert I've switched into Linux, and it shows me exactly two drives (sda -my ssd, and sdb - USB disk with Ubuntu). I've created new JFS partition on sda before recovery partition, and Mac OS installer is able to reformat it to MacOs journaled. Now install is going on, so I'm crossing fingers...
-
FSMaxB about 11 yearsYou don't have to be sorry for not using linux as this forum is for Unix & Linux and Mac OS X is a UNIX system. Therefore those tools aren't Linux-Tools but UNIX tools.
-