I have a NTFS hard drive internally attached to my computer and it's causing problems with the other Windows installation on my dual (or triple?) boot machine.

I'm not sure if the partition scheme is GPT or MBR, but how can I create a backup of the partition table using dd and then wipe it from the drive so it isn't recognized by the other Windows as it starts up?


To backup DOS label (MBR) use this:

dd if=/dev/sdX of=mbr bs=512 count=1

To backup GPT label use this:

dummy=$(parted -ms /dev/sdX print | tail -1| cut -b1)
size=$((128 * dummy + 1024))
dd if=/dev/sdX of=gpt bs=1 count=$size

To wipeout the labels use this:

dd if=/dev/zero of=/dev/sdX bs=Y count=Z
partprobe /dev/sdX


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.