7

I used gparted 0.24.0 parted 3.2 (on Arch Linux) to resize & move a FAT32 partition.

After rebooted to Windows 10, the partition was detected as RAW. chkdsk refuse to check the partition, multiple reboots has no effect.

On Arch Linux on the same machine though, the partition can be mounted and used just fine with no warnings.

Here's what fsck told me.

$ sudo fsck.vfat -fv /dev/sdb3
fsck.fat 3.0.28 (2015-05-16)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
     32768 bytes per cluster
       100 reserved sectors
First FAT starts at byte 51200 (sector 100)
         2 FATs, 32 bit entries
  51361792 bytes per FAT (= 100316 sectors)
Root directory start at cluster 3219 (arbitrary size)
Data area starts at byte 102774784 (sector 200732)
  12838879 data clusters (420704387072 bytes)
63 sectors/track, 255 heads
1131634688 hidden sectors
 821889024 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdb3: 38517 files, 3787046/12838879 clusters

I tried using gparted to check the filesystem, but it has no effect.

Is there any way I could make Windows detect it correctly? Moving data and formatting seems to be out of question, as I don't have another disk to backup the data inside.

willwill
  • 265
  • Is this file system the only one on that device? Make sure that you are using a hard disk, because Windows refuses to detect additional partitions on removable devices (USB sticks, SD cards). – GiantTree Feb 01 '16 at 15:47
  • No, the drive has a linux swap and a NTFS partition on it, both are working fine as well. The drive is an internal hard drive. – willwill Feb 01 '16 at 15:52
  • 1
    I tried running testdisk, it says Can't get cluster size when attempting boot sector recovery. Both boot sector are indicated "Bad" – willwill Feb 01 '16 at 15:52
  • Hrm, if Testdisk fails then your last resort is to grab the data in Linux and wipe the drive completely. Does Testdisk at least display the broken partitions and/or file contents as I added below? – Mekki MacAulay Feb 01 '16 at 18:16
  • testdisk's undelete command show every files just fine. Hmm... I guess I might have to tar everything rebuild the partition – willwill Feb 01 '16 at 18:38
  • I have just experienced the exact same problem but I used fatresize to reduce a FAT partition on a USB stick. I am also using Arch Linux and it was a Windows 10 machine that failed to read the resized partition. In my case it was quicker and easier to reformat it with mkfs.vfat. This question might see more interest on the Unix and Linux StackExchange site. – starfry Oct 10 '16 at 15:23
  • In my case it was fixed by rebuilding the BS. For some reason Linux was able to mount it even without a correct boot sector, but TestDisk was able to rebuild/fix it. (I did not have the option to reformat) – Paul Stelian Dec 06 '16 at 17:07

1 Answers1

2

Gparted & Windows handle partition data differently. What passes in Linux as valid sometimes doesn't in Windows. It's frustrating. You should be able to modify the RAW partition using TestDisk such that Windows once again sees it as FAT32. Extra details are provided step-by-step here.

Relevant excerpts:

  • Select the disk type (Intel or EFI GPT depending on size)
  • Select Analyze
  • Select Quick search
  • Answer questions for how original partition was created
  • After Quick search completes, look at the reported partitions found and list the files inside each by pressing p
  • If your files are not shown as expected, repeat above with deep search
  • Select q and then write to repair the partition. Confirm dialogues as necessary
  • Reboot.

But, first, since you still have access to the data via Linux, consider backing up your sensitive data before repairing the partition file just in case something goes wrong.