What are the minimal and mandatory content loaded into ram from rootfs on boot up after kernel loaded?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What are the minimal and mandatory content loaded into ram from rootfs on boot up after kernel loaded?
Hi,
In root file system hierarchy there are many folders which include data stored in solid state devices and other binaries or libraries in which some may not need to be loaded any time and also some other configuration files.
My doubt is what are the contents that will be loaded to RAM after kernel loaded in the boot process?
I agree that it varies according to the system, like the files related to display manager varies across the system depending on which it supports.
But what are the bare minimal content that are loaded in the RAM from Root File System Hierarchy that must be loaded after kernel loaded?
And also the mount point / is in the hard drive or any solid state device before boot up and after boot up it was loaded into RAM(if I am right) and not all the contents inside / directory are loaded into RAM.
Then my another question is how does any of file accesses or writes or execution (in case of executables) differentiated that some are in RAM and some still not loaded into RAM?In other words how the accessing of specific path is differentiated when some are in RAM and some still not loaded into RAM.
Please reply to my doubt or show me any reference to look for as I could not find by web search.
Last edited by ayyasprings; 03-22-2019 at 09:40 AM.
In root file system hierarchy there are many folders which include data stored in solid state devices and other binaries or libraries in which some may not need to be loaded any time and also some other configuration files.
My doubt is what are the contents that will be loaded to RAM after kernel loaded in the boot process?
I agree that it varies according to the system, like the files related to display manager varies across the system depending on which it supports.
But what are the bare minimal content that are loaded in the RAM from Root File System Hierarchy that must be loaded after kernel loaded?
I do not think anyone can give you an answer. The content of RAM is continuously changing, even the "bare minimum" - which is required to run the OS - is not unconditionally put fully into RAM.
You might want to check how caching works and how process execution works (and what is swap).
Quote:
Originally Posted by ayyasprings
And also the mount point / is in the hard drive or any solid state device before boot up and after boot up it was loaded into RAM(if I am right) and not all the contents inside / directory are loaded into RAM.
I do not understand, it is not loaded (if I understand well).
Quote:
Originally Posted by ayyasprings
Then my another question is how does any of file accesses or writes or execution (in case of executables) differentiated that some are in RAM and some still not loaded into RAM?In other words how the accessing of specific path is differentiated when some are in RAM and some still not loaded into RAM.
Only bits of running programs are in RAM, not directories and files. The kernel keeps an internal list of inodes of the most recent files and directories that it has accessed. Since top-level directories are being accessed all the time, their inodes will be permanently stored in kernel space, but not their contents.
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,484
Rep:
If you run dmesg through less, it will give you an idea of what the kernel sees & does as it starts up, namely, finds onboard components that require software drivers & loads them, other than that you will need a command shell of some sort.
A bare bones Linux system could consist of a kernel & busybox, just enough to let you do useful things.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.