UltraSatanSDCardwithLinux

From AtariForumWiki
Revision as of 17:42, 8 April 2015 by >Marcello
Jump to navigation Jump to search

Reading Data from your UltraSatan SD Card on Linux

If you've followed the tutorial from http://joo.kie.sk/?page_id=306, you can use it straight ahead on Linux ! Note that according to http://hddriver.seimet.de/en/faq.html, Why can big TOS partitions not be mounted under Linux? you shouldn't create partitions bigger than 256MB if you want to mount them easily on Linux.

Making sure the card is detected

After inserting the card, execute the command 'dmesg' and you should see something like this:

[14098.069218] mmc0: new high speed SDHC card at address d555
[14098.069743] mmcblk0: mmc0:d555 SU04G 3.79 GiB 
[14098.072876]  mmcblk0: AHDI p1 p2 p3 p4

This means we have a SD card identified as mmcblk0, on which we have a partition table of Format AHDI with 4 partitions. Yes the Linux kernel has support for the Atari Partition Table format, a relic of the Linux/68k port of the 90's. You can check that the support is activated on you kernel with

grep ATARI_PARTITION /boot/config-$(uname -r)

Verifying the partitions

Install the programm 'disktype' from your package repository and have a look at each partition

sudo disktype /dev/mmcblk0p1 
Block device, size 242.2 MiB (253999616 bytes)
FAT16 file system (hints score 3 of 5, ATARI ST bootable)
Unusual sector size 4096 bytes
Volume size 242.1 MiB (253853696 bytes, 30988 clusters of 8 KiB)
sudo disktype /dev/mmcblk0p3
Block device, size 29.56 MiB (30999552 bytes)
FAT16 file system (hints score 3 of 5)
 Volume size 29.44 MiB (30869504 bytes, 30146 clusters of 1 KiB)

So here we have two partitions of type FAT16, one has a size of 242MB, the other one 28.44MB

Note that the unusual sector size' is perfectly fine and normal for an Atari.

Mounting the partitions

Altough the sd card does no autoimount when inserting, manually mounting works fine, you just issue:

sudo mount /dev/mmcblk0p1 /mnt

and the data is accessible under /mnt

Other Unixes

Since NetBSD also have AHDI support, this should also work, provided you have options DISKLABEL_AHDI in your kernel conf.