My macOS filesystem is so broke that I can't even enter recovery mode. I am now on a Linux live system and have InstallESDDmg.pkg which I could extract with 7z. I could also use dmg2img to create an ISO file.
Following the instructions in this post, I am able to to copy the image to the USB flash drive using dd. However once I start the Mac with the option key pressed I don’t see the option to boot from that USB drive.
So I assume I must create a partition table and make the device bootable. as far as I understand from this Ubuntu tutorial, this method only allows to make the ISO bootable if it is a Debian-like system. For macOS I would need something different.
I see some suggestions in this post here but since they are so different I wonder which ones help
So how am I supposed to proceed from here?