UltraSatanSDCardwithLinux

From AtariForumWiki
Jump to: navigation, search

Reading Data from your UltraSatan SD Card on Linux

Just follow the tutorial from tutorial from http://joo.kie.sk/?page_id=306 for partitioning on the Atari side. NB: 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.

Check that your Kernel has Atari Partition Table Support

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

Kernel support for the Atari Partition Table format is a relic of the Linux/68k port of the 90's. It's activated by default on Debian and Ubuntu.

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.

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

Formatting a partition

mkfs.vfat -h0 -S 4096 -A /dev/mmcblk0p1

Other Unixes

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