Atari file system support for Linux ?

A forum about the Hatari ST/STE emulator - the current version is v2.0.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
coze
Captain Atari
Captain Atari
Posts: 187
Joined: Thu Oct 16, 2008 4:10 am
Location: Tokyo
Contact:

Atari file system support for Linux ?

Postby coze » Wed Feb 10, 2010 4:02 pm

Sorry this is not directly related to Hatari, but I thought Hatari folks are wise in the ways of linux, so I'll shoot this question here.

Is there a filesystem driver for linux for Atari partitions ? Can I mount my Atari formatted HDD in anyway ?
I've seen the dd solution, mount the image of the partition under Hatari, but I don't like it very much I don't want to mess with image files everytime I want to move something into my hdd.

Another question which is somewhat related, I know some people are running linux on their falcons. Do they have linux/ext2 only systems, or is it possible to use a AHDI formatted drive and put an ext2 partition somewhere in it ? If there's support for GEMDOS partitions under 68k linux, can it be ported to x86/64 ? :coffe:

User avatar
thothy
Hatari Developer
Hatari Developer
Posts: 414
Joined: Fri Jul 25, 2003 9:36 am
Location: Germany
Contact:

Re: Atari file system support for Linux ?

Postby thothy » Wed Feb 10, 2010 10:36 pm

As far as I know, the Linux kernel supports the Atari hard disk partition scheme. But it is maybe not compiled into the standard kernel from your Linux distribution. Look at the kernel config file (e.g. /boot/config-2.6.*) and check whether CONFIG_ATARI_PARTITION is enabled or not. If it is not enable - then you have to recompile a new kernel on your own...

User avatar
coze
Captain Atari
Captain Atari
Posts: 187
Joined: Thu Oct 16, 2008 4:10 am
Location: Tokyo
Contact:

Re: Atari file system support for Linux ?

Postby coze » Thu Feb 11, 2010 7:26 am

it seems it's set. (I take "y" as its enabled).

however mount asks me to specify the filesystem type, and I don't know which filesystem type I should throw at it :?:

User avatar
daeghnao
Captain Atari
Captain Atari
Posts: 479
Joined: Wed Oct 27, 2004 12:41 pm
Location: York, UK
Contact:

Re: Atari file system support for Linux ?

Postby daeghnao » Thu Feb 11, 2010 9:16 am

1: Depending on the driver you're using on the Atari system, the disk may still be byte-swapped compared to the PC. In this case, I don't think there's any Linux driver that will work with the disk.

2: If you can see the partitions OK, your mount command would probably look like:

Code: Select all

sudo mount /dev/sdc1 /mnt -t msdos -o check=s,uid=1000,gid=1000


The check=s is just for the sake of paranoia, really. There doesn't seem to be an option to tell the mount command that this is an Atari version of the FAT filesystem, so I'd probably use this on something with no valuable data on first.

User avatar
coze
Captain Atari
Captain Atari
Posts: 187
Joined: Thu Oct 16, 2008 4:10 am
Location: Tokyo
Contact:

Re: Atari file system support for Linux ?

Postby coze » Thu Feb 11, 2010 9:28 am

daeghnao wrote:1: Depending on the driver you're using on the Atari system, the disk may still be byte-swapped compared to the PC. In this case, I don't think there's any Linux driver that will work with the disk.


tata ... I think that's it. I can't see any partition with fdisk. but with atari-fdisk I can see it's there. is it possible to hack the linux driver so that it works with byte swapped partitions too ?

coze@coze-desktop:~$ sudo fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x0b0c2de6.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sde: 228 MB, 228518400 bytes
255 heads, 63 sectors/track, 27 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0b0c2de6

Device Boot Start End Blocks Id System

Command (m for help): q

coze@coze-desktop:~$ sudo cfdisk /dev/sde

coze@coze-desktop:~$ atari
atari800 atari800.curses atari800.x11 atari-fdisk
coze@coze-desktop:~$ sudo atari-fdisk /dev/sde
Checking that no-one is using this disk right now... OK

Command (m for help): p

Disk /dev/sde: 446325 * 512 bytes, 223162+ kBytes, 217+ MBytes
Device Boot Val Rootsec. Begin End Blocks Id System
/dev/sde1 * 0 2 446309 223154 BGM GEMDOS (>32 MB)

