After obtaining the small key north of the entrance, do the Ocarina Glitch at the top of the stairs and head to the boss door, go up the stairs at the entrance of the dungeon and walk to the left or right of the boss door and into the next room.
(Will improve later.)
Octo will always shoot boulders at you in his first phase. In his second phase, the pattern is suck, boulder, suck, boulder, boulder and repeats that pattern until he's hit 3 times.
On his 3rd phase, it's completely RNG based. If he starts to suck, he will then proceed to shoot a boulder then use ink.