LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-22-2019, 09:37 AM   #1
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Rep: Reputation: Disabled
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.
 
Old 03-22-2019, 10:41 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by ayyasprings View Post
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?
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 View Post
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 View Post
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.
See again caching and how fork works.
 
Old 03-22-2019, 01:06 PM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,570
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
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.
 
Old 03-22-2019, 02:15 PM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,484

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installed RootFS in RedBoot iDirect x3 evolution Satellite Router/modem and loaded zImage JohnKarl Linux - Embedded & Single-board computer 1 07-23-2017 04:11 PM
How to eliminate unwanted .desktop apps in rootfs before building and porting into the board? ayyasprings Linux - Embedded & Single-board computer 6 09-26-2016 03:43 PM
[SOLVED] WARNING: at kernel/irq/handle.c - after changing rootfs, but why? embLinux Linux - Kernel 1 04-24-2014 01:42 AM
Boot Up Process- The Read Only Rootfs into VFS dman777 Linux - General 4 03-17-2011 09:50 PM
[VPS] 4 load page = 100 MB RAM loaded? do i need 100x 400 mb ram for next 400 page? vaporizel Linux - Server 1 03-14-2011 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration