There is a handy trick related with petitboot region and the boot flag (that indicates if the PS3 boots to GameOS or OtherOS)
Is a long explain, but the story starts with this link:
https://www.psdevwiki.com/ps3/Mounting_HDD_on_PC#Making_Changes_to_cell_ext_os_area_VFLASH_Region
If i remember right that was written by glevand, he had a software brick because he changed the boot flag to OtherOS (the same you can do with one of the options of the rebug toolbox) but his petitboot was not installed properlly
This puts you into a black screen loop because one of the thing all the PS3 of the world does when booting is to check the boot flag, if the boot flag points to a corrupted or empty petitboot the boot process cant continue
The boot flag is stored together with petitboot in a area named cell_ext_os_area (the firmware doesnt have a device name for it, but you can think in it as dev_flash4... just because is located inmediatly after dev_flash3)
In PS3 models with NOR flash you can reset the boot flag simply by formatting the hdd, because this dev_flash4 is inside the VFLASH region of the hdd (a virtual flash)
-------------
The tricks are (only for NOR):
Before installing petitboot and before changing the boot flag you can make a "dump" of your dev_flash4... there is not any PS3 homebrew able to make this, but you can do it by connecting the PS3 hdd in PC (and copy the sectors with something like HxD hexeditor and the option "open device")
You can also make a backup of dev_flash4 after petitboot installation and before changing the boot flag.. this way if at some point you have problems you can connect the hdd to PC and restore dev_flash4 with petitboot installed and booting into GameOS normally
Also, this could be used to "install" petitboot manually... the point is you need to install petitboot only one time and after that you can reinstall it with just a copypaste of data in PC
Edit:
Take a look at this table to see the partition/region layout with the start/end offsets
https://www.psdevwiki.com/ps3/Talk:Harddrive#HDD_partitions