my situation is this : I have a freshly compiled kernel, all the applications and libraries compiled for the new platform, I know how to boot using my bootloader of choice, but I don't have a root filesystem .I would like to know if there is an official or well tested guide about how to populate a new root filesystem for a given linux kernel, which libraries a linux kernel really needs and all the bells and whistles that I need to run a linux kernel and a minimalistic linux box .I think that the obvious one is the C library, I need a c library anyway, but I don't really know if I can get away with just a C library + all the extra programs and libraries of my likings, or the kernel needs something else, even in terms of config files I haven't really found something explicit about which files the linux kernel is expecting to find on a root filesystem . All that I found is something about the directories structure of a filesystem that wants to be linux-compatible which basically says that you should have /lib,/usr,/bin and more directories, but really nothin substantial about creating a new filesystem .PSthis question is not about how to create a filesystem, how to boot it or anything else; I just want to know which files are required to complete the pair kernel + filesystem so I can boot a new linux box .
How to populate a root filesystem from scratch?
filesystems;boot;root filesystem
The Linux kernel does not care much. The boot loader tells the kernel where to mount a root filesystem -- typically an initial ramdisk image (initrd), but it can also be the actual root filesystem --, and the kernel will start the init process from /sbin/init (/init on a initramfs) unless told otherwise.Even the location of the kernel filesystems -- /proc, /sys, /dev if udev, and so on -- is basically up to the userspace to decide. The Linux Standards Base project standardized these across various Linux distributions. (Well, more or less. There are still some small differences in e.g. device naming, and there is talk about merging /usr/bin into /bin and /usr/lib into /lib). A version of it was accepted as an ISO standard, ISO/IEC 23360. The current version of LSB, as of October 2016, is LSB 5.The Linux kernel developers try very hard to keep stuff backwards-compatible in the userspace interface. This is why version 2.6 information is very much applicable to 4.4. It is pretty much only when new facilities and interfaces are introduced that new versions diverge from the older ones, and you need to find the documentation for those.You mention you've already compiled some libraries and applications. If so, the compile-time settings you used (check configure settings, --prefix and so on) and the directories those libraries and applications look for their configuration files (and timezone files for the C library, internationalization, and so on) determine the directory structure you absolutely do need.Linux From Scratch! is a community which develops books on how to compile and build a fully working Linux distribution from scratch. It is not exactly minimal -- you can omit certain packages in some situations, strip others, and so on --, but everything is explained.Rob Landley is well known for documenting Linux kernel stuff. His intro to initramfs, how to use initramfs, and programming for initramfs, are very interesting if you want to make a minimal system that runs directly from an initramfs, like many embedded devices do.As to systemctl or systemd in general, I'd point you to its home page, and bid you good luck. I myself am looking for ways to avoid it, and use more robust init systems instead, ones that still acknowledge the Unix philosophy rather than agglomerating into a monolithic mess by whim. (In my experience, the former stay functional and maintainable in the long term, and the latter, while often loved by end users due to the agglomerated new features and outer polish, makes for fragile and broken systems and system administrators in the long term. Your experience and opinions may vary; I'm just describing mine.)When I developed a simple benchmarking USB stick for evaluating Linux cluster nodes, I examined the minimal Debian and CentOS systems you can install, to find out the details OP is asking (except that I was not looking for a minimal system, but a small lightweight system that can run the same binaries as are run on the final cluster itself; i.e., including basic services and libraries). Today, I'd recommend looking at Devuan, because it supports multiple init systems. Experimenting these in virtual machines should be very informative.Practice rules over theory or standards. There are no enforced standards, or any standards really; even LSB and ISO/IEC 23360 are more like guidelines for successful interoperability. The Linux kernel documentation extracted from the Linux kernel sources does describe the kernel expectations, but as mentioned, there are very, very few, that affect the filesystem tree. And even those tend to be boot-time or compile-time configurable.