Command (m for help):

User avatar
daeghnao
Captain Atari
Captain Atari
Posts: 479
Joined: Wed Oct 27, 2004 12:41 pm
Location: York, UK
Contact:

Re: Atari file system support for Linux ?

Postby daeghnao » Fri Feb 12, 2010 9:49 am

coze wrote:
daeghnao wrote:1: Depending on the driver you're using on the Atari system, the disk may still be byte-swapped compared to the PC. In this case, I don't think there's any Linux driver that will work with the disk.


tata ... I think that's it. I can't see any partition with fdisk. but with atari-fdisk I can see it's there. is it possible to hack the linux driver so that it works with byte swapped partitions too ?


Possible, certainly. Exactly how and where to do it? Not sure, I've never done kenel hacking. My approach (if I had the time) would be to use the atari-fdisk information to extract a single partition image with dd, then byte-swap that with a script or something and double-check by loop-mounting it. Then get a kernel dev environment, a virtual machine and a full disk image to test with, and dig into the code. You'd need to add an option for byte-swapping in the mount options for msdos (or all fat filesystems, perhaps) and then support that with code that swaps the bytes as they're read or written. Most of the actual effort here won't be in coding the feature, it'll be testing it to make sure it's working.

While you're at it, could you hack in the enhanced loopback functionality? :)

Ato
Captain Atari
Captain Atari
Posts: 300
Joined: Tue Aug 10, 2010 3:27 am
Location: Duisburg, Germany

Re: Atari file system support for Linux ?

Postby Ato » Fri Oct 15, 2010 6:44 am

No hack necessary. In this case dd is really your friend. dd supports byte-swapping on the fly with the conv=swab option.

I thought I add this so that people can find this when searching.

SofiST
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Tue Apr 28, 2009 12:25 pm

Re: Atari file system support for Linux ?

Postby SofiST » Tue Feb 15, 2011 2:16 pm

Probably easier than recompiling Kernel:
http://atari.8bitchip.info/drimlus.php

User avatar
AtariSince1989
Atari Super Hero
Atari Super Hero
Posts: 778
Joined: Sun Jan 11, 2009 1:14 pm
Location: Edinburgh, Scotland
Contact:

Re: Atari file system support for Linux ?

Postby AtariSince1989 » Tue Feb 15, 2011 2:25 pm

Could this work? http://fdutils.linux.lu/index.html I know some people where using it to read Akai samplers' disks.
- Atari 520 STe 4MB RAM + TOS 2.06 + UltraSatan
- Atari Falcon030 14MB RAM + TOS 4.04 + IDE-SD card HDD + NVRAM mod + SCSI buffer clock mod + EtherNEC
- Amstrad CPC 6128 + HxC USB Floppy Emulator
- Acorn A3010 4MB RAM + 40MB IDE HDD

Atari ST Essential software (The List)
My FTP Server: http://www.datavase.info/FTPserver (only from Midnight to 8am UK Time)
My music at http://soundcloud.com/datavase/

Ato
Captain Atari
Captain Atari
Posts: 300
Joined: Tue Aug 10, 2010 3:27 am
Location: Duisburg, Germany

Re: Atari file system support for Linux ?

Postby Ato » Tue Feb 15, 2011 2:39 pm

SofiST wrote:Probably easier than recompiling Kernel:
http://atari.8bitchip.info/drimlus.php


Thanks for the link. I would love to try your application after my "having fun extracting Atari partitions with dd"-weekend (see below). But the source code does not configure anymore - and hence I could not try to compile it - since it uses the deprecated Qt 3. Any chance you could update your application to to Qt 4 or make use of the Qt 3 support libraries http://doc.trolltech.com/4.2/porting4.html from Qt 4?

dd does not need a kernel recompilation if you use the conv=swab option. You can extract partitions just fine with it if you have the information where the partitions start and what size in blocks they are. See here http://disktype.sourceforge.net/ for a great tool that prints out exactly that. I just extracted nine 1GB partitions with dd from my 16GB SD card on this weekend. Neither Linux system with Atari partition support that I have (one big endian, one little endian) would recognise the partition table of the SD card which may be due to the 1GB large partitions but I do not know yet for sure and am still investigating. Even atari-fdisk would not recognise the partition table so I was left on my own with dd.

