Jump to content
IGNORED

NetBSD gains support for the Atari partition scheme


Recommended Posts

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.

 

 

  • Like 5
  • Thanks 3
Link to comment
Share on other sites

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!

  • Like 1
Link to comment
Share on other sites

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 :-)

Link to comment
Share on other sites

Posted (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 by dressupgeekout
Link to comment
Share on other sites

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...