FAT32 drive on GPT (Miscellaneous)
> In my USB program, by default it only assigns drive letters to compatible
> (FAT-formatted) partitions. To identify what's in the partition, though,
> it can't use the GPT entry. It must look at the data in the first sector
> (volume boot record) of the partition to see what's actually there (if
> anything).
>
> This is different than MBR, where you can (at least theoretically) tell how
> a partition/volume is _supposed_ to be formatted (even if it hasn't yet
> been formatted) by the partition type value in the MBR.
Exactly, the supposed file system type is encoded by the type number of the partition table entry. For NTFS partitions, it is a different number than for the FAT types (there are several). But even here, Microsoft started assigning several file system types to one type number, namely HPFS / NTFS / ExFAT, which all have partition type 7. Luckily, that is not of interest to DOS, as long as no one comes along and wants to implement ExFAT
The actual FAT type "is determined solely by the count of clusters on the volume", and not by the partition type id, according to the Microsoft FAT specification [1], page 14.
> It seems like it might also be possible to create a FORMAT program that
> doesn't require a drive letter as input.
Yes, this proof has been provided several times
For example, RANISH partition manager [2] is capable of it, but it is MBR only. I do not know any partition manager that a) supports GPT, b) runs under DOS and c) can format partitions.
> Maybe that's the better approach, but it seems like it would also
> be possible to create a "smarter" FORMAT program that could make up for
> some of the shortcomings in FDISK?
I think a "better" approach would be to store some FreeDOS specific hidden flag for the partitions the user does not want to see. Then everything else could stay as it is.
But it will be difficult, if not impossible, to store this information in the GPT itself without breaking compatibility. So some other location has to be found that a) does not break things and b) is accessible early in the boot phase while the Kernel enumerates the drives.
Bernd
[1] https://academy.cba.mit.edu/classes/networking_communications/SD/FAT.pdf
[2] https://codeberg.org/boeckmann/ranish/releases
Complete thread:
- FAT32 drive on GPT - CandyMan, 30.08.2023, 18:15 (Miscellaneous)
- FAT32 drive on GPT - RayeR, 30.08.2023, 20:21
- FAT32 drive on GPT - bretjohn, 31.08.2023, 01:27
- FAT32 drive on GPT - tom, 31.08.2023, 10:31
- FAT32 drive on GPT - boeckmann, 31.08.2023, 14:52
- FAT32 drive on GPT - tom, 01.09.2023, 17:32
- FAT32 drive on GPT - CandyMan, 31.08.2023, 18:27
- FAT32 drive on GPT - tom, 01.09.2023, 17:24
- FAT32 drive on GPT - CandyMan, 01.09.2023, 19:11
- FAT32 drive on GPT - boeckmann, 01.09.2023, 19:29
- FAT32 drive on GPT - tom, 01.09.2023, 22:52
- FAT32 drive on GPT - CandyMan, 02.09.2023, 00:14
- FAT32 drive on GPT - bretjohn, 02.09.2023, 03:39
- FAT32 drive on GPT - boeckmann, 02.09.2023, 12:54
- FAT32 drive on GPT - ecm, 02.09.2023, 14:07
- FAT32 drive on GPT - boeckmann, 02.09.2023, 15:17
- FAT32 drive on GPT - ecm, 02.09.2023, 14:07
- FAT32 drive on GPT - tom, 02.09.2023, 21:51
- FAT32 drive on GPT - boeckmann, 02.09.2023, 12:54
- FAT32 drive on GPT - RayeR, 02.09.2023, 21:14
- FAT32 drive on GPT - tom, 01.09.2023, 22:52
- FAT32 drive on GPT - 0ffer, 02.01.2024, 20:05
- FAT32 drive on GPT - ecm, 03.02.2024, 19:08
- FAT32 drive on GPT - boeckmann, 01.09.2023, 19:29
- FAT32 drive on GPT - CandyMan, 01.09.2023, 19:11
- FAT32 drive on GPT - tom, 01.09.2023, 17:24
- FAT32 drive on GPT - RayeR, 02.09.2023, 21:19
- FAT32 drive on GPT - boeckmann, 31.08.2023, 14:52
- FAT32 drive on GPT - mceric, 30.08.2023, 22:54
- FAT32 drive on GPT - RayeR, 30.08.2023, 20:21