[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev and friends not able to mount Atari GEMDOS partition



Le 14/09/2020 à 01:46, Michael Schmitz a écrit :
> Hi Emmanuel,
> 
> On 9/09/20 7:25 PM, Emmanuel Kasper wrote:
>>
>>> That almost sounds like libblkid isn't recognizing the FS. Can you try
>>> running blkid on the device? If it can't detect the FS type, that might
>>> be a place where there is an issue. The libblkid code is not based on
>>> the drivers in the kernel, but is still essential for a portion of the
>>> auto-detection of file systems in user-space.
>>
>> Hi Brad
>> Indeed blkid does not recognize the FS type, thanks for the hint !
>>
>> sudo blkid -p /dev/mmcblk0p1
>> /dev/mmcblk0p1: PART_ENTRY_SCHEME="atari" PART_ENTRY_TYPE="BGM"
>> PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2" PART_ENTRY_SIZE="131072"
>> PART_ENTRY_DISK="179:256"
>>
>> I suppose this is because the Atari GEMDOS FAT16 partitions have a
>> variable sector size wich is larger that 512 bytes for partitions >
>> 16MB, whereas MSDOS FAT16 always uses a 512 bytes sectorsize .
> This variable sector size may be what causes the trouble here - see the
> commit log of the commit at the head of Geert's m68k-queue.
>>
>> The disktype tool, provided in the archive, gave me the hint about the
>> sector size difference:
>> http://disktype.sourceforge.net/doc/ch03s03.html
>> and this technical guide, which has all the FAT subtilities explained:
>> http://info-coach.fr/atari/documents/_mydoc/Atari_HD_File_Sytem_Reference_Guide.pdf
>>
>>
>>
>> sudo disktype /dev/mmcblk0p1
>> --- /dev/mmcblk0p1
>> Block device, size 64 MiB (67108864 bytes)
>> FAT16 file system (hints score 3 of 5, ATARI ST bootable)
>>    Unusual sector size 4096 bytes
>>    Volume size 63.95 MiB (67051520 bytes, 8185 clusters of 8 KiB)
> 
> According to my recollection, the FAT logical sector size is limited to
> 4k by the physical page size (m68k MMU limitation), resulting in a
> partition size limit of 256 MB (>128 MB must use 4k logical sectors).
> Your partition shows this sector size already below that limit, which is
> odd. 8k cluster size with 2 logical sectors of 4k per cluster does
> correspond to a TOS partition, though.
> 
> Have you tried to manually mount the partition?

Hi Michael
Thanks for the hint about the logical sector size ! I always wondered
where this 4k logical sector limit came from on the Linux side.

Mounting the partitions with /sbin/mount works well without specifying
the FS type, so there is no problem here.
However the missing support in libblkid prevents me from using udisks2 /
udisksctl to mount the partition as non-root user AFAIK.
I wrote to the util-linux mailing as suggested by Adrian as it is the
home of libblkid:
https://www.spinics.net/lists/util-linux-ng/msg16472.html

I have seen they added no sot long ago AHDI partition support, so I have
hope they have interest for GEMDOS FAT16 detection too.

Emmanuel


Reply to: