Here is a mockup of what needs to be done to install Gentoo on PlayStation 3.
This article will describe the process under Gitbrew's OtherOS++ custom firmware. This is not for official 3.15 firmware.
Boot into Petitboot. Partition /dev/ps3dd and extract stage3 to the root filesystem of your where you will install Gentoo.
This part of the installation process can be scripted, but has to comply with Almquist Shell, as it is the default shell provided with Petitboot for PS3.
The kernel needs special patches from glevand to take advantage of OtherOS++ features. Most importantly, the kernel needs PS3 partition table support to even see devices from the HDD's additional region.
Debugging messages over UDP broadcasts
Platform support ---> [*] Sony PS3 PS3 Platform Options ---> [*] PS3 udbg output via UDP broadcasts on Ethernet
Turning this on will make udbg broadcast debug messages on port 18194. When booting the kernel, have one of the machines in your network run the following to receive the messages:
nc -ul -p 18194