Added new section called "Next Steps" to the tutorial.

This commit is contained in:
Ivan Davidov 2015-02-14 23:31:11 +02:00
parent d3a5e2e1c8
commit aa9424bc6e

View File

@ -15,7 +15,8 @@
2. Boot Process
3. Inside The Shell Scripts
4. Possible Improvements
5. Epilogue
5. Next Steps
6. Epilogue
### ### ###
@ -654,7 +655,47 @@
### ### ###
5. Epilogue
5. Next Steps
OK, now we know how to build and run a basic Linux system. But that's not enough.
Now we want to build more complex system, probably one which supports "packman",
"apt-get", or any other package manager.
Building such system requires a lot more work. A lot more! I mean it!
For starters, "Minimal Linux Live" lives entirely in the "initramfs" space. We never
really get out of there. Basically this is what you need if you want more functional
live Linux system:
1. Compressed file system - this is where all the real stuff will be.
2. GNU Coreutils - these are the real shell command line utilities (ls, cd, etc.).
You need them because later we are going to "escape" from "initramfs" and use the
actual file system available in the compressed file. Alternatively, you can overlay
the whole "BusyBox" environment on top of the compressed file system but that's not
really professional approach.
3. You need to "switch_root" to the actual file system (the compressed one) which you
first need to locate, then mount and finally make it "writable" by overlaying virtual
RAM files/folders via UNION/AUFS (or something similar) if the bootable media is not
already writable. Remember that you are mounting compressed FS, which means that if
you make any changes on files located in the original FS, they will not be persisted
between reboots. Probably you want to handle this edge case as well.
4. You need to prepare in advance the stuff that you want to be present in the compressed
file system. Assuming that we are building a useful live Linux OS, the absolute minimum
is "GNU Coreutils", network management utilities and probably some kind of package
manager, e.g. "packman" or "apt-get".
5. You need to rewrite /init and make it execute all necessary steps to fulfil "point 3"
from the above. Different live Linux systems use different approaches here.
All of the above is definitely *not* minimal but it's definitely doable if you put some
additional efforts.
### ### ###
6. Epilogue
That's all folks! I hope you find this tutorial useful. And remember, we are talking
about very minimal live Linux OS here. If you want to create something bigger, I