Could this work? http://fdutils.linux.lu/index.html I know some people where using it to read Akai samplers' disks.


No. The FDutils don't work with HDD/partitions because it is only for floppy disk drives and their controllers.

Cheers,
T.

SofiST
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Tue Apr 28, 2009 12:25 pm

Re: Atari file system support for Linux ?

Postby SofiST » Wed Feb 16, 2011 11:36 am

I did Linux version of that program some 3 years ago. There was not much feedback. And I'm little out from Linux waters now - partially right because situations like this:
only 3 years old SW needs recompiling because of new library versions . Pretty annoying and far from some easy usage.

Anyway, I will try to do it with Qt4. But must say that it may be possible to have older Qt libraries together with newer ones. Don't remember exactly how it went, but I managed it couple times. For instance because old, great Sinclair Spectrum emulator for which source is not available.

DD is nice tool, but my SW does much more: there is file transfer function for instance. It is actually longest part of code.

Atari disk with 1GB partitions ? It must be Falcon made, since only Falcon supports 1GB large partitions. In any case I can help you with recognition. Just need that you send me image of that bootsector. Best if you can copy first 512 sectors (so some 256KB) of that SD card (SD, not CF ?) to image file and post me (zipped). Maybe there is just some minor stupid error, what confuses SW for recognising.

User avatar
krupkaj
Captain Atari
Captain Atari
Posts: 242
Joined: Wed Oct 22, 2003 11:00 pm
Location: Olomouc/Czech Republic
Contact:

Re: Atari file system support for Linux ?

Postby krupkaj » Wed Feb 16, 2011 4:01 pm

Ubuntu kernel has the Atari disk access compiled in. We tested it last week when need some files fom my friend's MEGA STE. I copied the file to SD card in UltraSatan and then I just mounted it and read the file on netbook with Ubuntu 10.04. The 1GB SD card was partitioned to four 512MB pieces by HDDriver.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4774
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Atari file system support for Linux ?

Postby simonsunnyboy » Wed Feb 16, 2011 5:13 pm

Interesting - it does not work for me here.

If I stick the SD card from my SatanDisk into the SD card reader, I get the following dmesg:

Code: Select all

[ 2246.267715] sd 8:0:0:1: [sdc] 1011200 512-byte logical blocks: (517 MB/493 MiB)
[ 2246.271377] sd 8:0:0:1: [sdc] Assuming drive cache: write through
[ 2246.275345] sd 8:0:0:1: [sdc] Assuming drive cache: write through
[ 2246.275352]  sdc: AHDI sdc3


I cannot mount the partition. Windows will see and use it. The card is formatted with HDDriver and the TOS/Windows compatibility option.

Code: Select all

$ uname -a
Linux jll 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 23:42:43 UTC 2011 x86_64 GNU/Linux
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

Ato
Captain Atari
Captain Atari
Posts: 300
Joined: Tue Aug 10, 2010 3:27 am
Location: Duisburg, Germany

Re: Atari file system support for Linux ?

Postby Ato » Thu Feb 17, 2011 5:58 am

SofiST wrote:I did Linux version of that program some 3 years ago. There was not much feedback.


Which really is a pity because when I found your software, my hopes were high. :)

SofiST wrote:But must say that it may be possible to have older Qt libraries together with newer ones. Don't remember exactly how it went, but I managed it couple times. For instance because old, great Sinclair Spectrum emulator for which source is not available.


Well, it is not that easy. Some Linux distributions only allow you to have Qt3 or Qt4 but not both at the same time.


SofiST wrote:DD is nice tool, but my SW does much more: there is file transfer function for instance. It is actually longest part of code.

I never doubted that but Linux systems have moved on and the software does not work anymore. Is the 0.8x source code the latest?

SofiST wrote:Atari disk with 1GB partitions ? It must be Falcon made, since only Falcon supports 1GB large partitions. In any case I can help you with recognition. Just need that you send me image of that bootsector. Best if you can copy first 512 sectors (so some 256KB) of that SD card (SD, not CF ?) to image file and post me (zipped). Maybe there is just some minor stupid error, what confuses SW for recognising.


