@Alexzee, you may be interested in a few of the following observations about building a linux OS.
In recent times, there have been quite a few projects on github to build small or minimal linux operating systems. Here are a few examples:
Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core envi...
github.com
A "tiny educational Linux distribution".
A short tutorial about building Linux based operating systems. - MichielDerhaeg/build-linux
github.com
There's quite a bit of explanation on this at the github site.
Yosild is a single shell script that builds a full, minimal Linux distribution based on BusyBox. - jaromaz/yosild
github.com
There's an accompanying video for this whose URL is mentioned at the site.
Although I haven't personally run these, a colleague of mine has done so with some success although he needed to make some adjustments here and there.
In my own case, creating a tiny linux distribution was based on the now well-out-of-date "Linux Bootdisk HOWTO" found here:
That howto created a tiny linux system that fit on one or two 1440K floppy disks, and/or a CD. Although the last version of that document appears to 2002, there's still interesting information in it, though quite some of it no longer applies. The kernel, for example, used to have a bootloader in it to load itself but that's no longer so.
With many of the modern versions of small linuxes on github, one needs to be reasonably well versed in reading shell script if one wishes to see how the linux systems are constructed rather than just running the scripts to let them produce their outcome. YMMV.