Amiga Fast File System (AFFS or FFS)

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
sailorMH
Posts: 230
Joined: Wed Aug 28, 2013 6:01 pm
Location: Czech republic

Re: Amiga Fast File System (AFFS or FFS)

Post 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..
Micro A1-C (G3/1.2 GHz), AmigaOne XE (G4/1.4 GHz), Pegasos II (G4/1.33 GHz), Sam440ep, Sam440ep-flex, AmigaOne X1000
Efika 5200b, Pegasos I, Powerbook, Mac Mini (1.83 GHz), iMac, Powermac Quad

AmigaOS, MorphOS, linux, MacOS X
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Amiga Fast File System (AFFS or FFS)

Post 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.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Amiga Fast File System (AFFS or FFS)

Post 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=:)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Amiga Fast File System (AFFS or FFS)

Post 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. :-)
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Amiga Fast File System (AFFS or FFS)

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
musa
Posts: 709
Joined: Tue Aug 23, 2011 7:58 pm

Re: Amiga Fast File System (AFFS or FFS)

Post 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
AmigaX1000
Follow me on twitter @basjoo_dk
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Amiga Fast File System (AFFS or FFS)

Post 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
Post Reply