Is there a way to perform the equivalent of (Windows') diskpart clean
via MacOS X? I have to completely bomb some drives so that they can be formatted correctly in a buffalo Linkstation that I have. However it's posing an issue as it's very picky about what's on the drives before it formats (something I was unaware of when I bought it).
Performing diskutil eraseDisk
is good and all, but it forces me to also select a filesystem and volume name. diskpart clean
on Windows doesn't do this, and produces a "clean" disk (with no volumes at all), which is what I want.
An easy-to-use, albeit slightly dangerous, method would be to simply overwrite the partition table:
dd if=/dev/zero of=/dev/diskX bs=1m count=2
... where diskX
is the disk you want to nuke. Be careful because this command won’t ask.
This writes zeroes to the first 2 MiB, which should be sufficient to remove any and all partitioning schemes and whatnot.
Update: It might also be necessary to nuke the backup GPT table at the end of the disk:
dd if=/dev/zero of=/dev/diskX bs=1m seek=1907727
... with 1907727
being a value for a standard 2 TB consumer drive of I own, which has a total size of 2,000,398,934,016 bytes. I selected 2000398934016 / (1024 * 1024) - 2
, discarding any decimal places.
Both count
and seek
in the command lines above are multiples of the block size bs
specified on the same command line.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다