Alexander E. Patrakov wrote: > Bruce Dubbs wrote: >> This goes completely against the Unix philosophy of making simple single >> function tools. Why are they trying to do lsmod/rmmod, enter rescue >> mode, set and unset variables, run scripts, and so forth. They are >> trying to recreate the kernel. >> > > Big warning: I do not have FreeBSD installed now, I only played with it > on my old computer several months ago. > > AFAIK, "insmod and rmmod" are needed for booting FreeBSD kernel. > > Bruce's rant does mean (correctly) that Grub2 is no longer a simple > Linux boot loader. But this does not mean that it should not be excluded > as an option just because of the bloat - otherwise people who dual-boot > Linux and FreeBSD will have to chainload the native FreeBSD boot loader > from LILO or whatever boot loader remains the LFS default.
In the past, I've gone though the boot process for Linux in some detail, including how the kernel is put together and compressed when building. The loader only copies the kernel image to the 1M absolute memory location, changes to protected mode, and jumps to the 1M location. The kernel then does everything that is necessary to uncompress itself, relocate itself back to the 1M address, and then initialize itself. This is actually pretty simple and no intermediate code is needed to do this with the possible exception of the code needed to physically read the device where the kernel is located (*stage1_5). If an OS needs more, then it should do it itself. There is nothing wrong with using chainload to do specialized initialization. If you are doing more, you are doing the job of the OS. Yes, I know that initrd loads kernel modules for Linux for the case when the fs drivers are not built into the kernel. Personally I never need initrd because I *do* compile the drivers into the kernel, but widely available distros need it to load *all* fs drivers because they don't know in advance which are needed for the root partition. If this type of thing is needed for BSD, with different details, then it should be as a 2nd parameter to initrd (or a renamed function that does the same thing. In any case, the idea of "Do one thing, well." is being violated. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page