Factory reset - recovery not working

I have to do a recovery of my Aqua Fish. The device is not booting anymore. I only see the boot logo and that was it.

I tried to do the “Reset device to factory state” process. I am using Linux with telnet to the IP of the device.

The device told me this after starting the process with “yes”:

ALL DATA WILL BE ERASED! Clears everything from the device and reverts the
software back to factory state. This means LOSING EVERYTHING you have added to
the device (e.g. updates, apps, accounts, contacts, photos and other media).
Are you really SURE? [y/N] y
2 logical volume(s) in volume group “sailfish” now active
/usr/bin/recovery-menu: line 51: arithmetic syntax error
Connection closed by foreign host.

Can’t start factory reset, file-system check or reboot while other critical
operation is in progress or shell or sshd is running.
To continue please exit from all shells, stop sshd if necessary or wait for
operations to complete…

What can I do? I tried it several times!

Please help me!

Can you drop into a shell on the recovery menu and inspect what is going wrong in that line 51 of /usr/bin/recovery-menu?

With sshd? How can I do it? Please explain this to me!

The recovery menu should offer the option to start a shell, does it not?
It also should offer to start sshd, but that’s not what I mean and I’m not sure what good it would be.