Made a DIY Linux system of your own. Start by compiling each line of code and building each file system structure.
Create your own Linux system, unlike any distribution. The tutorial that follows is from linuxfromscratch.org. I chose the systemd LFS 8.0 stable version of the tutorial.
Talk about some of the problems encountered in this and their own solutions.
The ubuntu16.04 64-bit processor environment. This is called host system (gcc5.4.0). You need to install many environments for this host system to compile. Use this machine to compile all the running environments of the next machine.
There's a version.
An additional hard drive is also required. This can be mounted in a virtualbox. Since the compilation of space is very large, such as compiling a GCC generated files up to 2.5G, so a larger hard disk is required. Officials say at least 6 g. I have done many lfs, experience tells me at least 12G, better is 20G.
This extra hard drive is designed to accommodate a well-made system. Of course you can also use a larger file system to mount a hard drive.
There are many packages that need to be compiled. Here's a little bit of emphasis. There are multiple packages to be compiled several times during the period. such as Binutils, GCC, glibc. Why compile it multiple times?
For the first time, binutils, GCC (6.3.0) was compiled with the GCC 5.4.0 of the host system to compile the remainder of the binutils, GCC, and glibc later with the compiled GCC 6.3.0. This way the software on the new system is compiled by the same compiler 6.3.0.
Each time a different setting, compile such as binutils, GCC, all the previous source code folder to delete, re-unzip, re-configure, recompile, reinstall. Otherwise, an irreversible error will occur. (e.g. after chroot new LFS system, GCC fails)
Other compiled source code can also be deleted, it is useless to keep. If you use it next time, you can keep it. It's good to save some space.
Some of these patches, such as glibc2.5, have some patches to play. can be used Patch-p3 <. /somewhere.patch hit patch. -P3 means that the directory under the same directory across three \ Slash directories, to be patched. Finish patching, then configure, then Make,make install.
LFS Linux from Scratch notes (experience non-tutorial)