Page 2 of 2

Re: Amiga Fast File System (AFFS or FFS)

Posted: Fri May 15, 2020 11:55 am
by sailorMH
xeno74 wrote: Fri May 15, 2020 6:33 am Is BDH0 always the first partition on the first hard drive or can it be on the second hard drive as a second partition?

Thanks,
Christian
No, not allways. AmigaOS (ans MorphOS) device names are entitely on your decision.
By default the partitions are named:
DH0: first partition (i.e. device, on which usually System: volume), DH1: second
BDH0: first on second disk, etc..

but you can during the creation and anytime later change this name to your favorite name ( for example KONG1: ;-)).
I have on my Pegasos2:
bi0: ( FFS volume for booting images), DH0: (System:, SFS volume of MorphOS), DH1: (Work:, SFS volume of MorphOS) DH2: (Backup:, Ext2 volume)
ADH0: (AOSSystem:, SFS volume of AmigaOS), DH1: (AOSWork:, SFS volume of MorphOS), SWAP (AmigaOS swap), etc..

Re: Amiga Fast File System (AFFS or FFS)

Posted: Fri May 15, 2020 12:13 pm
by xeno74
OK, I think I have it.

Code: Select all

parted -l | grep BDH0 -B 11 | grep ' BDH0\|sd'
Output:

Code: Select all

Disk /dev/sda: 2000GB
 1      1057kB  123MB   122MB   affs3        BDH0  hidden
This command can find BDH0, DH1 till DH7.

Re: Amiga Fast File System (AFFS or FFS)

Posted: Fri May 15, 2020 12:51 pm
by xeno74
What do you think?

Code: Select all

device_id=`parted -l | grep BDH0 -B 11 | grep ' BDH0\|sd' | head -n 1 | cut -f 2 -d ' ' | sed 's/://'`

Code: Select all

echo $device_id
Output: /dev/sda

Code: Select all

partition_id=`parted -l | grep BDH0 -B 11 | grep ' BDH0\|sd' | tail -n 1 | cut -f 2 -d ' '`

Code: Select all

echo $partition_id
Output: 1

Code: Select all

mount -t affs $device_id$partition_id /media/fienix/BDH0

Code: Select all

mount | tail -n 1
Output: /dev/sda1 on /media/fienix/BDH0 type affs (rw,relatime,bs=1024,volume=:)

Re: Amiga Fast File System (AFFS or FFS)

Posted: Sat May 16, 2020 4:35 pm
by Hypex
xeno74 wrote: Fri May 15, 2020 12:51 pm What do you think?
Good one.

What I found myself, which was annoying, is that parted separates the device from the partitions. So you need to grep for Disk and then separate each device listed. Then iterate through the list and send it to parted to give a partition list for that. Take the result and grep it for affs. Combine the device and part and you have a list of AFFS volumes. Using amiga-fdisk may actually help here. I also just checked and parted on x64 has different output. Thought Linux was portable. :-)

Re: Amiga Fast File System (AFFS or FFS)

Posted: Wed Sep 09, 2020 10:41 pm
by xeno74

Re: Amiga Fast File System (AFFS or FFS)

Posted: Thu Jan 28, 2021 7:02 pm
by musa
Hi
I do not know if it can be used for anything but I use this method and it works fine for me.


mkdir /media/dh0
sudo mount -t affs /dev/sdb3 /media/dh0 (sdb3 is my amiga partion)

sudo chmod -R 777 /media/dh0
sudo chown -R musa:musa /media/dh0

Now you should be able to browse the directory as normal user.

When finished:

umount /media/dh0

Have a nice day

Re: Amiga Fast File System (AFFS or FFS)

Posted: Mon May 10, 2021 3:32 pm
by Hypex
musa wrote: Thu Jan 28, 2021 7:02 pm Hi
I do not know if it can be used for anything but I use this method and it works fine for me.
Thanks musa. I got stuck on this recently. It would mount fine but then files couldn't be written. Generally 777 is not recommended as it's a security risk. However for Amiga files, that can generally be written by any user, this should be acceptable. I've seen 0755 recommended in place but it blocks writing. I found 707 also works. And 666 could be used if executables aren't needed, though it looks evil. :)

Also, to avoid changing file mode settings, it can be done from the mount. Simply specify the mode from options like so:
mount -t affs -o mode=0777 /dev/sdb3 /media/dh0