dressupgeekout Posted February 29 Share Posted February 29 TL;DR I can transfer files to and from my UltraSatan's SD card even though the disk is NOT formatted with an ordinary MBR. Hey gang! So, I'm a NetBSD developer. The other day, I was able to extend NetBSD's dk(4) driver to be able to recognize the old, plain TOS hard disk partition map. This allows me to mount the SD card from my UltraSatan, which was formatted with the ICD Pro driver, on a modern PC. I made a video that explains it all, and you'll get to see a quick demo, too! The code is not committed to NetBSD just yet (pending some code review). If I stare at the code really hard then I *might* be able to get it working in Linux as well. 5 3 Quote Link to comment Share on other sites More sharing options...
Chri O. Posted February 29 Share Posted February 29 (edited) Sounds pretty cool I am however happy with my homemade hard drive solution with Media Transfer Protocol. Yet another HD ACSI implementation with Media Transfer Protocol (WIP-Work in progress) ): Edited February 29 by Chri O. Quote Link to comment Share on other sites More sharing options...
theboyfromanotherplanet Posted February 29 Share Posted February 29 This is pretty cool. A LOT of people have missed TOS support in Linux 1 Quote Link to comment Share on other sites More sharing options...
mikro Posted March 1 Share Posted March 1 Nice! Btw Linux did contain similar code but it is (AFAIK) either disabled or not longer working in recent kernels. So if you could improve that as well, that would be awesome! 1 Quote Link to comment Share on other sites More sharing options...
theboyfromanotherplanet Posted March 1 Share Posted March 1 8 hours ago, mikro said: Nice! Btw Linux did contain similar code but it is (AFAIK) either disabled or not longer working in recent kernels. So if you could improve that as well, that would be awesome! AFAIK, it was removed as the filesystems used by AWS/Cloud distros were being misidentified as TOS. Something like that :-) Quote Link to comment Share on other sites More sharing options...
dressupgeekout Posted March 1 Author Share Posted March 1 (edited) So I actually just went ahead and plugged the SD card into my Linux laptop (Debian/x86_64 "bullseye") and the 2 partitions showed up as /dev/mmcblk0p1 and /dev/mmcblk0p2, it Just Worked. That's Linux 5.10, though. Linux 6.8 is A Thing now so maybe something's happened in the meantime that broke support for it. I'd need to dig through the Git history. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/block/partitions/atari.c https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/block/partitions/atari.h/ I have a theory. There unfortunately aren't any unique magic numbers to be found inside the TOS partition scheme, AFAICT. This means when the kernel is trying to determine "does this block device represent a TOS-formatted hard disk?" you can't give a definitive y/n answer, you kinda have to guess. My NetBSD code does this, even. If TOS support is removed like you've mentioned, then my hunch is that the current code is prone to mis-identifying some non-Atari devices to be inappropriately identified as Atari, and the simplest fix is to just never consider TOS partitions altogether. Edited March 1 by dressupgeekout Quote Link to comment Share on other sites More sharing options...
dressupgeekout Posted April 2 Author Share Posted April 2 Just wanted to mention that this finally landed in the NetBSD source tree. It works as long as the partition type is GEM or BGM. "Extended" partitions (type "XGM") are not currently supported just yet, I'll try to add that later. https://mail-index.netbsd.org/source-changes/2024/04/02/msg150650.html 1 Quote Link to comment Share on other sites More sharing options...
Zap! Posted April 4 Share Posted April 4 My Ultrasatan's SD cards work fine in my PC, but I'm using PP's HD driver. Well worth the money (under $15 if I remember right). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.