Path of root file system
Hi,
In the process of booting up of linux system,my understanding is root file system is loaded on the top of kernel.Is this understanding correct? If so, how kernel knows where the root file system is? Can we change the path where it takes the root file system from? Any help will be appreciated. thanks and regards nishanth |
The root file system is not loaded on top of the kernel, it is mounted by the kernel according to the entry for / in /etc/fstab
|
Quote:
|
Thanks for the correction TobiSGD :)
More specifically init reads /etc/inittab which directs it to run boot scripts. The first boot script runs mount which uses /etc/fstab to determine what to mount at / AFAIK (not sure) the kernel root option tells the kernel where to find the file system containing the files it needs during boot including /etc/inittab, the mount command and /etc/fstab. Normally the same as define in /etc/fstab but may not need to be? |
Quote:
1. Tell the kernel were to find init (in fact it seeks on several places in the specified filesystem for init or initrc). This is not needed when using an initrd. 2. Tell init which is the root partition. Without that info init wouldn't either be able to find /etc/inittab nor to mount the partitions specified in /etc/fstab, since it wouldn't find those files. This is at least needed when using an initrd, I am not sure if it is needed when running without it. SInce you are running Slackware, just have a look at the init-script in /boot/init-tree after making a initrd for your generic kernel. This will give you a basic idea what actually happens before the / partition and all others are mounted and the init-script invokes the "real" init from the harddisk to do the stuff like starting services, etc. |
Thanks TobiSGD :)
I should have been more explicit and written "the kernel root option tells the kernel's init process where to find ...", yes? |
All times are GMT -5. The time now is 09:28 PM. |