English Amiga Board


Go Back   English Amiga Board > Support > support.Other

 
 
Thread Tools
Old 20 September 2021, 18:55   #1
Polom
Registered User
 
Join Date: Sep 2021
Location: France
Posts: 9
Mounting AmigaOS 3.1 FFS partitions on Linux

Hi everybody!

I'm not too sure about the right place for my question, therefore it put it here

I just formatted 4Gb CF on my Amiga 500 (Wicher 500i's IDE controller) and installed AmigaOS 3.1. It works fine.

Now I want to mount these partitions on my Linux system (Manjaro, if it matters).

I tried all that came to mind, then I searched for tutorials but so far, nothing works

Here are some information and tests:

>sudo fdisk -l

Disk /dev/sdb: 3,92 GiB, 4204118016 bytes, 8211168 sectors
Disk model: USB CARD READER
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

> sudo parted /dev/sdb

(parted) p


Model: FNK TECH USB CARD READER (scsi)
Disk /dev/sdb: 4204118016B
Sector size (logical/physical): 512B/512B
Partition Table: amiga
Disk Flags:

Number Start End Size File system Name Flags
1 1032192B 68640767B 67608576B DH0 boot
2 68640768B 4204118015B 4135477248B DH1

(nothing in the File System column)



> mkdir amiga

> sudo mount -t affs -o offset=1032192 /dev/sdb /amiga


mount: /amiga: wrong fs type, bad option, bad superblock on /dev/loop40, missing codepage or helper program, or other error.


Sure, that's helpful, thanks!


> sudo dmesg


[60152.099618] affs: No valid root block on device loop40


I also tried the various steps described in this post, without success =>

https://gareth.halfacree.co.uk/2013/...es-under-linux

At this stage, some help would be very welcome!

Thanks!
Polom is offline  
Old 20 September 2021, 19:11   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
You need to specify the size as well as the offset. Try -o offset=1032192,sizelimit=67608576.
thomas is offline  
Old 20 September 2021, 19:23   #3
Polom
Registered User
 
Join Date: Sep 2021
Location: France
Posts: 9
Quote:
Originally Posted by thomas View Post
You need to specify the size as well as the offset. Try -o offset=1032192,sizelimit=67608576.

Thank. It's better since there's no error message, however no partition appears to be mounted


>ls -la /dev/sd*
brw-rw---- 1 root disk 8, 0 20 sept. 19:15 /dev/sda
brw-rw---- 1 root disk 8, 2 20 sept. 19:15 /dev/sda2
brw-rw---- 1 root disk 8, 5 20 sept. 19:15 /dev/sda5
brw-rw---- 1 root disk 8, 6 20 sept. 19:15 /dev/sda6
brw-rw---- 1 root disk 8, 16 20 sept. 19:15 /dev/sdb
Polom is offline  
Old 20 September 2021, 19:29   #4
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
You are not mounting a Linux partition, you mount a loop device on a file / block device.

Try ls -l /amiga
thomas is offline  
Old 20 September 2021, 19:36   #5
Polom
Registered User
 
Join Date: Sep 2021
Location: France
Posts: 9
Quote:
Originally Posted by thomas View Post
You are not mounting a Linux partition, you mount a loop device on a file / block device.

Try ls -l /amiga

I'll have to read more about mount and loop devices. it works!


Now I have a read only access, is there anything to do about it? I read somewhere it was a limitation of this FFS implementation on Linux but it's better to ask



Ultimately my goal is to move stuff from/to this partition. I still need a "to".


Thanks!
Polom is offline  
Old 21 September 2021, 23:27   #6
Polom
Registered User
 
Join Date: Sep 2021
Location: France
Posts: 9
Hooooo

Follow up time!

In the Linux Kernel documentation I found the following:


-----
https://www.kernel.org/doc/html/late...tems/affs.html

Overview of Amiga Filesystems

Not all varieties of the Amiga filesystems are supported for reading and writing. The Amiga currently knows six different filesystems:

DOS0
The old or original filesystem, not really suited for hard disks and normally not used on them, either. Supported read/write.
DOS1
The original Fast File System. Supported read/write.
DOS2
The old “international” filesystem. International means that a bug has been fixed so that accented (“international”) letters in file names are case-insensitive, as they ought to be. Supported read/write.
DOS3
The “international” Fast File System. Supported read/write.
DOS4
The original filesystem with directory cache. The directory cache speeds up directory accesses on floppies considerably, but slows down file creation/deletion. Doesn’t make much sense on hard disks. Supported read only.
DOS5
The Fast File System with directory cache. Supported read only.
-----


Knowing that, I changed my partition type with HDInstTool to DOS3.

Now I can mount, read and write from Linux! Goal achieved? Almost.

One problem remains: when I copy files inside FS-UAE from a RDB file disk to the /amiga mount point (my compact flash), I loose the Execute attribute. Since I copied all my AmigaOS system partition that way, my startup-sequence was interrupted at... Setpatch!

I used "protect #? all +e" on the partition and after that it was booting fine but of course, Execute attributes are now spread where they shouldn't be, it would probably never be a problem but still, it's messy.

On https://www.kernel.org/doc/html/late...tems/affs.html I see more information about all attributes but tbh at this stage I don't understand "Why?".

If you guys could shed light on that little mystery, it would be most welcome!
Polom is offline  
Old 22 September 2021, 05:08   #7
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
There is much more to lose than just the x bit. AmigaOS has eight protection bits and each file can have a comment. Linux has three bits and no comments. So you always lose information if you go through Linux. Additionally UAE does not know that you are accessing an Amiga partition, so it might well be UAE who removes the x bit because the files used by UAE are not executable on Linux.

You can mount a data partition on Linux to transfer downloaded lha files and such, but you should not mount your system partition on Linux.

You can rather use /dev/sdb as a hardfile in UAE. It's so much easier to access harddrives as files on Linux than on Windows for example, so why not use this feature. You might need to run UAE as superuser to get the required access, though.
thomas is offline  
Old 22 September 2021, 07:15   #8
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Linux supports RDB partition tables.

You'll need to build your kernel with that support enabled, as distributions generally do not enable it.

It's possible to use partx to force Linux to scan partitions and create block devices for them, should you setup a loop device and forget to do it with losetup itself.

FFS filesystems will mount fine, with write support.

Of course, if all you need is to move data around, remember amigaXfer is a thing, runs on Linux, and basic null-modem serial cables are trivial to make (RX<>TX and GND<->GND). AmigaXfer will only use the three wires.

Last edited by admiral; 22 September 2021 at 07:17. Reason: amigaXfer @ Linux
admiral is offline  
Old 23 September 2021, 00:37   #9
Polom
Registered User
 
Join Date: Sep 2021
Location: France
Posts: 9
Quote:
Originally Posted by admiral View Post
Linux supports RDB partition tables.

You'll need to build your kernel with that support enabled, as distributions generally do not enable it.

What is the name of that module? Thanks!
Polom is offline  
Old 23 September 2021, 05:23   #10
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by admiral View Post
Linux supports RDB partition tables.
This makes mounting easier but it does not change the limits of the AFFS implementatIon.
thomas is offline  
Old 23 September 2021, 06:32   #11
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Quote:
Originally Posted by Polom View Post
What is the name of that module? Thanks!
https://www.kernelconfig.io/config_amiga_partition

No idea if it can even be built as a module.

Code:
zgrep CONFIG_AMIGA_PARTITION /proc/config.gz
If not set, it's time to build a kernel.
admiral is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting FFS hard drive partition under K1.3 Dids support.Other 18 12 July 2021 20:51
Mixing FFS/PFS/FAT partitions G4DDS support.Other 4 16 March 2020 00:27
Mounting FFS-HDFs with DiskImage[Gui] McTrinsic support.Other 25 10 December 2017 00:52
Partitions not mounting... essence25 support.Hardware 4 26 June 2017 02:50
ffs and large partitions source Hardware mods 2 11 July 2010 02:36

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:47.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08183 seconds with 15 queries