Creating a new HomeBrew Tab or formula

We have tried to dual boot installation of Ubuntu on a Mac OS X machine without using any USB or DVD/CD based on the below reference link. In order to do that, we have planned to create a homebrew tap/formula with Ubuntu OS booting files and script files and use that homebrew tap/formula to install OS on Mac machine. Is that possible to install OS via a package manager like homebrew?

Reference Link: https://apple.stackexchange.com/questions/312264/installing-ubuntu-without-dvd-or-flash-drive