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