26

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

Hey, uh, is this the right place to talk about this problem?

"XP does not accept a shrunk FAT32 partition" is an issue that has affected me & that I have tested for several recent "stable" gparted-live images, still not working right with gparted-live-0.22.0-2-i586.iso

27

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

In post #19 of this topic the problem was thought to be introduced somewhere between the libparted 3.1 and 3.2 releases.

Would you be able to raise this issue on the bug-parted@gnu.org mailing list and work with them to resolve the issue?

28 (edited by crawlspace 2015-07-21 01:42:19)

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

gedakc wrote:

Would you be able to raise this issue on the bug-parted@gnu.org mailing list and work with them to resolve the issue?

Sounds good, thanks.

For future reference, if anybody else ends up here with the same problem:

The mailing list is at https://lists.gnu.org/mailman/listinfo/bug-parted

The "XP not accepting a shrunk FAT32 partition" issue is present for

  • gparted-live-0.22.0-2-i586.iso

  • gparted-live-0.20.0-2-i486.iso

  • gparted-live-0.19.1-4-i486.iso

For versions immediately before that,

  • gparted-live-0.19.1-1-i486.iso

  • gparted-live-0.18.0-2-i486.iso

there are different issues that cause gparted to crash without resizing.

The most recent version for which resizing FAT32 partitions seems to work and not cause problems is gparted-live-0.18.0-1-i486.iso

29

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

Thank you crawlspace for providing additional details about specific versions of GParted Live.

If/when you send a report to the parted mailing list, please provide a link in this thread so that others can follow along.

30

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

A patch to fix recognition of FAT file system after resizing with parted-3.2 libraries has been submitted to the upstream parted project.

See the first reference link for where this problem is being tracked upstream in the parted project.

REFERENCES
----------

GNU bug report logs - #22266
[libparted] jump instruction and boot code is corrupted with random
bytes after fat is resized
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22266

GNU bug report logs - #22710
libparted 3.2 fat32 bootsector incompatible w. windows
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22710

GParted Bug Report:
Bug 759916 - fat(32) resizing generates boot sector(s) with invalid
             jump instruction and pseudo-random boot code
https://bugzilla.gnome.org/show_bug.cgi?id=759916

GParted Forum:
Vista/XP don't accept a shrinked Fat32 partition (USB-stick)
http://gparted-forum.surf4.info/viewtopic.php?id=17318

31

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

Just had the same problem, has spent about 1.5 days long to find the problem and fix it. GRUB and Linux worked fine with the resized partition. Any Linux utility said the partition is ALL RIGHT. But DOS and Windows did NOT work with it at all, CHKDSK said it was RAW and could not be corrected.
Only Linux testdisk said the bootsector is BAD , so I looked the FS parameters in DiskEditor (program from Active@)  - and entered that values in the "rebuild BS" dialogue in testdisk . I don't need the bootcode, but I need that OSes  from m$ recognize the partition.

Will it be useful if I post the differences of BootSector_s somewhere? I have 2 dumps of 16400 bytes each, they contain disk start structures (boot sectors).

32

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

Hi kdeboroda,

The GParted bug report listed in comment 30 already has a link to a diff file comparison of the initial sectors.

I think for Windows to recognize FAT32, it needs the initial bytes (at least 3 bytes "eb 58 90") set as follows:

$ sudo hexdump -n 7k -C /dev/sda1
00000000  eb 58 90 4d 53 57 49                              |.X.MSWI|
00000007

A patch for this issue has been committed to the (lib)parted project.  However because it might be a while before the next official (lib)parted release, we will manually patch (lib)parted in our next GParted Live release (scheduled for Apr. 26, 2016).

33

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

Hey,

I have the same issue so I checked and re-resized the partition with the new Live 0.26.0-1 version, but I still get format dialog in Windows (and Mac doesn't even recognize it).

Do I have to reformat? (Would really prefer not to).

Thanks.

34

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

The patched version of lipbarted included in GParted Live 0.26.0-1 will preserve the boot code and jump code.  That is it will maintain the code already there.

If the filesystem was not recognized before using 0.26.0-1, and you do not wish to reformat, then you might try hex editing the first three bytes of the partition to set these to "eb 58 90" as shown above in post #32.

If that doesn't work, then it might be easiest to backup your data, reformat the partition, and then restore your data and update /etc/fstab as appropriate to adjust for the new UUID.

35

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

gedakc wrote:

The patched version of lipbarted included in GParted Live 0.26.0-1 will preserve the boot code and jump code.  That is it will maintain the code already there.

If the filesystem was not recognized before using 0.26.0-1, and you do not wish to reformat, then you might try hex editing the first three bytes of the partition to set these to "eb 58 90" as shown above in post #32.

If that doesn't work, then it might be easiest to backup your data, reformat the partition, and then restore your data and update /etc/fstab as appropriate to adjust for the new UUID.

Solved! Edited the three first bytes and now it works properly.
Thanks.

36

Re: Vista/XP dont accept a shrinked Fat32 partition (USB-stick)

Thanks juancruzmacio for reporting back that the proposed change to the first 3 bytes of the FAT32 partition fixed the Windows recognition issue.