Yes, Falcon made and I got like 16 of them, that is 16 1GB partitions, created with the latest HDDriver 8.31, and I created them obviously without HDDriver's TOS 1.04 compatibility flag set. I'll send you a PM where to download the first 1M of my SD-card (already byte-swapped). Thanks for the kind offer!

Cheers,
T.

User avatar
krupkaj
Captain Atari
Captain Atari
Posts: 242
Joined: Wed Oct 22, 2003 11:00 pm
Location: Olomouc/Czech Republic
Contact:

Re: Atari file system support for Linux ?

Postby krupkaj » Thu Feb 17, 2011 9:19 am

simonsunnyboy wrote:Interesting - it does not work for me here.

I cannot mount the partition. Windows will see and use it. The card is formatted with HDDriver and the TOS/Windows compatibility option.



Maybe, this is the problem. We did not use the compatibility with windows.

SofiST
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Tue Apr 28, 2009 12:25 pm

Re: Atari file system support for Linux ?

Postby SofiST » Thu Feb 17, 2011 12:26 pm

krupkaj wrote:Maybe, this is the problem. We did not use the compatibility with windows.


We ? Some Linux distros certainly 'use' 'compatibility with Windows'.
But all it is just bad formulation. Point is not in Windows, but in regular DOS partitioning scheme. And it is, together with FAT32 and even NTFS supported by practically all Linux distros.

SofiST
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Tue Apr 28, 2009 12:25 pm

Re: Atari file system support for Linux ?

Postby SofiST » Thu Feb 17, 2011 12:33 pm

Ato wrote:Yes, Falcon made and I got like 16 of them, that is 16 1GB partitions, created with the latest HDDriver 8.31, and I created them obviously without HDDriver's TOS 1.04 compatibility flag set. I'll send you a PM where to download the first 1M of my SD-card (already byte-swapped). Thanks for the kind offer! ....


I checked part file what you posted to me. It is OK, AHDI partitioned one. I can open it and see content of first partition with my Drive Imager.
The verdict: Hddriver made it well. There are no errors, at least not fatal ones. But SW for recognising/handling what you use has problems with it. Maybe is not ready for Falcon-only 1GB partitions ?

Ato
Captain Atari
Captain Atari
Posts: 300
Joined: Tue Aug 10, 2010 3:27 am
Location: Duisburg, Germany

Re: Atari file system support for Linux ?

Postby Ato » Thu Feb 17, 2011 2:45 pm

SofiST wrote:I checked part file what you posted to me. It is OK, AHDI partitioned one. I can open it and see content of first partition with my Drive Imager.
The verdict: Hddriver made it well. There are no errors, at least not fatal ones. But SW for recognising/handling what you use has problems with it. Maybe is not ready for Falcon-only 1GB partitions ?


I like the verdict. I suspected already the Linux Kernel Atari partition support and had a brief look at it but could not spot something obvious. As soon as I got time on a weekend, which will be in two weeks, I will look into it. First step would be to extract the relevant code and make a standalone version of it.

I just remembered one thing that could be of help: as mentioned I extracted some of the partitions already manually. The content looks OK but trying to mount it on Linux fails with the Kinux Kernel reporting this:

Code: Select all

Feb 13 16:24:56 delphinus kernel: FAT: bogus logical sector size 16384
Feb 13 16:24:56 delphinus kernel: VFS: Can't find a valid FAT filesystem on dev loop0.


Perhaps this helps with identifying the underlying issue. Thanks so far!

Cheers,
T.

SofiST
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Tue Apr 28, 2009 12:25 pm

Re: Atari file system support for Linux ?

Postby SofiST » Thu Feb 17, 2011 3:33 pm

It is obvious: Linux can not handle AHDI type 16KB (32 sector long) so called large sectors. I knew that there are some limits in Linux FAT16 filesys support. This is one of them.
DOS uses pretty much different way for large FAT16 partitions : multiple sector clusters, while logical sector size is always 512 bytes. People is usually aware about different Atari partition table, but bigger problem is right different FAT16 parametring by partitions over 32MB .

User avatar
LaurentS
Captain Atari
Captain Atari
Posts: 254
Joined: Mon Jan 05, 2009 5:41 pm

Re: Atari file system support for Linux ?

Postby LaurentS » Thu Feb 17, 2011 8:53 pm

