I'd like to compile my own version of the Linux kernel and as minimal as possible, running Ubuntu 16.10. I thought of the following way but it didn't work.
First I will build a fully modular linux kernel, by installing it with a .config file generated by
make allmodconfig. Then I'd boot into that kernel and create a new .config file by running
make localyesconfig, to create a kernel with all modules that are active built-in (yes, with all my USB-components etc. attached).
However, the fully modular kernel didn't boot. I read some stuff on the internet and I think it is because some modules can't actually be modular such as the module for ext4.
So my question is: how can I determine which modules I should build into my kernel in order to have such a 'fully' modular kernel boot properly?