I have a HDD that which has GPT that was created for a BIOS motherboard (not UEFI!) This drive used to house my Debian installation. Since I bought an SSD and a new UEFI motherboard, now I would like to use this HDD as only storage (no boot from it)

I will delete my root, /home and swap partitions. But the remaining partitions on it that has data that I would like to keep. So I can't just create a new GPT and lose all my data.

How can I remove GRUB without nuking the entire disk?

PS: here is how the HDD looks currently:

$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdc: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2758BB06-C7E7-451B-9C92-F1B278721BB6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3437 sectors (1.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  
   2            6144         8394751   4.0 GiB     8200  
   3         8394752        76754943   32.6 GiB    8300
   4        76754944       174409727   46.6 GiB    0700  
   5       174409728      1346283519   558.8 GiB   0700  
   6      1346283520      1953523711   289.6 GiB   0700  

and what partition is what:

$ sudo lsblk -f
├─sdc2 swap                   [SWAP]
├─sdc3 ext4                   /
├─sdc4 ext4                   /home
├─sdc5 ext4   store1          
└─sdc6 ntfs   store2           

PPS: Would this command delete GRUB on my HDD?:

:~# dd if=/dev/zero of=/dev/sda bs=446 count=1

(found this from another topic)

  • Also, will it delete or alter the partition table?
    – Sandburg
    Commented Mar 2, 2023 at 21:42

1 Answer 1


The dd command will delete GRUB from the Master Boot Record. The MBR only contains boot.img or "Stage 1" of GRUB. Stage 1.5 resides on the BIOS Boot Partition, which in your case is the 2.0 MiB partition with code EF02. (On a non-GPT disk, Stage 1.5 is stored in the gap between the MBR and the first partition, but with GPT there is no such gap.) You can delete this partition -- or just leave it there, it does no harm.

You must log in to answer this question.

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