Hi,

I would be really interested too by your tool.
I've got a compact flash, and I'd like to be able to read it under linux to transfer some demos to my Falcon.

Best regards,

Laurent

SofiST
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Tue Apr 28, 2009 12:25 pm

Re: Atari file system support for Linux ?

Postby SofiST » Fri Feb 18, 2011 11:50 am

LaurentS wrote:I would be really interested too by your tool.
I've got a compact flash, and I'd like to be able to read it under linux to transfer some demos to my Falcon...

Then DL it and try to run, compile ... Inform me about problems - not sparing with details.

SofiST
Atari Super Hero
Atari Super Hero
Posts: 591
Joined: Tue Apr 28, 2009 12:25 pm

Re: Atari file system support for Linux ?

Postby SofiST » Wed Mar 09, 2011 11:46 am

Considering Drimg for Linux and using it on some new distro:

I installed Mandriva 2010.2 (Spring) on my PC. Kdevelop is complete drawback - seems almost useless (in compare to older vers.).
I tried to run, to compile Drimg (0.86, from package as is on site, generated by Kdevelop3.x ). It asked for lot of libs, which are not present in running distro.
So, I copied some 12 libs from Mandriva 2008 to usr/lib . Program started after some complaining. It recognised drives, even file extraction worked well.
But only from drives. Opening image file is not possible becasue file selector just works not : one slash too much ... Very stoopid.
First I blamed Qt (and Nokia, who is now owner) for it. But after some days spent with experimentings, testings I can say that KDE is the real problem. There is too many thing changed. Running some SW relayed on older KDE, especially if it is done with Kdevelop3 is almost impossible. What is interesting is that I easily compiled Drimg for older Mandriva 2006, and it works flawless there.
I don't know what the Hell they thinking with all this 'improvements' in KDE. But I don't like when there is no backward compatibility. Inability to run 3-4 years old SW, + worse, inability to compile it for new KDE is really something what only Microsoft can welcome :mrgreen:

So, I'm looking to some time-proof solution: doing program with X-only dependancy (if it is possible at all). So, must redesign all GUI dialogs, changing a lot of code (where Qt and KDE dependant calls are present). It will take many time, I guess.

All in all, for some beginner developer new KDE and Kdevelop is not good choice. As easiest solution I see to stick still with older KDE 3.x and Kdevelop 3.

User avatar
LaurentS
Captain Atari
Captain Atari
Posts: 254
Joined: Mon Jan 05, 2009 5:41 pm

Re: Atari file system support for Linux ?

Postby LaurentS » Wed Apr 06, 2011 10:02 am

Hi,

I've managed to use the 4Go image with a CF card.

I'm running under linux ubuntu.

To manage it, you have to :

- use df command to determine which hard drive is the CF card (generally /dev/hd(n) or /dev/sd(n) n is a,b,c,d,...)
- umount it if it is already mounted
- use the following command to copy the image to the CF card :
dd if=image4Go.img of=/dev/hdn

nb: replace the image4Go.img by the file you need (regarding to the capacity of your CF card). It takes a long time to write the image (several minutes).

Then, if you use IDE, you have to write the little 8K image. The command is :
dd if=imageIDE.img of=/dev/hdn

nb: again, replace the imageIDE.img by the name of the little ide image disk.

You can then try to mount one partition to verify if it works well and copy files on it.

Then, install the CF card into your atari and enjoy...

Many thanks to you for the image disks.

Regards

Laurent

vinz6751
Atarian
Atarian
Posts: 1
Joined: Sat Nov 15, 2014 10:35 am

Re: Atari file system support for Linux ?

Postby vinz6751 » Sat Nov 22, 2014 3:06 pm

Hi

I want to report that a few years ago when I got my UltraSatan and followed the instruction to set it up, I then managed to mount my SD card into my PC running Mandriva linux. I could copy all the Automation games on it and then use them from the Atari. So it's possible. Now I'm on Ubuntu 14 and trying to do the same. I will post the result of my investigations here.
Kind regards

Vincent
Lonely Atarist from Alsace

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2759
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Atari file system support for Linux ?

Postby AtariZoll » Sun Nov 23, 2014 8:23 am

There is Atari partitioning support in Ubuntu Desktop 14.04 .
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 2 guests