There is a filesystem type field in the partition table. Formatting the partition won’t change it. Delete the partition and recreate it with the correct filesystem type. In parted you can do that with “mkpartfs”.
There is a filesystem type field in the partition table. Formatting the partition won’t change it. Delete the partition and recreate it with the correct filesystem type. In parted you can do that with “mkpartfs”.
But then building it still requires whatever scripting tool you use. Including the bash-ified version would not for practice, as it wouldn’t be very human readable and would have to be kept in sync with the source script. It’s much cleaner and simpler to just require python for your build environment.
I don’t see why bash would be used at all here. If you want something that doesn’t need another interpreter, then just compile a binary.
After creating it with mkpart, are you formatting it with mkfs.btrfs? You need to both steps (create partition and format it). Also, try running partprobe or rebooting after making changes so that the kernel re-detects it.