Partitioning a Bad Disk: When to Repair, When to Replace

Quick Fixes for Partitioning a Bad Disk on Windows, macOS, and Linux

Partitioning a disk that shows signs of failure is risky but sometimes necessary for troubleshooting, temporary use, or data recovery. Below are concise, practical fixes for Windows, macOS, and Linux. Follow them in order: check health, back up important data, attempt soft repairs, then partition. If the disk shows physical failure (unusual noises, overheating), stop and replace the drive.

Safety first — preliminary steps

  1. Backup: Immediately copy any important data to another drive or cloud if possible.
  2. Health check: Use SMART reports to assess drive condition. If SMART shows reallocated sectors, pending sectors, or failed attributes, treat the disk as unreliable.
  3. Work on a copy where possible: If you must experiment, consider imaging the disk (dd, Clonezilla, or commercial tools) before altering partitions.

Windows — quick fixes

1. Run CHKDSK

  • Open an elevated Command Prompt and run:

    Code

    chkdsk X: /f /r

    Replace X with the drive letter. /f fixes errors; /r locates bad sectors and recovers readable info. Reboot if prompted.

2. Use Disk Management for simple repartition

  • Open Disk Management (diskmgmt.msc).
  • If the partition is online but corrupt, right-click the volume → Format (choose NTFS/exFAT) after confirming data is backed up.
  • For unallocated space, right-click → New Simple Volume and follow the wizard.

3. Use DiskPart for stubborn cases

  • Open elevated Command Prompt:

    Code

    diskpart list disk select disk N clean create partition primary format fs=ntfs quick assign letter=X exit

    Warning: clean removes all partition info.

4. Third-party tools

  • Tools like MiniTool Partition Wizard, EaseUS Partition Master, or GParted (bootable) can handle partition mapping and surface tests when Disk Management fails.

macOS — quick fixes

1. Run First Aid in Disk Utility

  • Open Disk Utility → View → Show All Devices → select the physical disk → First Aid → Run. Repeat for partitions. First Aid attempts to repair filesystem and partition map.

2. Use diskutil in Terminal

  • List disks:

    Code

    diskutil list
  • Repair:

    Code

    diskutil repairDisk /dev/diskN
  • Erase and repartition (destructive):

    Code

    diskutil eraseDisk JHFS+ NewName /dev/diskN

    or for APFS:

    Code

    diskutil eraseDisk APFS NewName /dev/diskN

3. Bootable recovery

  • If Disk Utility can’t repair, boot into Recovery Mode (Cmd+R) or use a bootable installer and repeat First Aid. For deeper issues consider creating a disk image before destructive steps.

Linux — quick fixes

1. Check disk health with SMART

  • Install smartmontools and run:

    Code

    sudo smartctl -a /dev/sdX sudo smartctl -t long /dev/sdX# run test, then recheck after completion

2. Repair filesystem

  • For ext filesystems:

    Code

    sudo umount /dev/sdXN sudo e2fsck -f -y /dev/sdXN
  • For NTFS:

    Code

    sudo ntfsfix /dev/sdXN

3. Repartition with fdisk, parted, or gdisk

  • Example with parted to create a GPT and new partition:

    Code

    sudo parted /dev/sdX –script mklabel gpt mkpart primary ext4 0% 100% sudo mkfs.ext4 /dev/sdX1
  • Use gdisk for recovery of GPT headers and partition table repairs.

4. Use GParted live

  • Boot GParted Live USB for a GUI-driven partitioning tool that can move/resize/create partitions and run surface checks.

If bad sectors persist

  • Consider running a full surface/sector-level test (manufacturers’ tools or mhdd/Victoria on Windows). If many bad sectors exist or SMART fails, replace the disk — repartitioning is only a temporary workaround.

Quick decision guide

  • Minor filesystem errors: Run CHKDSK / First Aid / e2fsck.
  • Corrupt partition table: Use DiskPart/diskutil/gdisk to recreate partition table (destructive) or use recovery tools to rebuild.
  • Physical/SMART failure: Image the disk, then replace it.

Final notes

  • Always prioritize data backup and imaging before partition changes.
  • Avoid reparative writes if you plan professional data recovery.
  • If unsure, stop and consult a data recovery specialist.

If you want a step-by-step for one specific OS and scenario (e.g., “disk has bad sectors but boots”), tell me which OS and I’ll give an exact command sequence.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *