Building new Linux distribution.. where to go?
Hey guys. I am looking forward to building a Linux distribution that is made extremely custom to my ideas of how an OS should run. (I have some previous history of writing up Operating Systems in assembly language in both 16 and 32 bit.)
I have gained a bit of knowledge around how Linux operates and used Arch Linux for some time to familiar myself with some of the controls and directories in Linux. I tried using LFS (Linux from Scratch), and found that what it accomplishes is essentially a very slow way of doing the same as Arch Linux's package manager.
However I don't understand how to do a few specific things, which I think are central to building a new distribution:
1. What is the very most base required for Linux to run? With both LFS and Arch Linux, if you want to install the kernel, you have to install a whole bunch of other things, like bash, init, readline, kernel-headers, etc. as dependencies.
From what I understand however, the Linux kernel can run without most of these packages.
For example, I may want to have Linux boot up to turn on only one program (lets say a mysql server) and that's it. No bash or shell of any kind, no man pages, no utility commands like "rm" or "cd"
So, what is the very base minimum requirement for a Linux kernel? How do I isolate it from everything else? In theory if I have only the very base, it should take up less than a megabyte. (ie, I should be able to fit it on a floppy disk.)
2. How do I choose exactly what type of features I want from a Linux kernel? Slackware seems to give these general "hughsmp", "generic", "hugh", etc. versions of Linux. How do I choose any options available for Linux? ie being able to read ext2 or fat, or both.. Being able to execute ELF or a.out, or both.
To be able to include some features in Linux, for example handling TCP connections.. I might want to remove these if I am not using a network.
3. This might be a bit more advanced, but I didn't see how to do this anywhere: How do I detect which devices are connected to the computer? For example, if I want to detect what type of network card you have so that I can install the appropriate driver, what do I do? Is it just scanning "lspci" and "lsusb"? Or is there a way to do it without those programs?
So you like the basics and the hard way?
Have you tried Gentoo? There are levels that you can play with. It depends if you want to start from the basic compilation, or some of it compiled, or finally the last level. The choice is up to you. It is a running Linux. Updates are continuous. No need to wait for the next upgrade version. Gentoo is always up-to-date.