1 (edited by ginahoy 2021-11-25 21:09:51)

Topic: resized FAT32 partition no longer visible to WinXP

I'm in the process of recovering an older WinXP machine that runs software I rely on for my business. I moved the drive to my Linux machine and used gparted to shrink a FAT32 logical partition from 432GB to 394GB to make room for a new 38GB NTFS partition to store a large backup image file. The below-copied table shows the drive after I made these changes (#5 is the resized partition):

david@linux-desktop ~ $ sudo parted -l
[sudo] password for david: 
Model: ATA WDC WD5003ABYX-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  68.2GB  68.2GB  primary   fat32        boot, lba
 2      68.2GB  500GB   432GB   extended               lba
 5      68.2GB  462GB   394GB   logical   fat32
 6      462GB   500GB   37.7GB  logical   ntfs

After reinstalling the drive in the XP machine, I successfully restored XP on the primary partition. However, XP reports the shrunk FAT32 partition as unformatted!

Oddly, when I check the drive with Easus Partition Master (running on XP machine), it has no problem reporting partition details including correct used and unused capacities. Also, if I move the drive back to my Linux box, I can access all the files. That gives me hope that the partition table can be repaired so that XP can read it, assuming that's the problem. I would be grateful for any assistance.

BTW, there's a reason why I don't simply install the drive on the Linux box and copy the partition contents to another location, then reformat the partition and copy back... it mostly contains large (4GB) Acronis True Image backup image files going back many years. (Believe it or not, on rare occasions I've had reason to mount an ancient backup to retrieve a lost file.) and I've had problems restoring or mounting backup images that have been copied between storage media.

2

Re: resized FAT32 partition no longer visible to WinXP

Did you keep the original partition alignment option?
Older partitioning used to be "cylinder" aligned. Since a number of years GParted defaults to the MiB alignment, that is compatible with the newer hard drive and SSD technology.

I would suggest "testdisk" to analyse and try to fix the partition table. it is included in the GParted Live CD (or USB), as well as in its own live cd (cgsecurity.org).
Neverteless, a bad alignment can cause non-optimal performance of the drive but not inability to read the file system.
Another comment: it isn't the best idea to keep the backup copies on the running drive. It is safer to keep them on separate drives or other media (eg tapes).

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: resized FAT32 partition no longer visible to WinXP

Thanks for reply. It's helpful to know the cause.

class413 wrote:

Did you keep the original partition alignment option?

No, I left the default, MiB, because I didn't know any better. I'll check out the testdisk utility when I get a minute.

BTW, that HDD originally wasn't the boot drive. I bought it to store local backup images of my XP machine. When the primary drive failed, I resized the backup partition to make room to install my XP partition. The backup images on that drive are so old (> 6 years), it's highly unlikely I will ever need to mount any of them again. Since I can still access the files by temporarily moving the drive to my linux box, and since that drive now serves as the XP machine's boot drive, I'm inclined to leave 'well enough' alone rather than take a chance on screwing it up :-)

4

Re: resized FAT32 partition no longer visible to WinXP

I ran the testdisk utility. As I said, I unknowingly left the alignment set to the default (MiB) when I resized and split the extended partition. I don't understand much of what's in the log but it would appear to confirm that caused the problem. Although I have backups of what I need on that disk, I would appreciate your guidance in repairing the partition table. Here's the testdisk log along with a couple of screenshots: https://optimalbuilding.com/files/WD_50 … stdisk.zip

5

Re: resized FAT32 partition no longer visible to WinXP

However, if you didn't make any operation on the system partition /dev/sdb1,  there is no reason to have its alignment modified. From the parted output it seems that the first partition starts at the cylinder boundary (63 sectors after the disk space start).
If the files are well in place, you can fix the bootloader from the windows xp install cd. It can check the hard drive, detect the windows installation(s) on it and perform the bootloader fix or a o.s. fix by copying again files to the system folders. I'm not sure what happens with additional software already installed.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

6

Re: resized FAT32 partition no longer visible to WinXP

Unfortunately, I can't do an XP repair install. I tried that several years ago when troubleshooting an OS issue and it was a hairy mess. I ended up having to restore the system partition from an image backup.

In any case, there's no problem with the alignment of the system partition. The XP machine boots normally. The issue is only with reading sdb5. Based on your previous comment, my assumption was that the issue is with sdb5 alignment, which would have been caused when I reduced its size to make room for the new partition (sdb6) and failed to select cylinder alignment. Did the testdisk log and screenshots not provide clues?

If interpreting testdisk results is beyond the scope of this forum, I can post this in the cgsecurity forum.